English | δΈζ
Claude Code API Switching Tool - Effortlessly manage multiple API providers and switch between them instantly. Supports running multiple simultaneous terminal sessions with different providers (e.g., DeepSeek in one, Kimi in another).
- π οΈ claude-code-tool (cct)
- Multi-session Support: Open multiple terminal windows and run Claude Code with different providers in each one simultaneously.
- Multi-provider Support: Easily switch between Anthropic official API and third-party compatible providers (DeepSeek, Kimi/Moonshot, Zhipu GLM, etc.)
- Custom Providers: Add and manage custom API providers
- Configuration Management: Create and manage multiple API configuration instances
- One-click Switching: Quickly activate different API configurations
- Launch & Run: Directly launch Claude Code with environment variables set for a specific configuration
Visit the Releases Page to download pre-compiled binaries for your platform:
- Linux x86_64:
cct-Linux-x86_64.tar.gz - macOS x86_64:
cct-Darwin-x86_64.tar.gz - macOS Apple Silicon:
cct-Darwin-aarch64.tar.gz - Windows x86_64:
cct-Windows-x86_64.zip
After downloading, unzip and add the binary to your system PATH.
Ensure you have the Rust toolchain (1.70+) installed, then run:
# Clone the repository
git clone https://github.com/punisher1/claude-code-tool.git
cd claude-code-tool
# Build release version
cargo build --releaseThe executable will be generated at target/release/cct (or cct.exe on Windows).
cct provider listcct provider add [name]
# Or use interactive mode
cct provider addcct provider rm <name>cct add -p <provider> -a <api_key> <alias>
# Example
cct add -p deepseek -a sk-xxx my-deepseekcct use <alias>
# Example
cct use my-deepseek# Start Claude Code with a specific configuration
cct start <alias>
# Example
cct start my-deepseek
# Start and pass arguments to claude
cct start my-deepseek -- -p "hello claude"
# Start and set proxy
cct start my-deepseek --proxy "http://127.0.0.1:11225"- Config File:
~/.cct/config.toml(macOS/Linux) or%USERPROFILE%\.cct\config.toml(Windows) - Claude Settings:
~/.claude/settings.json(macOS/Linux) or%USERPROFILE%\.claude\settings.json(Windows)
- claude-code - Anthropic Claude Code (Official)
- deepseek - DeepSeek API
- kimi-coding - Kimi for Coding (Moonshot API)
- zhipu - Zhipu GLM API
- xiaomi-mimo - Xiaomi Mimo Coding
- minimaxi-m2 - Minimax M2 Coding
Supports adding any third-party provider compatible with the Anthropic API format.
Environment variables in the configuration file support three types:
- String: For text values like URLs, API keys
- Int: For numeric configurations like timeouts, flags
- Bool: For true/false configuration options
Example configuration:
[providers.deepseek]
description = "DeepSeek API"
env.ANTHROPIC_BASE_URL = "https://api.deepseek.com"
env.ANTHROPIC_MODEL = "deepseek-chat"
env.API_TIMEOUT_MS = 3000000 # Integer type
env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = 1 # Integer flagcargo testcargo buildcargo build --releaseThe project uses GitHub Actions to automate the release process. To create a new version:
-
Create and push a tag:
git tag v0.1.0 git push origin v0.1.0
-
GitHub Actions execution:
- Builds binaries for Linux, macOS, and Windows
- Creates a GitHub Release
- Automatically generates Release Notes
- Uploads binaries and checksums for all platforms
-
Check results on the GitHub Release page:
- Auto-generated Release Notes (based on commit categories)
- Pre-compiled binaries for all platforms
- SHA256 checksum for each binary
The release workflow is configured in .github/workflows/release.yml.
cargo fmtcargo clippyMIT License
