Secure, multilingual terminal UI and launcher for Claude Code provider profiles.
Install | Usage | Why | Security | Language Packs
Claude Code can read provider settings from local configuration, but switching profiles by editing JSON gets messy fast. API tokens make that mess risky.
ClaudeSwitch gives you a terminal UI for provider profiles, model aliases, language settings, and launching Claude Code from the current directory. It focuses on two things most switchers treat as secondary:
- Secret handling first. Tokens stay out of plaintext
settings.jsonby default. Windows uses DPAPI; macOS and Linux use the system keyring when available. - Terminal UX first. Keyboard and mouse both work: hover rows, click menu actions, edit providers in-app, switch language packs, and launch Claude Code without leaving the TUI.
It is not a proxy, router, or model gateway. ClaudeSwitch writes the local environment Claude Code already understands, then gets out of the way.
- Provider profile switching for Claude Code-compatible APIs.
- Secure profile token storage through DPAPI or system keyring.
- Plaintext-token cleanup for existing
settings.jsonfiles. - Mouse-aware terminal interface built on
prompt_toolkit. - In-app add, edit, delete, model detail, and language selection views.
- External JSON locale packs with fallback behavior for missing or partial translations.
- Translation completion display in the language picker.
- Robust width handling for CJK, Thai, Hindi, and other terminal text.
csw --run <profile> claudefor one-shot launches without changing the active profile.
Requirement: Python 3.10+ with venv support. On Windows, install Python from python.org and enable Add python.exe to PATH. On Debian/Raspberry Pi OS, install python3-venv if venv creation fails.
Windows PowerShell:
irm https://raw.githubusercontent.com/AonoChano/claude-switch-tui/main/bootstrap.ps1 | iexLinux/macOS shell:
curl -fsSL https://raw.githubusercontent.com/AonoChano/claude-switch-tui/main/bootstrap.sh | shOpen a new terminal, then run:
cswThe installer creates a local virtual environment, installs dependencies from requirements.txt, and registers the ClaudeSwitch directory in your user PATH.
If installation says Python was not found or a virtual environment could not be created, install or repair Python 3.10+, open a new terminal, and rerun the one-line installer.
The default install directories are:
Windows: %USERPROFILE%\.claude\scripts\claude-switch-tui
Linux/macOS: ~/.claude/scripts/claude-switch-tui
Manual install from a cloned repository still works:
git clone https://github.com/AonoChano/claude-switch-tui.git
cd claude-switch-tui
powershell -ExecutionPolicy Bypass -File .\install.ps1On Linux/macOS:
git clone https://github.com/AonoChano/claude-switch-tui.git
cd claude-switch-tui
sh ./install.shEarly builds placed claude_switch.py, csw.bat, claude_sw.bat, or claude-sw.bat directly under %USERPROFILE%\.claude\scripts.
The installer now migrates that setup by default:
- Removes known legacy launchers from
%USERPROFILE%\.claude\scripts. - Removes the old
%USERPROFILE%\.claude\scriptsentry from userPATH. - Removes the old
%USERPROFILE%\.claude\scripts\ClaudeSwitchentry from userPATH. - Registers
%USERPROFILE%\.claude\scripts\claude-switch-tuifirst in userPATH. - Repairs PowerShell profile lines that still point to old launcher files.
- Warns when user-level
ANTHROPIC_*environment variables are set, without printing or deleting their values.
To skip migration cleanup:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -NoLegacyCleanupLinux/macOS install adds a managed PATH block to ~/.profile, ~/.bashrc, and existing ~/.zshrc. The uninstall script removes that block.
Windows:
powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\.claude\scripts\claude-switch-tui\uninstall.ps1"Linux/macOS:
sh ~/.claude/scripts/claude-switch-tui/uninstall.shManual Python run:
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\.venv\Scripts\python.exe .\claude_switch.pycswInside the TUI:
Enterenables the selected profile.Claunches Claude Code with the active profile in the current directory.A,E, andDadd, edit, and delete providers.Mopens model details.Lopens language settings.- Mouse users can click rows and menu actions; destructive actions ask for confirmation.
CLI helpers:
csw --list
csw --run "DeepSeek" claude
csw --sanitize-settings
csw --version
csw --check-update
csw --updateClaudeSwitch updates the terminal tab title where supported. Set this before launching to disable title changes:
$env:CLAUDE_SWITCH_SET_TITLE = "0"ClaudeSwitch checks GitHub Releases for updates at most once per day on TUI startup. It ignores normal commits on main; only release tags like v0.1.1 count as versions. Disable startup checks with:
$env:CLAUDE_SWITCH_NO_UPDATE_CHECK = "1"Python install errors usually mean the system cannot create a virtual environment.
On Windows, install Python 3.10+ from python.org and enable Add python.exe to PATH.
On Debian, Ubuntu, or Raspberry Pi OS:
sudo apt install python3 python3-venvClaudeSwitch can switch profiles without Claude Code installed, but launching Claude Code from the TUI requires the claude command to exist in PATH.
ClaudeSwitch protects against copied configuration files and accidental plaintext token leaks. It does not claim to protect secrets from malware already running as your user account.
Default behavior:
- New profile tokens are saved through the current secure backend.
settings.jsondoes not receive plaintext API tokens.- Existing plaintext tokens in
settings.jsoncan be removed withcsw --sanitize-settings. - Claude Code receives the selected token through the process environment only when launched.
Backend behavior:
- Windows: DPAPI, tied to the current Windows user.
- macOS/Linux: Python
keyring, backed by the system keychain/keyring when available. - No secure backend: ClaudeSwitch refuses to save new plaintext profile tokens unless you opt in.
Escape hatches for debugging or migration:
$env:CLAUDE_SWITCH_WRITE_PLAINTEXT_TOKEN = "1"
$env:CLAUDE_SWITCH_ALLOW_UNSAFE_PROFILE_TOKEN = "1"Use those only when you understand the tradeoff.
Language files live in locales/*.json. ClaudeSwitch can follow the system language, fall back to a same-language variant, then fall back to Simplified Chinese when a key is missing.
Current language packs include Chinese, English, Japanese, Korean, Russian, German, French, Spanish, Italian, Portuguese, Hindi, and Thai.
To translate a new language, use locales/TRANSLATION_PROMPT.md with locales/zh-CN.json as the source. Keep placeholders, command names, JSON keys, and tip_terms intact.
Current version: 0.2.0
ClaudeSwitch is in early public release. Check the GitHub Releases page for version history.
MIT
Built by AonoChano.
This project is not affiliated with Anthropic.
