CC Switch for Claude Code: the install, the safe two-key setup, and the catch
The short version
CC Switch is a free desktop app (a normal window app for Mac, Windows and Linux, not something you type into the Terminal) that edits Claude Code's settings for you. Its README puts it this way: "Switch API providers in one click … no more hand-editing JSON / TOML / YAML config files." It has 147,655 GitHub stars, is MIT-licensed, and was built by Jason Young (GitHub: farion1231). It is not made by Anthropic. The use in this guide is the safe one: you have two of your own Anthropic API keys, one for work and one for your side projects, and you want Claude Code to use the right one without opening a hidden settings file. An API key is a password that bills you: every request Claude Code makes with it is charged to the account that owns it. Below: how to install it on your computer, the exact form to fill for each key, how to switch, how to check which key is live, and the part of the app to stay away from. Source: CC Switch's README and user manual on GitHub (https://github.com/farion1231/cc-switch), and Anthropic's Claude Code docs (https://code.claude.com/docs), checked 23 Oct 2026.
| What | The number |
|---|---|
| GitHub stars | 147,655 (checked 23 Oct 2026) |
| Price and licence | Free, MIT |
| Your own Anthropic keys in this setup | 2: work and personal |
| Clicks to switch key | 1, no Claude Code restart |
| Back to your Claude login | Restart Claude Code + /login |
| Settings files you open by hand | 0 |
| Relays you should use | 0 |
First: what you need
- Claude Code, already installed and working.
- Two Anthropic API keys from the Claude Console (https://platform.claude.com): your work key (from your company's Console account; ask whoever runs it) and your personal key (from your own Console account). Each key bills its own account. API keys are pay-per-use and separate from a Claude Pro or Max subscription.
- Download CC Switch only from its GitHub page, Homebrew, or its site ccswitch.io. The README calls ccswitch.io "The Only Official Website", which tells you copies exist.
Step 1: install the app
Exactly as the README states, per computer:
- Mac (macOS 12 Monterey or newer). Recommended, with Homebrew:
To update it later:brew install --cask cc-switchbrew upgrade --cask cc-switch. Or downloadCC-Switch-v{version}-macOS.dmgfrom the Releases page (https://github.com/farion1231/cc-switch/releases). The README says the Mac app is "code-signed and notarized by Apple", so it opens directly. - Windows (Windows 10 or newer): download
CC-Switch-v{version}-Windows.msi(the installer) or the-Windows-Portable.zipfrom the Releases page. On a Windows on ARM laptop, take the-Windows-arm64.msi. - Linux (x86_64 or ARM64, glibc 2.35+ and WebKitGTK 4.1, e.g. Ubuntu 22.04+, Debian 12+): from the Releases page,
.debfor Debian/Ubuntu,.rpmfor Fedora, or.AppImagefor any distro that meets those requirements. On Arch Linux the README recommendsparu -S cc-switch-bin.
Open it once. On first launch it imports your current Claude Code setup as a provider called default and adds a
Claude Official card (your normal Claude login), "so nothing you had configured is lost" (README). Before it rewrites
Claude Code's settings file for the first time, it also saves the original to ~/.cc-switch/backups/live-first-write/.
Step 2: add your two keys (Custom Configuration)
CC Switch calls each set of settings a provider. There is no preset named for a plain Anthropic API key, so you use Custom Configuration. Do this twice, once for the work key and once for the personal key:
- Select Claude Code in the left sidebar, then click + (Add Provider) at the top right.
- On the preset page, pick Custom Configuration (the user manual says it always sits at the top of "All"). Don't pick anything else from that list.
- Fill the form:
- Provider Name: something you'll recognise in a menu, like
Work keyorPersonal key. - API Key: paste the key for that account.
- API Endpoint: Anthropic's own address,
https://api.anthropic.com. Nothing else. A different address here means your requests go to someone else's server. - Website URL and Notes: optional.
- Provider Name: something you'll recognise in a menu, like
- Click Add.
To be plain about it: the README itself only says "Choose a preset or create a custom configuration"; it doesn't list the
form's fields. The field names above come from the app's English text, and CC Switch's user manual
(docs/user-manual/en/2-providers/2.1-add.md) describes the custom setup as a JSON editor whose Claude settings are
ANTHROPIC_API_KEY (required) and ANTHROPIC_BASE_URL (optional). If you see the JSON view, it should read:
{
"env": {
"ANTHROPIC_API_KEY": "your-work-key",
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
}
}
The editor shows what Claude Code's settings file will look like after the switch, so check it before you save. We haven't clicked through the form end to end, so labels in your version may differ slightly.
Step 3: switch between your keys
Two ways (README Quick Start):
- Main window: on the Claude Code page, select a provider and click Enable. The live one shows In Use.
- Menu bar (tray): click the CC Switch icon, open the Claude Code row, click
Work keyorPersonal key. The row's title shows the provider in use.
Between your two keys, Claude Code needs no restart. README: "Claude Code needs no restart"; its FAQ calls this
"hot-switching". The first time Claude Code sees a new API key it may ask whether to use it: say yes, once. (Anthropic's
docs: "you are prompted once to approve or decline the key, and your choice is remembered"; to change it later, use the
"Use custom API key" toggle in /config.)
Going back to your Claude subscription login
If you also pay for Claude Pro or Max and sometimes want that instead of a key, it is not one click. README, step 4: "Switch to the built-in official provider in the list (e.g. 'Claude Official'), restart the tool, then follow its login/OAuth flow." So:
- Click Claude Official in CC Switch.
- Quit Claude Code and start it again (
claude). - If it asks, log in with
/login.
That's why this guide is built on two keys: key to key is instant; key to subscription needs a restart and a login.
How to check which one is active
- In Claude Code: type
/status. It shows which credential Claude Code is using: an API key or your Claude login. Anthropic's docs: when a login and an API key are both configured, "/statusmarks the credential that isn't in use." - In CC Switch: the card marked In Use, or the provider named in the Claude Code row of the menu-bar menu.
- To see which key is billing, open the Usage page of each account in the Claude Console after a request or two.
The catch
- The preset list includes relays. Don't use them. The README lists "90+ provider presets including … community relays". A relay is a middleman that resells access to AI models: your prompts and your code pass through a stranger's server before they reach the AI, and you have no idea what's kept. Some relays resell Claude subscription capacity, which Anthropic's terms forbid: third parties may not "route requests through Free, Pro, or Max plan credentials" or "collect, store, or intermediate Claude.ai credentials or session tokens" (Claude Code legal page, linked below).
- The README is sponsored by relay sellers. Most of the sponsor block at the top of the README is for relay and "up to 90% off" API resellers, with discount links. That's how the project earns money. It isn't advice.
- Skip the Accounts tab. It signs into other companies' subscriptions to use them inside Claude Code; the README itself says this "may violate the vendor's terms of service; assess the risk yourself". Not for week one.
- Leave the Routing and Aggregation tabs alone. They send Claude Code's requests through extra machinery and other companies' models. For two Anthropic keys you only need the plain (Direct) setup above.
- Your keys sit on your computer. CC Switch stores them in
~/.cc-switch/cc-switch.db(README FAQ). Treat that folder like a password file; don't put it in a shared or public cloud folder. - It's busy. It manages eleven tools, has three modes, and had over 1,000 open issues and pull requests on GitHub on 23 Oct 2026. You only need the Claude Code page.
For builders
- Same idea without any app: Anthropic's docs show one config folder per account with
CLAUDE_CONFIG_DIR, e.g.alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'. Each folder keeps its own settings, history and login or key. - Switching only replaces the connection lines (endpoint, key, model); your plugins, hooks, permissions and MCP settings stay as they are (README FAQ).
- If you pick a model with
/modelinside Claude Code, the next switch puts back the model saved in that provider (README FAQ).
Sources
- CC Switch repo and README: https://github.com/farion1231/cc-switch (checked 23 Oct 2026; 147,655 stars, MIT, latest release v4.0.18 on 21 Oct 2026)
- Releases (Windows, Mac, Linux downloads): https://github.com/farion1231/cc-switch/releases
- Add Provider, Custom Configuration fields: https://github.com/farion1231/cc-switch/blob/main/docs/user-manual/en/2-providers/2.1-add.md
- Switch Provider (tray, In Use, no restart): https://github.com/farion1231/cc-switch/blob/main/docs/user-manual/en/2-providers/2.2-switch.md
- Official site, per the README: https://ccswitch.io
- Anthropic, Claude Code authentication (API key approval,
/status, separate config folders): https://code.claude.com/docs/en/authentication - Anthropic, Claude Code legal and compliance (credential rules): https://code.claude.com/docs/en/legal-and-compliance
- Anthropic Consumer Terms: https://www.anthropic.com/legal/consumer-terms · Commercial Terms: https://www.anthropic.com/legal/commercial-terms
- Claude Console (create API keys): https://platform.claude.com