CLI tool to switch between different Claude Code API settings
Project description
CCswitcher
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.
Installation
Install the package from pip:
pip install ccswitcher
Install the package locally:
pip install -e .
Usage
Switch to a Profile
Switch to a registered profile (e.g., DeepSeek):
ccswitcher deepseek
This will copy the settings file from your registered path to ~/.claude/settings.json.
Switch to Default Claude
Switch back to default Claude settings (removes settings.json):
ccswitcher claude
Claude Code uses default settings when settings.json doesn't exist.
Register a New Profile
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.
List All Profiles
View all registered profiles:
ccswitcher list
This shows all profiles with their paths and whether the settings files exist.
How It Works
- 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
Example Workflow
-
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
Requirements
- Python >= 3.7
- click >= 8.0.0
- pyyaml >= 5.0.0
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccswitcher-0.1.1.tar.gz.
File metadata
- Download URL: ccswitcher-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59c86f5dd706dced708d9fd4b03252928f104f951afc4d6b194cb79f5c670650
|
|
| MD5 |
f1a6ec3e5541023ef1bc8ea7d3d438cd
|
|
| BLAKE2b-256 |
9c6beb87fe7bd23f78a8a6f652ed00705f86ce5e35654277f14c4d1d7e2926f3
|
File details
Details for the file ccswitcher-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ccswitcher-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ff107b2023883096e6ba292cc6e18dad26dd9ffd1c4d4b90f543e0c7103618
|
|
| MD5 |
5c1d2bcb6349ed07a0a8bac758c9bd6e
|
|
| BLAKE2b-256 |
b402818a7ed22594f9a0d59a62530c977927c839ade617a7d30e92f0e152d0e9
|