claude-select
v1.0.0
Published
Manage Claude Code API subscriptions - switch between different API providers and models
Maintainers
Readme
claude-select
Manage multiple Claude Code API subscriptions. Switch between providers (DeepSeek, Anthropic, etc.) and models, with automatic environment configuration.
Features
- CRUD subscription management - Add, edit, list, and delete API subscriptions
- Switch subscriptions - Activate any saved subscription (sets ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL, ANTHROPIC_SMALL_FAST_MODEL)
- Clear activation - Revert to Claude's official defaults in one command
- Interactive TUI - Arrow-key menu when run without arguments
- Auto-load wrapper - Claude automatically loads your settings on startup
- Cross-platform - Linux, macOS, Windows (PowerShell/cmd)
Install
npm install -g claude-selectRequires Node.js >= 18.
Quick start
# Add a subscription (interactive)
claude-select add
# Switch to it
claude-select use "DeepSeek Flash"
# Apply to current terminal
source ~/.claude-select.env
# Install auto-load wrapper (so `claude` always picks up your config)
claude-select setup
# Now claude uses your selected subscription automatically
claudeCommands
claude-select # Interactive TUI menu
claude-select add # Add new subscription
claude-select use <name> # Activate a subscription
claude-select edit <name> # Edit an existing subscription
claude-select rm <name> # Delete a subscription
claude-select list # List all subscriptions
claude-select status # Show current activation
claude-select clear # Revert to Claude official defaults
claude-select setup # Install claude auto-load wrapper
claude-select setup --uninstall # Remove wrapper, restore originalHow it works
Config storage: Subscriptions are stored in
~/.config/claude-select/subscriptions.json(XDG_CONFIG_HOME). Each subscription has its own API key.Env file: When you activate a subscription,
claude-selectwrites~/.claude-select.envwith the correctANTHROPIC_*environment variables.Wrapper (
setup): Thesetupcommand replaces theclaudebinary with a thin wrapper that sources the env file before launching the real Claude Code executable. This ensures Claude always uses your current subscription.Shell integration:
setupalso injects a sourcing line into your shell rc file (.bashrc,.zshrc,config.fish) so new terminals auto-load your settings.
Cross-platform
| | Linux | macOS | Windows |
|---|---|---|---|
| Config dir | ~/.config/claude-select/ | ~/Library/Preferences/claude-select/ | %APPDATA%/claude-select/ |
| Env file | ~/.claude-select.env | same | %APPDATA%/claude-select/env.bat |
| Wrapper type | bash script | bash script | batch file (.cmd) |
| Shell rc | .bashrc / .zshrc / fish.config | same | PowerShell $PROFILE |
Security
- API keys stored with 600 permissions on Linux/macOS
- Keys are masked in the TUI (e.g.
sk-...-xxxx) - Never logged or printed in error messages
Example: Multiple providers
# Add DeepSeek
claude-select add
# Name: DeepSeek Flash
# URL: https://api.deepseek.com/anthropic
# Model: deepseek-v4-flash
# Key: sk-...
# Add Anthropic official
claude-select add
# Name: Anthropic Opus
# URL: https://api.anthropic.com
# Model: claude-opus-4-7
# Key: sk-ant-...
# Switch between them
claude-select use "DeepSeek Flash"
claude-select use "Anthropic Opus"License
MIT
