agent-stripe

Stripe incident triage CLI for AI agents

Language
Go
Version
0.4.0
License
MIT
Category
CLI Tool

A Stripe incident triage CLI designed for read-heavy investigation workflows where AI agents need compact structured output, actionable error hints, and no direct access to Stripe secrets. It supports resource exploration, scenario investigations, Connect context, and redacted Stripe-shaped output.

Features

01

Keychain-first credentials — API keys are stored securely and never printed back

02

Multi-profile support — aliases for sandbox, live, organization, and holding-account workflows

03

Stripe context aware — supports Stripe-Context for organization keys and related-account requests

04

LLM-shaped output — lists default to NDJSON, single resources to JSON, and errors include fixable_by plus hints

05

Sensitive field redaction — Stripe responses are redacted by default with explicit expose controls

06

Read-first triage — balance, events, PaymentIntents, charges, disputes, accounts, subscriptions, invoices, and GET-only raw API

07

Scenario investigations — invoice evidence, checkout completion, customer card last4, collection risk, refunds, disputes, fraud, ledger, and Connect failures

08

Bounded Stripe retries — transient 429 responses retry with exponential backoff and jitter

Install

Homebrew

>_
$ brew install shhac/tap/agent-stripe

AI Agent Skill

>_
$ npx skills add shhac/agent-stripe

GitHub Release (macOS)

>_
$ curl -L https://github.com/shhac/agent-stripe/releases/latest/download/agent-stripe-darwin-arm64.tar.gz | tar xz

Go Install

>_
$ go install github.com/shhac/agent-stripe/cmd/agent-stripe@latest

Build from Source

>_
$ git clone https://github.com/shhac/agent-stripe.git && cd agent-stripe && make build

Getting Started

agent-stripe needs a Stripe API key before it can investigate payments or account state. Store keys in named profiles so agents can reference them without seeing secrets.

01 · Add a Stripe profile

>_
$ agent-stripe auth add sandbox --form --context acct_...

With --form, a native OS dialog asks for the key and the CLI returns only a redacted setup receipt. Use --context for organization or connected-account workflows.

02 · Check credentials

>_
$ agent-stripe auth check sandbox

03 · Start with recent events

>_
$ agent-stripe events list --type charge.failed --limit 20

Lists stream compact NDJSON by default for token-efficient triage.

Usage

>_ Show balance
$ agent-stripe balance get
>_ List failed charge events
$ agent-stripe events list --type charge.failed --limit 20
>_ Resolve a known scenario
$ agent-stripe investigate resolve MOCK-0001
>_ Get a PaymentIntent
$ agent-stripe payment-intents get pi_... --expand latest_charge
>_ Investigate invoice payment
$ agent-stripe investigate invoice-payment in_...
>_ Investigate collection risk
$ agent-stripe investigate collection-risk --days 30
>_ Investigate Connect money movement
$ agent-stripe investigate outgoing-payment tr_...