CC-Switch Setup
CC-Switch is a desktop tool for managing Claude Code, Codex CLI and Gemini CLI configurations in one place. It suits anyone who switches between providers often, or who would rather manage CLI configuration through a GUI than by hand.
The settings below are already arranged the way RouterBus expects.
When this helps
- You use Claude Code, Codex CLI and Gemini CLI side by side
- You do not want to edit environment variables or config files by hand
- You switch between API providers often
Prerequisites
- CC-Switch installed
- An API key created on RouterBus
- At least one CLI tool installed
- The commands you plan to use (
claude,codex,gemini) are on your PATH
The fastest route: one-click import from the console
If you already have a RouterBus API key, there is no need to fill anything in by hand:
- Sign in and open the API Keys page
- Choose CC Switch from the key's action menu
- Pick the tool to configure (Claude / Codex / Gemini) and a default model
- Confirm — the browser hands off to CC-Switch with the address and key already filled in
If nothing opens (CC-Switch is not installed, or the URL scheme is not registered), add the provider manually as described below.
Installing CC-Switch
Downloads:
- GitHub Releases: https://github.com/farion1231/cc-switch/releases
Common installation methods:
- Windows: download the
.msifrom the Releases page and run it - macOS:
brew tap farion1231/ccswitch
brew install --cask cc-switch- Linux: download the package matching the latest version on the Releases page
wget https://github.com/farion1231/cc-switch/releases/latest/download/cc-switch_x.x.x_amd64.deb
sudo dpkg -i cc-switch_x.x.x_amd64.debTIP
x.x.x is a placeholder — use the actual version and filename from the GitHub Releases page.
Before you start
A few habits that make troubleshooting easier:
- Use a separate API key for Claude Code, Codex and Gemini
- To just prove connectivity first, a single key with no model restrictions is fine
- In CC-Switch, prefer "custom provider" or manual configuration
That keeps each tool's RouterBus address and key independent of the others.
Claude Code
In CC-Switch, open the Claude Code configuration page and add a custom provider, named something like RouterBus-Claude.
Where the interface offers these fields:
- Base URL:
https://www.routerbus.com - Auth Token / API Key: your RouterBus API key
Save it, then make that provider the active configuration.
Codex CLI
Open the Codex (or OpenAI) configuration page and add a custom provider, named something like RouterBus-Codex.
Where the interface offers these fields:
- Base URL / API URL:
https://www.routerbus.com/v1 - API Key: your RouterBus API key
WARNING
OpenAI-compatible tools like Codex normally require the address to end in /v1. Entering https://www.routerbus.com alone tends to produce wrong request paths or connection failures.
Gemini CLI
Open the Gemini configuration page and add a custom provider, named something like RouterBus-Gemini.
Fill in:
- Base URL / Endpoint:
https://www.routerbus.com/v1beta - API Key: your RouterBus API key
The Base URL is required
With only an API key set, Gemini tools send requests to Google's own endpoint, where a RouterBus key is not valid. If your version of CC-Switch has no such field, use the environment variables in Gemini CLI Setup instead.
Verifying a switch
Check each provider right after configuring it.
Claude Code
claude "hello"Codex CLI
codex "hello"Gemini CLI
gemini "hello"A normal response means CC-Switch has applied that configuration.
Troubleshooting
The command still uses the old configuration
Quit the terminal completely and open a new window. Some CLIs cache environment variables or configuration for the life of the session.
401 / Invalid API Key
Usually one of:
- The key is mistyped
- The key has been disabled or deleted
- The key's model limits exclude the model being requested
- The account balance has run out
Codex cannot connect
Check first:
- That the Base URL is
https://www.routerbus.com/v1 - That the API key went into the OpenAI / Codex configuration, not another tool's
There is no RouterBus preset
That is expected — create a custom provider instead.
Configuring from the command line instead
If you would rather not use CC-Switch:
Reference
- CC-Switch Releases: https://github.com/farion1231/cc-switch/releases