Merged
Conversation
Adds an offline auth state command for use in scripts and agent workflows. Reads credentials from config file and keychain without making any API calls. - Reports active profile, key availability + expiry, and API version - Classifies --api-key / STRIPE_API_KEY overrides by key prefix (sk_test_ / sk_live_) rather than reporting both modes as available - Exits non-zero when not authenticated, enabling `stripe whoami || stripe login` - Supports --json for stable structured output suitable for machine consumption Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Committed-By-Agent: claude
This was referenced Mar 25, 2026
Standardize with other commands (listen, logs tail) that use --format for output format selection. --format json produces identical output; the flag change makes the interface consistent across the CLI. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Committed-By-Agent: claude
tomer-stripe
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reviewers
r? @
cc @stripe/developer-products
Summary
Adds
stripe whoami, an offline command that reports the current auth statewithout making any API calls. Intended for use in scripts and agent workflows
as a pre-flight check before running authenticated commands.
Text output:
JSON output (
--json):{ "authenticated": false, "profile_name": "default", "device_name": "my-macbook", "test_mode_key": { "available": false, "expires_at": null }, "live_mode_key": { "available": false, "expires_at": null }, "api_version": "2026-02-25.clover", "preview_api_version": "2026-02-25.preview" }Details:
stripe whoami || stripe login--api-key/STRIPE_API_KEYoverrides are classified by key prefix (sk_test_/sk_live_) so only the correct mode shows as available--jsonschema is stable:test_mode_keyandlive_mode_keyalways present regardless of auth state