Use CC Switch to manage Claude Code and Codex proxy configs
Use CC Switch to manage API proxy providers, Base URLs, API keys, config switching, and sync for Claude Code, Codex, and other AI coding CLIs.
What problem it solves
If you only use Claude Code and connect it to one provider, manually setting environment variables is enough.
Tools such as CC Switch are useful when your setup is more complex:
- You use Claude Code, Codex, Gemini CLI, OpenCode, or similar tools at the same time
- You often switch between official accounts, API proxy providers, and local models
- You want to manage providers, API keys, Base URLs, MCP, prompts, and skills in one place
- You want to reduce manual edits to
settings.json,config.toml, and shell profiles
It is not a new AI coding tool. It is a local control panel for AI coding CLIs.
Recommended workflow
Do not import a large pile of configuration on day one. A steadier workflow is:
- First run the minimal Claude Code or Codex setup manually.
- Confirm the Base URL, API key, and model name all work.
- Add that working configuration to CC Switch.
- After each switch, reopen the relevant CLI or terminal session and confirm the config is active.
This way, when something fails, you can tell whether the provider API is broken or the switching tool did not sync correctly.
Fields to check
- Provider name: for your own reference; include the provider and protocol.
- Base URL: follow the provider documentation exactly, especially around
/v1. - API Key / Token: distinguish OpenAI keys, Anthropic keys, and Bearer tokens.
- Model name: do not assume aliases such as
claude-sonnetorgpt-5are always available. - Target tool: the same provider may work for Claude Code but not for Codex.
A useful principle
Switching tools manage configuration. They do not guarantee API compatibility. Whether a setup works still depends on whether the provider supports the protocol, model, and streaming behavior required by that CLI.