CC Switch
Manage and switch RuToken provider settings for Claude Code, Codex and Gemini CLI from one desktop app.
CC Switch is an open-source, cross-platform manager for AI coding CLIs. It switches provider configurations for Claude Code, Codex and Gemini CLI in one click, and also manages MCP servers, system prompts (CLAUDE.md, AGENTS.md, GEMINI.md) and skills — no manual editing of environment variables or config files.
Prerequisites
- An API key: open the console, go to API Keys and create a dedicated key.
- The CLI you want to use (Claude Code, Codex or Gemini CLI) is installed — see Claude Code and Codex CLI.
Installation
brew tap farion1231/ccswitch
brew install --cask cc-switch
paru -S cc-switch-bin
On Windows, download the .msi installer or the portable .zip; on other Linux distributions, the .deb or .AppImage — all from GitHub Releases. Launch CC Switch once after installing so the system registers its ccswitch:// link handler.
For headless servers there is a web version (default address http://localhost:17666) and a CLI version.
Configuration
Option A: one-click import (recommended)
-
In the console, open API Keys.
-
Open the actions menu of the key you want to use and choose CC Switch.
-
In the Import to CC Switch dialog fill in:
Field Value Application Claude,CodexorGeminiName any label, e.g. My ClaudePrimary Model required — the default model Haiku / Sonnet / Opus Model optional, Claude only — models for each tier -
Click Open CC Switch, allow the browser to open the app and confirm the import.
The endpoint is filled in automatically: https://rutoken.ai for Claude and Gemini, https://rutoken.ai/v1 for Codex.
Option B: manual setup
In CC Switch, select the target app at the top, click + (Add Provider), choose Custom and enter:
| App | Endpoint / Base URL | API key |
|---|---|---|
| Claude Code | https://rutoken.ai |
sk-xxxx |
| Codex | https://rutoken.ai/v1 |
sk-xxxx |
| Gemini CLI | https://rutoken.ai |
sk-xxxx |
Set the model names to IDs from the Model Square, save, then click Enable on the new provider.
Verify
After enabling the provider, open a new terminal and start the CLI (claude, codex or gemini). Send a short prompt; the request should appear in the console under Usage Logs. CC Switch's built-in speed test can also check that the endpoint is reachable.
Troubleshooting
| Symptom | Fix |
|---|---|
| Clicking CC Switch does nothing | Install and launch the desktop app once so ccswitch:// links are registered, then try again. |
401 / invalid API key |
Re-import with the correct key, or edit the provider and paste the full key. |
404 / not found |
Claude and Gemini use https://rutoken.ai; Codex needs https://rutoken.ai/v1. |
| Model not found | Select models that exist in the Model Square and are allowed for the key. |
| CLI still uses the old provider | Restart the CLI in a new terminal after switching providers. |