Switch between different Claude Code API providers in your terminal without manually typing environment variables each time.
Store API keys securely in your OS keychain instead of in plaintext config files, and let the tool set credentials automatically when you pick a profile.
Test whether a configured Claude API endpoint is reachable before starting a coding session.
Prebuilt binaries available for all platforms, requires one-time shell integration added to terminal config.
Claude-switcher is a small command-line tool for developers who use Claude Code (an AI coding assistant) and need to switch between multiple API endpoints or accounts. Rather than manually setting environment variables each time you want to connect to a different API provider, you open the tool, pick a profile from a list, and the correct settings are applied to your current terminal session. The tool presents an interactive text-based interface in the terminal where you can add, edit, delete, and switch between named profiles. Each profile stores a name and an API endpoint address. The corresponding API key is kept separately in your operating system's built-in credential storage, which is the macOS Keychain on Mac, Credential Manager on Windows, or Secret Service on Linux. The profile file on disk never contains the key itself, only a reference to where it is stored. If you have an older config file that does contain a key in plain text, the tool migrates it to secure storage automatically. Switching profiles works through a shell integration that you add to your terminal configuration once. After that, running cw opens the picker, and selecting a profile sets the two environment variables Claude Code reads for its API credentials. Because environment variables only affect the current terminal session, you need to switch profiles before launching Claude Code, not while it is running. The tool also includes a live endpoint check feature that tests whether a configured API address is reachable, which is useful when managing multiple providers or testing new configurations. Prebuilt binaries are available for Mac (both Apple Silicon and Intel), Linux, and Windows. Building from source requires Go.
← itsmeeaera on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.