Nathan Cooper
@ncoop57.bsky.social
430 followers 2.6K following 46 posts
I'm a nerd (https://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: http://thorn.org/donate
Posts Media Videos Starter Packs
Pinned
ncoop57.bsky.social
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 🧵
ncoop57.bsky.social
Thank you also to @alexisgallagher and @jeremyphoward for providing great and early feedback on this blog post.
ncoop57.bsky.social
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 😏
ncoop57.bsky.social
Want the full technical details? The blog post dives deep into how we built FastStripe: [link to blog post]
ncoop57.bsky.social
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.
ncoop57.bsky.social
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.
ncoop57.bsky.social
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.
ncoop57.bsky.social
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.
ncoop57.bsky.social
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.
ncoop57.bsky.social
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.
ncoop57.bsky.social
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
A delightful and complete interface to GitHub’s amazing API
ghapi.fast.ai
ncoop57.bsky.social
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.
ncoop57.bsky.social
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-...
The Stripe Experience You Deserve – Answer.AI
Welcome FastStripe to the Thunderdome
www.answer.ai
ncoop57.bsky.social
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.
ncoop57.bsky.social
🚀 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!
ncoop57.bsky.social
ncoop57.bsky.social
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 🧵
ncoop57.bsky.social
🎉 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
ncoop57.bsky.social
Above announcement was generated with shell-sage's sassy mode 😅
ncoop57.bsky.social
🤖 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`
ncoop57.bsky.social
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! 🤓🤓
ncoop57.bsky.social
Glad you like it 🤓
ncoop57.bsky.social
ncoop57.bsky.social
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 🧵
ncoop57.bsky.social
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'
```

🤓🤓🤓