Switching Claude Code providers usually means changing env vars, endpoints, models, and launcher scripts by hand. ccswitch gives you one install and one command pattern across Claude, Z.AI, Kimi, Alibaba, OpenRouter, local backends, China endpoints, and many other Anthropic-compatible providers.
- Installation
- Core Usage
- Provider Reference
- Troubleshooting
- VS Code Integration
- Platform Support
- Under the Hood
- Contributors
- Star History
- License
# 1. Install Claude Code CLI
curl -fsSL https://claude.ai/install.sh | bash
# 2. Install ccswitch via tap
brew tap cursedpotential/tap
brew install ccswitch
# 3. Start using it — all launchers are ready immediately
ccswitch-native # Use your Claude Pro/Max/Team subscription
ccswitch-zai # Z.AI (GLM-5)
ccswitch-zai --yolo # Skip permission prompts
ccswitch-kimi # Kimi (kimi-k2.5)
ccswitch config # Configure providersAll ccswitch-* provider launchers are installed directly into $(brew --prefix)/bin by the formula — no extra setup needed. brew upgrade ccswitch keeps everything up to date.
Update:
ccswitch update # routes to brew upgrade under Homebrew
# or equivalently:
brew upgrade ccswitch# 1. Install Claude Code CLI
curl -fsSL https://claude.ai/install.sh | bash
# 2. Install ccswitch
curl -fsSL https://raw.githubusercontent.com/cursedpotential/ccswitch/main/scripts/install.sh | bash
# 3. Start using it
ccswitch-native # Use your Claude Pro/Max/Team subscription
ccswitch-zai # Z.AI (GLM-5)
ccswitch-zai --yolo # Skip permission prompts
ccswitch-kimi # Kimi (kimi-k2.5)
ccswitch-ollama --model qwen3-coder # Local with Ollama
ccswitch config # Configure providersUpdate:
ccswitch update # downloads and installs latest release# 1. Install Claude Code CLI
# Follow the official Claude Code Windows installation instructions
# 2. Install ccswitch via Git Bash
curl -fsSL https://raw.githubusercontent.com/cursedpotential/ccswitch/main/scripts/install.sh | bash
# Or install from source (requires Go)
go install ./cmd/ccswitch
ccswitch install
# 3. Start using it
ccswitch-native # Use your Claude Pro/Max/Team subscription
ccswitch-zai # Z.AI (GLM-5)
ccswitch-zai --yolo # Skip permission prompts
ccswitch-kimi # Kimi (kimi-k2.5)
ccswitch config # Configure providersUpdate:
ccswitch update # downloads and installs latest releaseThis installs:
ccswitchccswitch-*provider launchers- resume compatibility for
claude --resume ...
By default, ccswitch installs launchers to:
- the same directory as your existing
claudebinary, whenclaudeis already onPATH - otherwise macOS:
~/bin - otherwise Linux:
~/.local/bin(XDG standard)
If the chosen bin directory is not on PATH, ccswitch install prints a warning with the exact directory to add.
You can override this with --bin-dir or the CCSWITCH_BIN environment variable:
# Using --bin-dir flag
curl -fsSL https://raw.githubusercontent.com/cursedpotential/ccswitch/main/scripts/install.sh | bash -s -- --bin-dir ~/.local/bin
# Using environment variable
export CCSWITCH_BIN="$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/cursedpotential/ccswitch/main/scripts/install.sh | bashccswitch keeps claude --resume ... working with ccswitch features after install.
| Command | Description |
|---|---|
ccswitch config [provider] |
Configure provider |
ccswitch list |
List profiles |
ccswitch info <provider> |
Show provider details |
ccswitch test |
Test connectivity |
ccswitch status |
Installation status |
ccswitch install |
Install/update ccswitch (create/refresh symlinks) |
ccswitch update |
Update to latest version |
ccswitch uninstall |
Remove everything |
ccswitch updateRoutes to brew upgrade ccswitch under Homebrew, or downloads the latest release for curl installs. Also refreshes provider symlinks.
Each provider launcher comes with a default model (for example glm-5 for Z.AI). You can override it in two ways:
# One-time: pass --model through to Claude CLI
ccswitch-zai --model glm-4.7
# Permanent: configure the provider and pick a different default
ccswitch config zaiUse ccswitch info <provider> to inspect the resolved model.
ccswitch keeps the resume command printed by Claude Code working across providers.
After a provider-launched session, ccswitch also prints a provider-aware reopen command such as:
ccswitch-kimi --resume <session-id>When resuming a non-Claude session into native Claude, ccswitch temporarily sanitizes incompatible non-Claude thinking blocks for the duration of that single launch, then restores the original session file afterwards.
| Command | Provider | Model | API Key |
|---|---|---|---|
ccswitch-native |
Anthropic | Claude | Your subscription |
ccswitch-zai |
Z.AI | GLM-5 | z.ai |
ccswitch-minimax |
MiniMax | MiniMax-M2.7 | minimax.io |
ccswitch-kimi |
Kimi | kimi-k2.5 | kimi.com |
ccswitch-moonshot |
Moonshot AI | kimi-k2.5 | moonshot.ai |
ccswitch-deepseek |
DeepSeek | deepseek-chat | deepseek.com |
ccswitch-mimo |
Xiaomi MiMo | mimo-v2-pro | xiaomimimo.com |
ccswitch-alibaba |
Alibaba Coding Plan | qwen3.5-plus | modelstudio |
ccswitch-alibaba-us |
Alibaba Coding Plan (US) | qwen3.5-plus | modelstudio |
OpenRouter launchers follow the ccswitch-or-<alias> naming pattern.
For example, if you alias moonshotai/kimi-k2.5 to kimi-k25, the launcher becomes ccswitch-or-kimi-k25.
ccswitch config openrouter # Set API key + add models
# Example: alias moonshotai/kimi-k2.5 as kimi-k25
ccswitch-or-kimi-k25 # Use itTip: Find model IDs on openrouter.ai/models — click the copy icon next to any model name.
If a model doesn't work as expected, try the
:exactovariant (e.g.moonshotai/kimi-k2-0905:exacto) which provides better tool calling support.
| Command | Provider | Endpoint |
|---|---|---|
ccswitch-zai-cn |
Z.AI China | open.bigmodel.cn |
ccswitch-minimax-cn |
MiniMax China | api.minimaxi.com |
ccswitch-ve |
Volcengine | ark.cn-beijing.volces.com |
ccswitch-alibaba-cn |
Alibaba China | coding.dashscope.aliyuncs.com |
| Command | Provider | Port | Setup |
|---|---|---|---|
ccswitch-ollama |
Ollama | 11434 | ollama.com |
ccswitch-lmstudio |
LM Studio | 1234 | lmstudio.ai |
ccswitch-llamacpp |
llama.cpp | 8000 | github.com/ggml-org/llama.cpp |
# Ollama
ollama pull qwen3-coder && ollama serve
ccswitch-ollama --model qwen3-coder
# LM Studio
ccswitch-lmstudio --model <model>
# llama.cpp
./llama-server --model model.gguf --port 8000 --jinja
ccswitch-llamacpp --model <model>ccswitch config custom
ccswitch-myprovider # ReadyAll Alibaba variants (alibaba, alibaba-us, alibaba-cn) share the same API key and support these models:
| Model |
|---|
qwen3.5-plus (default) |
kimi-k2.5 |
glm-5 |
MiniMax-M2.5 |
qwen3-coder-next |
qwen3-coder-plus |
qwen3-max-2026-01-23 |
glm-4.7 |
Switch models with --model:
ccswitch-alibaba --model kimi-k2.5
ccswitch-alibaba --model glm-5
ccswitch-alibaba-cn --model qwen3-coder-next| Problem | Solution |
|---|---|
claude: command not found |
Install Claude CLI first |
ccswitch: command not found |
Run ccswitch status to see the installed bin dir, then add that directory to PATH and restart your shell |
claude --resume ... does not behave like ccswitch |
Restart your shell, then run ccswitch install again |
--yolo is not recognized |
Restart your shell, then run ccswitch install again |
API key not set |
Run ccswitch config |
ccswitch works with the official Claude Code extension.
Use Claude Code extension 2.6+.
To configure it:
- Open VS Code Settings (
Cmd+,orCtrl+,). - Search for "Claude Process Wrapper" (
claudeProcessWrapper). - Set it to the full path of your chosen launcher:
- macOS:
/Users/yourname/bin/ccswitch-zai - Linux:
/home/yourname/.local/bin/ccswitch-zai - Windows:
C:\Users\yourname\bin\ccswitch-zai.cmd
- macOS:
- Reload VS Code.
Note: Requires ccswitch v2.6+ (which handles non-interactive shell output correctly).
macOS (zsh/bash) • Linux (zsh/bash) • Windows (PowerShell/Git Bash)
ccswitch is a single Go binary. The installer downloads the release artifact,
installs ccswitch into your bin directory, then creates:
ccswitch-*symlinks for providers- a
claudeshim symlink for resume compatibility
At runtime, the binary resolves the selected profile from its own invocation name, loads config and secrets, sets the required Anthropic-compatible environment variables, then launches the real Claude binary outside the ccswitch bin directory.
Example for ccswitch-zai:
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="$ZAI_API_KEY"
exec /path/to/the/real/claude "$@"API keys stored in ~/.local/share/ccswitch/secrets.env (chmod 600).
--yolo is accepted by ccswitch launchers and by the ccswitch claude shim as
shorthand for --dangerously-skip-permissions.
Test the binary installer locally against a local directory or server:
CCSWITCH_RELEASE_BASE_URL=http://127.0.0.1:8000 \
./scripts/install.sh install- @darkokoa — China endpoints
- @RawToast — Kimi endpoint fix
- @sammcj — Security hardening
- @aprakasa — Linux compatibility fixes in
load_secrets() - @luciano-fiandesio — Install directory improvement (issue)
MIT © jolehuit

