Sign in

Nathan Cooper

@ncoop57.bsky.social
465 followers 2.6K following 46 posts

I'm a nerd (nathancooper.io). The world can be ugly and cruel to the most innocent. Consider donating to help children suffering from one of the worst things: thorn.org/donate

PostsRepliesMedia
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
Thank you also to @alexisgallagher and @jeremyphoward for providing great and early feedback on this blog post.
040
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
Huge thanks to @jeremyphoward and @HamelHusain for creating ghapi, which proved that auto-generated SDKs can be better than hand-written ones. FastStripe is our proof that this works beyond just GitHub. Stay stuned for more interesting release around this idea 😏
140
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
Want the full technical details? The blog post dives deep into how we built FastStripe: [link to blog post]
110
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
FastStripe is part of @answerdotai's mission to use AI to benefit humanity. Like GE with electricity, we're creating thousands of AI apps to discover what AI is truly useful for. To do that, we need to eliminate friction in app development, which is why I created FastStripe.
110
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
Ready to try it? `pip install faststripe` then:
A "Getting Started" Python code snippet for the `faststripe` library, demonstrating its two primary functions.  The first example shows how to create a one-time payment for "My Digital Product" at a cost of $20.00 using the `sapi.one_time_payment` function.  The second example shows how to create a recurring "Monthly Plan" subscription for $9.99 per month using the `sapi.subscription` function. Both code blocks define success and cancel URLs and print the beginning of the generated checkout URL.
100
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
We version FastStripe to match Stripe's official API versions. Version `2025.05.28.0` = Stripe's May 28th API + our convenience methods. We increment the last part whenever we add new convenience methods. Your code stays stable, you control upgrades. No surprise breaking changes.
100
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
The real magic happens in your editor. Every method knows its parameters and can tell your IDE about them. Documentation flows directly from Stripe's specification into your development environment.
A screenshot from a code editor showing an interactive help feature for the `faststripe` library. The command `sapi.customers.post?` has been run, which displays the documentation for that function directly below it. The output, formatted as comments, shows the function's signature and the beginning of a list of its available parameters, such as `address`, `balance`, and `cash_balance`, along with their expected data types.
110
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
Here's what makes it special about these convenience methods: when you call something like `sapi.one_time_payment()`, FastStripe handles the product/price creation automatically. But it uses the same auto-generated methods you have access to.
A screenshot of the Python source code that implements the `faststripe` library's convenience methods.  The image shows four functions being added to a `StripeApi` class using `@patch` decorators:  * **`find_product`**: Finds a product by name. * **`find_prices`**: Finds all prices for a given product ID. * **`priced_product`**: A helper function to create a product and price if they don't already exist. * **`one_time_payment`**: The main convenience method.  The code reveals how the simple `one_time_payment` function internally calls these helper functions to handle the logic of finding or creating products and prices before creating the final Stripe Checkout Session. This illustrates how more complex API logic is abstracted into a single function call.
100
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
FastStripe gives you two things: 1) Every Stripe endpoint with perfect IDE integration 2) High-level methods for common patterns. Want full control? Use the complete API. Want simplicity? Use the convenience methods.
A Python code snippet from the `faststripe` library demonstrating flexibility by combining detailed control with convenience methods.  The first section, labeled with the comment "# Full control when you need it," shows the creation of a customer with specific details, including email, name, a nested address object, and metadata.  The second section, labeled "# Then use the convenience method," shows the creation of a subscription for a "Pro Plan" costing 1999 cents, using the email from the customer object created in the first step.
100
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
I learned this approach from @jeremyphoward and @HamelHusain's awesome ghapi library for GitHub. Same principle: let the API document itself. If it works for GitHub's massive API, why not Stripe? ghapi.fast.ai/
ghapi.fast.ai
ghapi
A delightful and complete interface to GitHub’s amazing API
100
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
The key insight: Stripe publishes a comprehensive OpenAPI spec describing their entire API 🤓 . Instead of manually writing wrapper functions, we generate the perfect SDK automatically from Stripe's own specification. Always current, always complete.
A Python code snippet showing a data structure generated from Stripe's OpenAPI specification, dated 2025.05.28. The code defines a list of API endpoints, with the visible example being a dictionary that defines the endpoint for creating a customer. The dictionary specifies the `path` as `/v1/customers`, the `verb` as `post`, and a list of `params` such as `email` and `name`. Comments in the code indicate that this is a small sample, with many more parameters and hundreds of other endpoints in the full specification.
100
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
FastStripe eliminates the friction between you and Stripe's excellent API. When you type `sapi.customers.post(` your IDE shows every parameter with descriptions. No more diving through documentation. Here's the full story: www.answer.ai/posts/2025-...
answer.ai
The Stripe Experience You Deserve – Answer.AI
Welcome FastStripe to the Thunderdome
100
Nathan Cooper @ncoop57.bsky.social · 23/07/2025
At @answerdotai, we integrate @stripe into lots of projects. Every time, I found myself doing the same dance: create product, create price, create checkout session. Then hunting docs for parameters for each. So we built FastStripe, a self-documenting Stripe SDK that's easy to use!
A code snippet in Python demonstrating the use of the faststripe library to create a Stripe payment. The code imports StripeApi, initializes it with a placeholder key, and then calls the one_time_payment method to create a checkout session for a 'Digital Course' costing 4999 cents, with specified success and cancel URLs. The final line prints the first 64 characters of the generated checkout URL.
120
Nathan Cooper @ncoop57.bsky.social · 20/03/2025
🚀 ShellSage 0.1.0 has arrived, much to the relief of shell-challenged humans everywhere! Introducing sagent mode: now you can manipulate files by simply asking instead of learning actual commands. pip install shell-sage and embrace your laziness with ssage --mode agent today!
020
Nathan Cooper @ncoop57.bsky.social · 22/02/2025
bsky.app/profile/ncoo...
011
Nathan Cooper @ncoop57.bsky.social · 22/02/2025
🎉 ShellSage 0.0.8 is now live! New features: • Query logging to SQLite using `--log` flag (because who doesn't love a good paper trail?) 🗃️ • Better tmux history handling (for when your terminal has an existential crisis) 🛠️ Get it now: pip install shell_sage
120
Reposted by Nathan Cooper
Benjamin Warner @benjaminwarner.dev · 10/02/2025
With @bclavie.bsky.social and @ncoop57.bsky.social, we tried to answer two questions: - Can an instruction-tuned ModernBERT zero-shot tasks using the MLM-head? - Could we then fine-tune instruction-tuned ModernBERT to complete any task? Detailed answers: arxiv.org/abs/2502.03793
arxiv.org
It's All in The [MASK]: Simple Instruction-Tuning Enables BERT-like Masked Language Models As Generative Classifiers
While encoder-only models such as BERT and ModernBERT are ubiquitous in real-world NLP applications, their conventional reliance on task-specific classification heads can limit their applicability com...
141
Nathan Cooper @ncoop57.bsky.social · 01/02/2025
Above announcement was generated with shell-sage's sassy mode 😅
010
Nathan Cooper @ncoop57.bsky.social · 01/02/2025
🤖 ShellSage v0.0.7 What's new? (besides our growing disdain for user error) • Added --v flag because apparently you need to know these things • Fixed config issues because reading docs is hard • Better tmux support (you're welcome) Upgrade your terminal's IQ: `pip install shell-sage`
140
Nathan Cooper @ncoop57.bsky.social · 01/02/2025
If you wanna try shell sage out yourself, checkout the repo: github.com/AnswerDotAI/...
github.com
GitHub - AnswerDotAI/shell_sage: ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly
ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly - AnswerDotAI/shell_sage
000
Nathan Cooper @ncoop57.bsky.social · 01/02/2025
Had another magical moment with shell sage! I was fixing a repo issue and asked shell sage for the issues. Then used my quick commit alias (which uses shell sage), and it automatically added “Resolves #22” to the commit since it could see them in my terminal! 🤓🤓
120
Nathan Cooper @ncoop57.bsky.social · 25/01/2025
Glad you like it 🤓
000
Nathan Cooper @ncoop57.bsky.social · 19/01/2025
bsky.app/profile/ncoo...
020
Nathan Cooper @ncoop57.bsky.social · 19/01/2025
You can do the same with PRs too! Try out this alias: ``` alias pr='git diff main | ssage --c please generate a PR title and body for these changes. Make sure to use the github cli' ``` 🤓🤓🤓
100
Nathan Cooper @ncoop57.bsky.social · 19/01/2025
Found an amazing new usecase for shellsage's command mode: autogenerating git commits 🤓! I aliased `qc` to `git diff --cached | ssage --c please generate a concise git commit for these changes` and shellsage will enter the command I need with a great commit msg!
130
Reposted by Nathan Cooper
Nathan Cooper @ncoop57.bsky.social · 28/12/2024
🎉 ShellSage v0.0.6 is now available! New features: • Add new command mode for automatically inserting the correct command into your terminal • Add Support for OpenAI Compatible Providers Various bugs squashed too! github.com/AnswerDotAI/...
0103
Nathan Cooper @ncoop57.bsky.social · 28/12/2024
🎉 ShellSage v0.0.6 is now available! New features: • Add new command mode for automatically inserting the correct command into your terminal • Add Support for OpenAI Compatible Providers Various bugs squashed too! github.com/AnswerDotAI/...
0103
Reposted by Nathan Cooper
Benjamin Warner @benjaminwarner.dev · 22/12/2024
Thanks to my two co-leads: @nohtow.bsky.social , @bclavie.bsky.social , & the rest of our stacked author cast: @orionweller.bsky.social, Oskar Hallström, Said Taghadouini, Alexis Gallagher, Raja Biswas, Faisal Ladhak, @tomaarsen.com , @ncoop57.bsky.social , Griffin Adams, @howard.fm , & Iacopo Poli
161
Nathan Cooper @ncoop57.bsky.social · 21/12/2024
Interesting use of Shell Sage to see all of the panes that helped me out today. Had two panes: one for setting up Caddy configuration, and one for running a FastHTML app. Was getting a 303 error that I didn't understand, and so asked Shell Sage what was happening and gave it the entire context🤓
050
Nathan Cooper @ncoop57.bsky.social · 20/12/2024
bsky.app/profile/ncoo...
020
Reposted by Nathan Cooper
Nathan Cooper @ncoop57.bsky.social · 19/12/2024
🎉 ShellSage v0.0.5 is now available! New features: • ShellSage defaults to seeing entire tmux scrollback history • Important settings configurable via ~/.config/shell_sage/shell_sage.conf • System info now included in prompts pip install shell-sage github.com/AnswerDotAI/...
github.com
GitHub - AnswerDotAI/shell_sage: ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly
ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly - AnswerDotAI/shell_sage
141
Reposted by Nathan Cooper
Jeremy Howard @howard.fm · 19/12/2024
Post credits easter egg: Hey did you wonder what if we trained a bigger model? Where would that take us? Yeah, us too. So we're gonna train a "huge" version of this model in 2025. We might need to change the y-axis on this graph…
4174
Reposted by Nathan Cooper
Jeremy Howard @howard.fm · 19/12/2024
I'll get straight to the point. We trained 2 new models. Like BERT, but modern. ModernBERT. Not some hypey GenAI thing, but a proper workhorse model, for retrieval, classification, etc. Real practical stuff. It's much faster, more accurate, longer context, and more useful. 🧵
19620147
Reposted by Nathan Cooper
Benjamin Warner @benjaminwarner.dev · 13/12/2024
I feel the need for speed.
381
Nathan Cooper @ncoop57.bsky.social · 19/12/2024
It is now live in main for testing: github.com/AnswerDotAI/...
github.com
GitHub - AnswerDotAI/shell_sage: ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly
ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly - AnswerDotAI/shell_sage
010
Nathan Cooper @ncoop57.bsky.social · 19/12/2024
Working on this today actually!
110
Nathan Cooper @ncoop57.bsky.social · 19/12/2024
🎉 ShellSage v0.0.5 is now available! New features: • ShellSage defaults to seeing entire tmux scrollback history • Important settings configurable via ~/.config/shell_sage/shell_sage.conf • System info now included in prompts pip install shell-sage github.com/AnswerDotAI/...
github.com
GitHub - AnswerDotAI/shell_sage: ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly
ShellSage saves sysadmins’ sanity by solving shell script snafus super swiftly - AnswerDotAI/shell_sage
141
Reposted by Nathan Cooper
Simon Willison @simonwillison.net · 09/12/2024
I can now run a GPT-4 class model on my laptop (The exact same laptop that could just about run a GPT-3 class model 20 months ago) The new Llama 3.3 70B is a striking example of the huge efficiency gains we've seen in the last two years simonwillison.net/2024/Dec/9/l...
simonwillison.net
I can now run a GPT-4 class model on my laptop
Meta’s new Llama 3.3 70B is a genuinely GPT-4 class Large Language Model that runs on my laptop. Just 20 months ago I was amazed to see something that felt …
1135959
Nathan Cooper @ncoop57.bsky.social · 08/12/2024
not familiar with Warp tbh. What has your experience been like?
010
Reposted by Nathan Cooper
Isaac Flath @isaac-flath.bsky.social · 07/12/2024
The code is quite simple! Check it out at gallery.fastht.ml/split/widget...
gallery.fastht.ml
FastHTML Gallery
A gallery of FastHTML components showing common patterns in FastHTML apps, including chat bubbles, cascading dropdowns, interactive charts, etc.
021
Reposted by Nathan Cooper
Isaac Flath @isaac-flath.bsky.social · 06/12/2024
🎉 New FastHTML Gallery entry thanks to @carlolepelaars.bsky.social HTMX example demonstrating click to load new table row 😃
184
Reposted by Nathan Cooper
Isaac Flath @isaac-flath.bsky.social · 07/12/2024
Thanks to HTMX + fh-frankenui the implementation is very simple! Check it out :D gallery.fastht.ml/split/dynami...
gallery.fastht.ml
FastHTML Gallery
A gallery of FastHTML components showing common patterns in FastHTML apps, including chat bubbles, cascading dropdowns, interactive charts, etc.
011
Reposted by Nathan Cooper
Isaac Flath @isaac-flath.bsky.social · 07/12/2024
🎉 New FastHTML Gallery entry! Dynamic dropdown with: ✅ Search box in dropdown ✅ Input for users to add additional values
121
Nathan Cooper @ncoop57.bsky.social · 07/12/2024
bsky.app/profile/did:...
011
Nathan Cooper @ncoop57.bsky.social · 07/12/2024
New version of shellsage (0.0.4)! now available on Pypi: - Add support for OpenAI models - Remove action mode - Add ability to configure shell sage with a configuration file pip install shell_sage ssage Hi --provider openai --model gpt-4o-mini
150
Reposted by Nathan Cooper
Nathan Cooper @ncoop57.bsky.social · 05/12/2024
As R&D staff @ answer.ai, I work a lot on boosting productivity with AI. A common theme that always comes up is the combination of human+AI. This combination proved to be powerful in our new project ShellSage, which is an AI terminal buddy that learns and teaches with you. A 🧵
77416
Nathan Cooper @ncoop57.bsky.social · 06/12/2024
I will @capetorch.bsky.social ! I'll also be attending the W&B neurips event 🤓, would love to meet up!
120
Reposted by Nathan Cooper
Omar Sanseviero @osanseviero.bsky.social · 06/12/2024
So how was my first week back at Google? - PaliGemma2 was openly released - DeepMind openly released GenCast weather forecast (in a GCP bucket 🙈) - Genie 2 🧞world model was announced This team ships 🔥🚀 Let's go!
1291
Nathan Cooper @ncoop57.bsky.social · 05/12/2024
Lots of people are wanting it, so yes I think it should be added! Want to also allow other API provided like Gemini and OpenAI. The code is also open source so any PRs are more than welcome while we develop the repo further 🙏
010