API key
An api-key profile stores an Anthropic API key (sk-ant-…). Claude Code reads it via the apiKeyHelper mechanism on global switch, or ANTHROPIC_API_KEY env var for per-shell.
When to use
Section titled “When to use”- You have an API key from console.anthropic.com
- You want different keys for different projects or billing contexts
ccswitch add# choose "API key", paste your keyOr snapshot from current settings:
ccswitch save work --type api-keyLiveness check
Section titled “Liveness check”On global switch, ccswitch probes the Anthropic API to verify the key is valid. If it returns 401, you’ll see an error. Skip with --no-check.
What gets stored
Section titled “What gets stored”- API key → OS keychain
- On global switch:
settings.jsongets anapiKeyHelpercommand that reads the key from the keychain at runtime
This site uses GoatCounterfor page counts — no cookies, no personal data, no tracking across sites.