A lightweight, cross-platform command-line tool for managing multiple Claude Code configuration profiles.It allows users to easily switch between different sets of configurations, such as API keys, endpoints, and model mappings, using simple commands like ccswap use . The tool is designed to be simple and efficient, with no external dependencies, and it works by managing different versions of the settings.json file used by Claude Code. Built with ❤️ by JUAN MACKIE
- Download
ccswap.bat - Copy to
C:\Windows\System32\ccswap.bat - Open new Command Prompt and run:
ccswap
- Create
C:\toolsdirectory - Copy
ccswap.battoC:\tools\ccswap.bat - Add to PATH:
- Press
Win + R, typesysdm.cpl - Go to "Advanced" → "Environment Variables"
- Edit "Path" → add
C:\tools
- Press
- Restart Command Prompt and run:
ccswap
# Make executable
chmod +x ccswap
# Move to system path
sudo mv ccswap /usr/local/bin/
# Test
ccswap help# Create bin directory
mkdir -p ~/bin
# Move script
mv ccswap ~/bin/
# Add to PATH (add to ~/.bashrc or ~/.zshrc)
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Test
ccswap helpAfter installation, verify it works:
# Windows
ccswap help
# Unix/Linux/macOS
ccswap helpYou should see the usage information if installed correctly.
- Run Claude Code at least once to create
settings.json - Save your first profile:
ccswap save default - Create additional profiles as needed
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "REDACTED-INSERT YOUR KEY",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"API_TIMEOUT_MS": "3000000",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.6",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.6"
}
}
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "REDACTED-INSERT YOUR KEY",
"ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
"API_TIMEOUT_MS": "3000000",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k2-thinking",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k2-thinking",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k2-thinking"
}
}
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "REDACTED-INSERT YOUR KEY",
"ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic",
"API_TIMEOUT_MS": "3000000",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M2",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M2"
}
}
%USERPROFILE%.claude
├── settings.json # Active Claude Code config
├── profiles\ # Profile storage
│ ├── default.json
│ ├── work.json
│ └── personal.json
└── _current.txt # Active profile tracker
$HOME/.claude/ ├── settings.json # Active Claude Code config ├── profiles/ # Profile storage │ ├── default.json │ ├── work.json │ └── personal.json └── active_profile # Active profile tracker
## Troubleshooting
### Windows Issues
- **"ccswap not recognized"**: Add to PATH or use full path
- **"Access denied"**: Run Command Prompt as Administrator
- **PowerShell issues**: Use Command Prompt instead
### Unix Issues
- **"Permission denied"**: Run `chmod +x ccswap`
- **"command not found"**: Add to PATH or use full path
- **"No such file"**: Create `~/.claude/` directory first
## Uninstallation
### Windows
```bash
# Remove from System32
del C:\Windows\System32\ccswap.bat
# Or remove from tools directory
del C:\tools\ccswap.bat
# Remove from system
sudo rm /usr/local/bin/ccswap
# Or remove from user directory
rm ~/bin/ccswapYour profiles and settings remain in ~/.claude/ for future use.