ccswitch token
Synopsis
Section titled “Synopsis”ccswitch token <name>Description
Section titled “Description”Captures a long-lived OAuth token (via claude setup-token) for a login profile. This is required for per-shell switching with login profiles — without a token, ccswitch env <name> will refuse.
The token is stored in the OS secret store, not on disk.
Why is this needed?
Section titled “Why is this needed?”On all platforms, per-shell login switching works by exporting CLAUDE_CODE_OAUTH_TOKEN into the shell. The live keychain credential is a single global slot that can’t be scoped per-shell — so a separate captured token is needed.
Examples
Section titled “Examples”ccswitch token personal# → launches claude setup-token, stores result
ccuse personal# → now works (exports CLAUDE_CODE_OAUTH_TOKEN)Related
Section titled “Related”- Per-shell login token — troubleshooting
- macOS keychain caveat — why the keychain can’t be shared
This site uses GoatCounterfor page counts — no cookies, no personal data, no tracking across sites.