Adds login list and login switch commands and ability to maintain multiple logged in profiles#1433
Merged
jar-stripe merged 14 commits intomasterfrom Mar 20, 2026
Merged
Adds login list and login switch commands and ability to maintain multiple logged in profiles#1433jar-stripe merged 14 commits intomasterfrom
jar-stripe merged 14 commits intomasterfrom
Conversation
…login --switch to switch between them by name changes SaveLoginDetails to save the default profile before creating the new one
…y, so our login switching works
adds RemoveProfile call to SwitchProfile to remove the backup of the profile when it becomes the default modifies ListProfile to print the default profile, but only print each profile once
removes local launch profile
vcheung-stripe
approved these changes
Mar 20, 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
This PR adds the ability to manage multiple logged-in Stripe accounts in the CLI.
Related to #1135.
New commands:
stripe login list- Lists all logged-in accounts, indicating which is currently activestripe login switch <account>- Switches to a different logged-in accountHow it works:
The CLI stores each logged-in account as a "profile" in the config file. The
[default]profile is always the active one. When switching accounts:[default]is backed up using its display name as the key[default]When logging into a new account, the previous account's credentials are automatically preserved as a backup profile.
Key changes:
CopyProfile,ListProfiles,SwitchProfilemethods toConfiglogin listandlogin switchsubcommandsExample usage:
Tests:
TestCopyProfile/TestCopyProfileErrorsTestListProfiles/TestListProfilesEmptyTestRemoveProfileTestSwitchProfile