stripe-cli
CLAUDE.md2.2k starsChanged 6 months agoApache-2.0View on GitHub
When building temporary binaries with Go tooling directly (e.g. go build -o ..., go test -c -o ...), place them in bin/ rather than /tmp — bin/ is gitignored and within the project's trusted directory. macOS security may block execution of binaries built outside the project tree. go generate ./... is triggered by //go:generate directives in pkg/cmd/root.go: - Generates pkg/cmd/resources_cmds.go from OpenAPI spec → CLI resource commands - Generates pkg/proxy/events_list.go → list of Stripe event types - Generates pkg/requests/stripe_version_header.go →…
- Commits and pushes
Trending
More talk lately.about the whole repository
Who's talking about stripe/stripe-cli
- csauvage/stripe-generator“Could you change npm package name?”GitHub · Sep 11, 2019 · 5 reactions
- A Hacker News story“Stripe CLI – A command-line tool for Stripe”Hacker News · Oct 9, 2019 · 3 points
- stripe/vscode-stripe“[WIP] Add ability to create and execute Stripe fixtures”GitHub · Apr 20, 2020 · 2 reactions
- pascalandy/skills“🧰 skill: git-local: run on Linux and macOS with the cache path from fleet”GitHub · Oct 4, 2026 · 1 reactions
- NixOS/nixpkgs“stripe-cli: 1.37.1 -> 1.37.2”GitHub · Oct 2, 2025 · 1 reactions
The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 27
Talked about on GitHub and Hacker News (27 times).
On GitHub · 26
- Sep 11, 2019Could you change npm package name? — csauvage/stripe-generator5 reactions · 2 comments
- Apr 20, 2020[WIP] Add ability to create and execute Stripe fixtures — stripe/vscode-stripe2 reactions · 2 comments
- Oct 4, 2026🧰 skill: git-local: run on Linux and macOS with the cache path from fleet — pascalandy/skills1 reaction · 6 comments
- Oct 2, 2025stripe-cli: 1.37.1 -> 1.37.2 — NixOS/nixpkgs1 reaction · 10 comments
- Jun 28, 2023Allow forwarding to self-signed TLS hosts — gocardless/cli-releases1 reaction
21 more on GitHub
- Feb 8, 2021Allow user to easily skip https verification on `listen` command — stripe/vscode-stripe1 reaction
- Oct 15, 2020Stripe CLI — NixOS/nixpkgs1 reaction · 1 comment
- Sep 30, 2026stripe-cli 1.52.2 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 29, 2026stripe-cli 1.52.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 26, 2026🐛 Fixed local startup with Stripe CLI enabled — TryGhost/Ghost0 reactions · 2 comments
- Sep 24, 2026stripe-cli 1.52.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 21, 2026stripe-cli 1.51.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 18, 2026stripe-cli 1.51.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 10, 2026stripe-cli 1.50.11 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 2, 2026stripe-cli 1.50.10 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 2, 2026stripe-cli 1.50.9 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 1, 2026stripe-cli 1.50.8 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 15, 2026chore(deps-dev): bump @stripe/cli from 1.43.6 to 1.45.2 — StartlineAU/startline-web-app0 reactions · 1 comment
- Jul 6, 2026stripe-cli: 1.43.2 -> 1.52.0 — NixOS/nixpkgs0 reactions · 10 comments
- Sep 5, 2025docker install not working on m1 mac — offbyone/asdf-stripe0 reactions
- Dec 24, 2023Dependency Dashboard — thefarmhub/farmhub-cli0 reactions
- Jun 4, 2022stripe@1.10.3: hash check failed — stripe/scoop-stripe-cli0 reactions · 2 comments
- Mar 9, 2022x/vulndb: potential Go vuln in github.com/stripe/stripe-cli: CVE-2022-24753 — jba/nested-modules0 reactions
- Feb 24, 2021stripe@1.5.9: hash check failed — stripe/scoop-stripe-cli0 reactions
- Feb 27, 2020[DeepDive] Integrating web app payments/authentication (Stripe, AWS Cognito, etc) — 0xdevalias/devalias.net0 reactions
- Nov 25, 2019stripe@1.2.2: hash check failed — stripe/scoop-stripe-cli0 reactions
On Hacker News · 1
- Oct 9, 2019Stripe CLI – A command-line tool for Stripe3 points
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
When building temporary binaries with Go tooling directly (e.g.
- Very specific: line 54
If direnv isn't installed, you can fallback by setting GH_HOST on all gh commands:
- Very specific: line 64
Error handling: Use typed errors (e.g., RequestError), check with errors.As.
- Very specific: line 65
Testing: Use testify/assert and testify/require.
- Very specific: line 92
Default value is "master" for dev builds.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Build & Test Commands
make build # Build binary (runs go generate first)
make test # Run tests with race detector and coverage
make lint # Run golangci-lint v2
make fmt # Format with gofmt + goimports
make ci # Full CI: build-all-platforms + test + go-mod-tidy + protoc-ci
make protoc # Regenerate all protobuf code
make setup # Download Go modules
go build ./... # Quick compilation check
go vet ./... # Static analysisWhen building temporary binaries with Go tooling directly (e.g. go build -o ..., go test -c -o ...),
place them in bin/ rather than /tmp — bin/ is gitignored and within the project's trusted directory.
macOS security may block execution of binaries built outside the project tree.
Project Structure
cmd/stripe/main.go- Entry pointpkg/cmd/- All CLI commands (Cobra).root.goregisters everythingpkg/cmd/resources_cmds.go- Auto-generated from OpenAPI spec (do not edit manually)pkg/proxy/events_list.go- Auto-generated event type listpkg/gen/- Code generation logic and templates (gen_resources_cmds.go,gen_events_list.go)api/openapi-spec/- OpenAPI specs consumed by code generationrpc/- Protobuf definitions and generated gRPC codepkg/plugins/- HashiCorp go-plugin based plugin systempkg/proxy/- Webhook forwarding proxy (stripe listen)pkg/websocket/- WebSocket client for live event streamingpkg/rpcservice/- gRPC server for external integrationspkg/requests/- HTTP request building and Stripe API interactionpkg/stripe/- Low-level Stripe HTTP clientpkg/fixtures/- Declarative test data creationpkg/config/- CLI configuration managementpkg/login/- Authentication flows.goreleaser/- Per-platform release configs (linux, mac, windows)
Code Generation
go generate ./... is triggered by //go:generate directives in pkg/cmd/root.go:
- Generates
pkg/cmd/resources_cmds.gofrom OpenAPI spec → CLI resource commands - Generates
pkg/proxy/events_list.go→ list of Stripe event types - Generates
pkg/requests/stripe_version_header.go→ API version constants
Templates live in pkg/gen/*.go.tpl. Build tags gen_resources and events_list gate the generators.
GitHub CLI
GH_HOST should be github.com to ensure gh commands target public GitHub, not GitHub Enterprise. This should already be configured through .envrc. If GH_HOST isn't yet showing github.com, then run direnv allow.
If direnv isn't installed, you can fallback by setting GH_HOST on all gh commands:
GH_HOST=github.com gh pr create ...
GH_HOST=github.com gh pr view ...Key Conventions
- Import ordering: stdlib, then external packages, then
github.com/stripe/stripe-cli/...(enforced by goimports with local-prefixes) - Error handling: Use typed errors (e.g.,
RequestError), check witherrors.As. User-facing errors go to stderr - Testing: Use
testify/assertandtestify/require. Mock HTTP withhttptest.NewServer. Mock filesystem withspf13/afero - Naming: snake_case files, PascalCase exported types, generated files have
// This file is generated; DO NOT EDIT.header - Indentation: Tabs for Go, 2-space for JSON/YAML/Markdown
Architecture Notes
Command types:
- Manual commands in
pkg/cmd/*.go(login, listen, trigger, etc.) - Auto-generated resource commands from OpenAPI (
stripe customers create,stripe billing meters list, etc.) - Plugin commands loaded dynamically at startup
Request flow: Cobra command → pkg/requests/base.go request builder → pkg/stripe/client.go HTTP client → response handler → output
Two API styles: v1 (form-encoded params) and v2 (JSON body). The --stripe-version and content-type headers differ accordingly.
Build tags: dev, localdev (plugin dev mode), gen_resources, events_list
Linting
golangci-lint v2 config is in .golangci.yml. Enabled linters include staticcheck, govet, unused, ineffassign, misspell, dupl, and others. The resources_cmds.go file is excluded from dupl checks. Several staticcheck style checks (ST*, QF*) are suppressed.
Version Injection
GoReleaser sets the version at build time via:
-ldflags "-s -w -X github.com/stripe/stripe-cli/pkg/version.Version={{.Version}}"Default value is "master" for dev builds.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

