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
Metadata
Release files for ccswitcher 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ccswitcher-0.1.1.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ccswitcher-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / ccswitcher-0.1.1.tar.gz
| Download URL | ccswitcher-0.1.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59c86f5dd706dced708d9fd4b03252928f104f951afc4d6b194cb79f5c670650
|
|
BLAKE2b-256 checksum How to use checksums |
9c6beb87fe7bd23f78a8a6f652ed00705f86ce5e35654277f14c4d1d7e2926f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / ccswitcher-0.1.1-py3-none-any.whl
| Download URL | ccswitcher-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9ff107b2023883096e6ba292cc6e18dad26dd9ffd1c4d4b90f543e0c7103618
|
|
BLAKE2b-256 checksum How to use checksums |
b402818a7ed22594f9a0d59a62530c977927c839ade617a7d30e92f0e152d0e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|