A CLI tool to easily switch between different API settings for Claude Code. Perfect for when you hit API limits and want to switch to alternative providers like DeepSeek, OpenRouter, or other compatible APIs.
Install the package from pip:
pip install ccswitcherInstall the package locally:
pip install -e .Switch to a registered profile (e.g., DeepSeek):
ccswitcher deepseekThis will copy the settings file from your registered path to ~/.claude/settings.json.
Switch back to default Claude settings (removes settings.json):
ccswitcher claudeClaude Code uses default settings when settings.json doesn't exist.
Register a new API provider profile:
ccswitcher new deepseek --path='~/.claude/settings_deepseek'This saves the association between the profile name and settings file path in your configuration.
View all registered profiles:
ccswitcher listThis shows all profiles with their paths and whether the settings files exist.
- Configuration Storage: Profile mappings are stored in
~/.config/ccswitcher/settings.yml - Settings Switching: When you switch profiles, the tool copies the corresponding settings file to
~/.claude/settings.json - Default Mode: Switching to "claude" removes
settings.json, making Claude Code use its default settings
-
First, create your alternative API settings file:
# Create a settings file for DeepSeek cat > ~/.claude/settings_deepseek << EOF { "apiKey": "your-deepseek-api-key", "apiEndpoint": "https://api.deepseek.com", "model": "deepseek-chat" } EOF
-
Register the profile:
ccswitcher new deepseek --path='~/.claude/settings_deepseek' -
Switch between profiles as needed:
# Use DeepSeek ccswitcher deepseek # Back to default Claude ccswitcher claude # Use DeepSeek again ccswitcher deepseek
-
Check your registered profiles:
ccswitcher list
- Python >= 3.7
- click >= 8.0.0
- pyyaml >= 5.0.0
MIT