A comprehensive toolkit for installing, managing, and switching between AI models in Claude Code CLI.
Claude Code Manager (CCM) is a powerful management system for Claude Code CLI that enables seamless switching between multiple AI providers including Claude, Deepseek, GLM, KIMI, Qwen, LongCat, MiniMax, and Doubao. It simplifies installation, configuration, and model management through intuitive shell utilities.
- One-Command Installation: Automated installation script for Claude Code CLI
- Multi-Model Support: Switch between 10+ AI models with a single command
- Three Claude Modes: Pro Account, Official API, and Proxy - choose what works for you
- Account Management: Save and switch between multiple Claude Pro accounts (macOS only)
- Environment Configuration: Automatic shell environment setup
- API Key Management: Secure storage and configuration of API keys
- Convenient Aliases: Quick shortcuts for common operations
- Cross-Platform: Supports macOS and Linux (x64/ARM64)
⚠️ Note: Currently designed for macOS and Linux only. Windows is not supported.
| Provider | Model | Base URL |
|---|---|---|
| Claude Pro | via Keychain credentials | api.anthropic.com |
| Claude API | claude-sonnet-4-6 | api.anthropic.com |
| Claude Proxy | via third-party proxy | configurable |
| Deepseek | deepseek-v4-pro/flash | api.deepseek.com |
| GLM | glm-5.2 | open.bigmodel.cn |
| KIMI | kimi-k2.7-code | api.kimi.com |
| KIMI CN | kimi-k2.7-code | api.moonshot.cn |
| Qwen | qwen3-max | dashscope.aliyuncs.com |
| LongCat | LongCat-Flash-Thinking | api.longcat.chat |
| MiniMax | MiniMax-M2.7 | api.minimaxi.com |
| Doubao Seed | doubao-seed-code | ark.cn-beijing.volces.com |
- OS: macOS or Linux (x64/ARM64)
⚠️ Windows is not currently supported - the installer and CCM scripts are designed for Unix-like systems
- Shell: bash or zsh
- Tools:
curl,base64 - Optional:
git,jq - macOS Only: Keychain integration for Claude Pro account management
Run the installer script to download and set up Claude Code CLI:
bash <(curl -fsSL https://raw.githubusercontent.com/zhuzaiye/my-ccm/main/claude.sh)Or download and run locally:
curl -fsSL https://raw.githubusercontent.com/zhuzaiye/my-ccm/main/claude.sh -o claude.sh
chmod +x claude.sh
./claude.shThe installer will:
- Detect your platform (OS and CPU architecture)
- Prompt for version selection (latest/stable/specific version)
- Download Claude Code CLI binary
- Download CCM switcher script
- Configure environment variables
- Set up shell integration
After installation, load the environment:
source ~/.claude/envThis will be automatically loaded in new terminal sessions.
Configure API keys for different providers using the CCM tool:
# Set API key for a specific provider
ccm set glm sk-xxxxxxxxxxxxx
ccm set deepseek sk-xxxxxxxxxxxxx
ccm set kimi sk-xxxxxxxxxxxxx
# For Claude
ccm set claude sk-ant-xxxxxxxxxxxxx # Official API
ccm set claude-proxy your-proxy-key # Third-party proxyOr edit the config file manually:
ccm configThis opens ~/.ccm_config where you can add your API keys:
# GLM (Zhipu AI)
GLM_API_KEY=your-glm-api-key
# Deepseek V4
DEEPSEEK_API_KEY=sk-your-deepseek-api-key
# KIMI for Coding
KIMI_API_KEY=your-kimi-api-key
# Claude API Key (Official Anthropic API)
CLAUDE_API_KEY=sk-ant-your-claude-api-key
# Claude Proxy (Third-party proxy)
CLAUDE_PROXY_KEY=your-claude-proxy-key
CLAUDE_PROXY_URL=https://your-proxy-url/chatCCM supports three ways to connect to Claude:
Use your Claude Pro subscription with credentials stored in macOS Keychain:
# First time: login to Claude Code and save account
ccm save-account work
# Use Pro account
eval "$(ccm claude-pro)"
claudeUse Anthropic's official API with your API key:
# Configure API key
ccm set claude sk-ant-xxxxxxxxxxxxx
# Use API mode
eval "$(ccm claude-api)"
claudeUse third-party proxy services:
# Configure proxy
ccm set claude-proxy your-proxy-key
# Optionally set custom proxy URL in ~/.ccm_config
# Use proxy mode
eval "$(ccm claude-proxy)"
claudeSwitch between different AI models using CCM:
# Switch to Deepseek
eval "$(ccm deepseek)"
claude
# Switch to GLM
eval "$(ccm glm)"
claude
# Switch to KIMI
eval "$(ccm kimi)"
claudeThe environment includes convenient aliases for rapid model switching:
# Standard mode (with permission prompts)
glm # GLM
mmm # MiniMax
dsm # Deepseek
# Claude modes (standard)
cpm # Claude Proxy Mode
cam # Claude API Mode
crm # Claude pRo Mode (Pro account)
# YOLO mode (skip permission prompts - use with caution!)
glx # GLM YOLO
mmx # MiniMax YOLO
dsx # Deepseek YOLO
# Claude YOLO modes
cpx # Claude Proxy YOLO
cax # Claude API YOLO
crx # Claude pRo YOLOAlias Naming Convention:
c*m= Standard mode (with permissions)c*x= YOLO mode (skip permissions)cam= Claude API Modecrm= Claude pRo Modecpm= Claude Proxy Mode
Switch model and launch in one command:
ccc deepseek # Switch to Deepseek and launch
ccc glm # Switch to GLM and launch
ccc claude-api # Switch to Claude API and launchSame as CCC but with --dangerously-skip-permissions:
ccx deepseek # YOLO mode
ccx glm # YOLO mode
ccx claude-proxy # Claude proxy YOLO modeManage multiple Claude Pro accounts:
# Save current account
ccm save-account work
# List all saved accounts
ccm list-accounts
# Switch to a saved account
ccm switch-account personal
# Show current account info
ccm current-account
# Delete an account
ccm delete-account old-accountView current configuration and API key status:
ccm statusOutput example:
Current model config:
BASE_URL: https://api.deepseek.com/anthropic
AUTH_TOKEN: [Set] sk-de...6789
MODEL: deepseek-v4-pro
SMALL_MODEL: deepseek-v4-flash
API keys status:
DEEPSEEK_API_KEY: [Set]
GLM_API_KEY: [Set]
KIMI_API_KEY: [Not Set]
ccm deepseek, ds # Switch to Deepseek
ccm kimi, kimi2 # Switch to KIMI for Coding
ccm kimi-cn # Switch to KIMI CN
ccm seed, doubao # Switch to Doubao Seed-Code
ccm longcat, lc # Switch to LongCat
ccm minimax, mm # Switch to MiniMax
ccm qwen # Switch to Qwen
ccm glm, glm5 # Switch to GLMccm claude-proxy # Claude via third-party proxy
ccm claude-api # Claude via official API
ccm claude-pro # Claude via Pro account (Keychain)ccm save-account <name> # Save current account
ccm switch-account <name> # Switch to saved account
ccm list-accounts # List all accounts
ccm delete-account <name> # Delete account
ccm current-account # Show current accountccm status, st # Show current config
ccm config, cfg # Edit config file
ccm set <provider> <key> # Set API key
ccm help, -h # Show helpOverride default model IDs in ~/.ccm_config:
# Custom Deepseek models
DEEPSEEK_MODEL=deepseek-v4-pro
DEEPSEEK_SMALL_FAST_MODEL=deepseek-v4-flash
# Custom GLM models
GLM_MODEL=glm-5.2
GLM_SMALL_FAST_MODEL=glm-5.2
# Custom Claude models
CLAUDE_MODEL=claude-sonnet-4-6
CLAUDE_SMALL_FAST_MODEL=claude-haiku-4-5
# Custom proxy URL
CLAUDE_PROXY_URL=https://your-proxy-url/chatCCM uses these environment variables (set automatically):
ANTHROPIC_BASE_URL # API endpoint URL
ANTHROPIC_AUTH_TOKEN # Authentication token
ANTHROPIC_MODEL # Primary model ID
ANTHROPIC_SMALL_FAST_MODEL # Fast model for quick tasks
API_TIMEOUT_MS # API request timeoutCCM integrates with macOS Keychain for secure credential storage:
- Credentials are stored in:
Claude Code - credentials - Account switching automatically updates Keychain
- No plain-text credential storage
Note: This feature is macOS only. On Linux, Claude Pro account mode (claude-pro) will not work. Linux users should use claude-api (official API) or claude-proxy (third-party proxy) modes instead.
Generate Claude Code binary download URLs for any platform:
# Interactive mode
./cc_load.sh
# Direct URL generation
./cc_load.sh latest
./cc_load.sh stable
./cc_load.sh 2.1.161
# Specify platform manually
./cc_load.sh latest --platform linux-x64
./cc_load.sh stable --platform darwin-arm64Supported platforms:
linux-x64,linux-arm64linux-x64-musl,linux-arm64-musl(Alpine)darwin-x64,darwin-arm64win32-x64,win32-arm64
my-ccm/
├── claude.sh # Main installer script
├── ccm.sh # Model switcher utility
├── cc_load.sh # Download URL generator
├── README.md # This file
└── LICENSE # MIT License
~/.claude/
├── env # Environment configuration (auto-loaded)
└── ... # Claude Code data
~/.local/bin/
├── claude # Claude Code CLI binary
└── ccm.sh # CCM script
~/.ccm_config # API keys configuration
~/.ccm_accounts # Saved accounts (encrypted)
- Check key status:
ccm status - Verify config:
ccm config - Re-set the key:
ccm set <provider> <key>
Make sure to use eval:
# Wrong
ccm deepseek
claude
# Correct
eval "$(ccm deepseek)"
claudeEnsure directories are writable:
mkdir -p ~/.local/bin ~/.claude
chmod 755 ~/.local/bin ~/.claudeManually source the environment:
source ~/.claude/envOr add to shell config:
# Add to ~/.bashrc or ~/.zshrc
. "${HOME}/.claude/env"Issue: claude-pro mode requires macOS Keychain, which is not available on Linux.
Solution: Linux users should use alternative Claude connection modes:
claude-api- Official Anthropic API (requires API key)claude-proxy- Third-party proxy service
# For Linux users
ccm set claude sk-ant-xxxxxxxxxxxxx
eval "$(ccm claude-api)"
claude# Configure API key
ccm set glm your-api-key-here
# Launch with GLM using alias
glm # Standard mode
# or
glx # YOLO mode# Configure API key
ccm set claude sk-ant-xxxxxxxxxxxxx
# Launch with Claude API using alias
cam # Standard mode
# or
cax # YOLO mode# First time: login and save account
claude login
ccm save-account work
# Launch with Pro account using alias
crm # Standard mode
# or
crx # YOLO mode# Configure proxy
ccm set claude-proxy your-proxy-key
# Launch with proxy using alias
cpm # Standard mode
# or
cpx # YOLO mode# Use Deepseek for complex tasks
eval "$(ccm deepseek)"
claude
# Switch to GLM for quick queries
eval "$(ccm glm)"
claude
# Switch to Claude API
eval "$(ccm claude-api)"
claude# Save work account
ccm save-account work
# Save personal account
ccm save-account personal
# Switch between accounts
ccm switch-account work
crm # Launch with work account
# Later, switch to personal
ccm switch-account personal
crm # Launch with personal account# Quick switch and launch
ccc deepseek # Launch with Deepseek
ccc glm # Launch with GLM
ccc claude-api # Launch with Claude API
ccc claude-pro # Launch with Claude Pro
# YOLO mode
ccx deepseek # Launch Deepseek in YOLO mode
ccx claude-proxy # Launch Claude Proxy in YOLO mode- API keys are stored in
~/.ccm_config(chmod 600) - Account data is stored in
~/.ccm_accounts(chmod 600) - macOS uses Keychain for credential storage
- Never commit config files to version control
- Use environment variables for CI/CD pipelines
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT License - see the LICENSE file for details.