ccswitch save
Synopsis
Section titled “Synopsis”ccswitch save <name> --type <login|api-key|bedrock|bedrock-key|custom> [--force]Description
Section titled “Description”Captures whatever Claude Code is currently configured with and saves it as a named profile — without going through the interactive wizard.
What it reads depends on --type:
| Type | Source |
|---|---|
login |
Live .credentials.json from keychain |
api-key |
ANTHROPIC_API_KEY from settings.json |
bedrock |
CLAUDE_CODE_USE_BEDROCK, AWS_PROFILE, AWS_REGION from settings |
bedrock-key |
AWS_BEARER_TOKEN_BEDROCK from the environment |
custom |
ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and any model overrides from settings.json |
--type custom is the one case where save writes as well as reads: the token is moved into the OS secret store and the plaintext copy is deleted from settings.json, so it can’t outlive a later switch. Run ccswitch <name> afterwards to activate the profile and restore the token.
Options
Section titled “Options”| Option | Description |
|---|---|
--type <type> |
Required. Auth type to snapshot |
--force |
Overwrite an existing profile with the same name |
Examples
Section titled “Examples”ccswitch save work --type api-keyccswitch save bedrock-prod --type bedrock-keyccswitch save deepseek --type customccswitch save personal --type login --forceRelated
Section titled “Related”- ccswitch add — interactive guided setup
This site uses GoatCounterfor page counts — no cookies, no personal data, no tracking across sites.