npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ktmcp-cli/stripe-api

v1.0.0

Published

Production-ready CLI for Stripe API - payments, customers, subscriptions

Readme

Banner

"Six months ago, everyone was talking about MCPs. And I was like, screw MCPs. Every MCP would be better as a CLI."

Peter Steinberger, Founder of OpenClaw Watch on YouTube (~2:39:00) | Lex Fridman Podcast #491

Stripe API CLI

A production-ready command-line interface for the Stripe API. Manage payments, customers, subscriptions, invoices, and more — directly from your terminal.

Unofficial: This project is not affiliated with or endorsed by Stripe, Inc.


Features

  • Full coverage of core Stripe resources: customers, charges, payment intents, subscriptions, invoices, refunds, products, prices
  • Secure API key storage via OS keychain-backed config file
  • Supports both sk_live_ and sk_test_ keys
  • Spinner feedback for all API operations
  • Clean tabular output for list commands
  • Environment variable support (STRIPE_SECRET_KEY)
  • Works with Node.js 18+

Why CLI > MCP

| | CLI | MCP | |---|---|---| | Works everywhere | Yes | Requires MCP-compatible client | | Shell scriptable | Yes | No | | Pipeable output | Yes | No | | Zero setup | Yes | Complex configuration | | CI/CD friendly | Yes | No | | Debuggable | Yes | Hard |

MCPs are wrappers. A CLI is a first-class tool.


Installation

npm install -g @ktmcp-cli/stripe-api

Or use without installing:

npx @ktmcp-cli/stripe-api --help

Authentication

Set your Stripe secret key once:

stripe-api config set --secret-key sk_test_your_key_here

Or use an environment variable:

export STRIPE_SECRET_KEY=sk_test_your_key_here
stripe-api customers list

Get your API keys at: https://dashboard.stripe.com/apikeys


Commands

Config

stripe-api config set --secret-key <key>   # Save API key
stripe-api config show                      # Show current config
stripe-api config clear                     # Clear config

Customers

stripe-api customers list [--limit 10] [--email <email>]
stripe-api customers get <customer-id>
stripe-api customers create --email <email> --name <name>
stripe-api customers delete <customer-id>

Charges

stripe-api charges list [--limit 10] [--customer <id>]
stripe-api charges get <charge-id>

Payment Intents

stripe-api payment-intents list [--limit 10] [--customer <id>]
stripe-api payment-intents get <payment-intent-id>
stripe-api payment-intents create --amount <cents> --currency usd [--customer <id>]
stripe-api payment-intents cancel <payment-intent-id>

Subscriptions

stripe-api subscriptions list [--customer <id>] [--status active]
stripe-api subscriptions get <subscription-id>
stripe-api subscriptions create --customer <id> --price <price-id>
stripe-api subscriptions cancel <subscription-id> [--at-period-end]

Invoices

stripe-api invoices list [--customer <id>] [--status paid]
stripe-api invoices get <invoice-id>
stripe-api invoices pay <invoice-id>

Refunds

stripe-api refunds list [--charge <id>]
stripe-api refunds get <refund-id>
stripe-api refunds create --charge <charge-id> [--amount <cents>]

Products

stripe-api products list [--active]
stripe-api products get <product-id>
stripe-api products create --name <name>

Prices

stripe-api prices list [--product <id>] [--active]
stripe-api prices get <price-id>
stripe-api prices create --product <id> --amount <cents> [--recurring-interval month]

Examples

# List your 5 most recent customers
stripe-api customers list --limit 5

# Create a customer
stripe-api customers create --email [email protected] --name "Alice Smith"

# Create a $29.99 payment intent
stripe-api payment-intents create --amount 2999 --currency usd

# List active subscriptions for a customer
stripe-api subscriptions list --customer cus_xxx --status active

# Issue a full refund
stripe-api refunds create --charge ch_xxx

# Issue a partial refund of $5.00
stripe-api refunds create --charge ch_xxx --amount 500

# List invoices for a customer
stripe-api invoices list --customer cus_xxx

# Create a recurring price ($19/month)
stripe-api prices create --product prod_xxx --amount 1900 --recurring-interval month

# Use with jq for scripting
stripe-api customers list --limit 100 | grep -E 'cus_|email'

Environment Variables

| Variable | Description | |----------|-------------| | STRIPE_SECRET_KEY | Your Stripe secret key (sk_live_... or sk_test_...) |


Resources


License

MIT — see LICENSE


Part of the KTMCP project — building CLIs as first-class alternatives to MCPs.