| name | stripe-q-cli |
| description | Manage multiple Stripe accounts via CLI with full Stripe API coverage. Use for balances, charges, customers, subscriptions, invoices, products, prices, payment intents, payouts, refunds, and any other Stripe resource/action, across configured accounts (codeline, lumail, saveit, tchao, quizup, thumbfast, pandacouple-dev, ...). |
| category | payments |
stripe-q-cli
Multi-account Stripe CLI. Every Stripe API resource and action is generated from
Stripe's official OpenAPI spec, so the full API surface is available, scoped
to a named account.
When To Use This Skill
- Inspect a Stripe account: balance, charges, customers, subscriptions, invoices,
payouts, products, prices, payment intents, disputes, refunds, etc.
- Mutate Stripe data: create/update/delete objects, or run actions like
confirm, capture, cancel, finalize, pay, void, verify.
- Work across several Stripe accounts without juggling keys.
Usage
stripe-q-cli <account> <resource> <action> [path-args] [options]
stripe-q-cli <account> api <method> <path> [-d k=v] [-q k=v]
Known account aliases: codeline, lumail, saveit, tchao, quizup,
thumbfast, pandacouple-dev. Run stripe-q-cli accounts list to confirm.
Discover commands with --help at any level — do this instead of guessing:
stripe-q-cli <account> --help
stripe-q-cli <account> <resource> --help
stripe-q-cli <account> <resource> <action> --help
Working Rules
- Run
stripe-q-cli accounts list first when the target account is unclear.
- Use
--json for agent-driven calls so output can be parsed downstream.
- Read current state before any mutation; prefer read commands first.
- Never print or paste raw Stripe secret keys; masked keys (
sk_l...7XvL) are safe.
- Treat
accounts add, accounts set-key, accounts remove and all
create/update/delete/action commands as sensitive — confirm the account
and intent first.
Account Management
| Command | Description |
|---|
stripe-q-cli accounts list | List configured aliases with masked keys |
stripe-q-cli accounts add <alias> --name "Name" --url "https://..." --key sk_live_... | Add an account |
stripe-q-cli accounts set-key <alias> <key> | Set an account's API key |
stripe-q-cli accounts remove <alias> | Remove an account alias |
Resources & Actions
Each resource exposes its standard operations and any custom actions:
list, create, retrieve <id>, update <id>, delete <id>
- nested sub-resources: e.g.
customers sources_list <customer>,
invoices lines_list <invoice>
- custom actions: e.g.
payment_intents capture <id>, invoices finalize <id>,
subscriptions cancel <id>, refunds create -d charge=ch_123
Common examples:
stripe-q-cli codeline balance retrieve
stripe-q-cli codeline customers list --limit 5
stripe-q-cli codeline customers retrieve cus_123 --expand subscriptions
stripe-q-cli codeline products create -d name="Pro" -d "metadata[tier]=gold"
stripe-q-cli codeline prices create -d product=prod_123 -d unit_amount=999 \
-d currency=usd -d "recurring[interval]=month"
stripe-q-cli codeline payment_intents capture pi_123
stripe-q-cli codeline subscriptions cancel sub_123
Parameters
-d, --data <key=value> — body param (POST), repeatable; supports Stripe
bracket notation (-d "items[0][price]=price_123", -d "expand[]=customer").
-q, --query <key=value> — query param, repeatable.
-e, --expand <field> — expand a response field, repeatable.
--limit, --starting-after, --ending-before — list pagination conveniences.
Path arguments (object ids) are positional and come in path order, before flags:
stripe-q-cli codeline customers update cus_123 -d email=new@example.com.
Raw API Escape Hatch
For anything not obvious as a named command (or endpoints newer than the bundled
spec), hit the API directly — this guarantees 100% coverage:
stripe-q-cli <account> api GET /charges -q limit=3
stripe-q-cli <account> api POST /products -d name="X"
stripe-q-cli <account> api DELETE /products/prod_123
Output Format
--json returns a standardized envelope:
{ "ok": true, "data": { }, "meta": { "total": 42 } }
On error: { "ok": false, "error": { "code": 401, "message": "..." } }
Global flags (place after the action): --json, --format <text|json|csv|yaml>,
--verbose, --no-color, --no-header.
Exit codes: 0 success, 1 API error, 2 usage error.
Setup
If stripe-q-cli is missing, rebuild and link it:
bun --version || curl -fsSL https://bun.sh/install | bash
cd ~/.cli/stripe-q-cli && bun run build
npx api2cli link stripe-q
On this machine the CLI is linked from ~/.local/bin/stripe-q-cli.
Safety
- Do not expose Stripe API keys, webhook secrets, customer emails, or payment
details beyond what the user requested.
- Prefer read-only queries unless the user explicitly asks to mutate data.
- Do not use
rm -rf; use trash if local cleanup is explicitly needed.