A macOS menu bar app for effortlessly switching Claude Code API configurations
Features β’ Installation β’ Usage β’ Building β’ Contributing
Switcher is a native macOS menu bar application that helps developers manage multiple Claude Code API configurations. Whether you're switching between the official Anthropic API, third-party proxies, or different model configurations, Switcher makes it seamless with just a click or keyboard shortcut.
The app automatically updates your shell environment variables and injects them into running terminal sessions, so you don't need to restart your terminal or manually source configuration files.
- Menu Bar Access: Click the menu bar icon to instantly switch between configurations
- Global Hotkeys:
Cmd+Shift+Right Arrow: Switch to next configCmd+Shift+Left Arrow: Switch to previous config
- Visual Indicators: See which configuration is currently active at a glance
- Store multiple API configurations (auth token, base URL, model settings)
- Add, edit, delete, and activate configurations through an intuitive UI
- Duplicate existing configs for quick setup of similar configurations
- Automatically updates
~/.zshrcwith the active configuration - Terminal Auto-Refresh: Injects new environment variables into running terminal sessions
- β Terminal.app (macOS built-in)
- β iTerm2
β οΈ Warp and other terminals: Manual sourcing required
- No need to restart terminals or manually run
source ~/.zshrc
- All configurations stored locally in macOS UserDefaults
- No data is sent to external servers (except your configured Claude API endpoint)
- Sandboxed application with minimal permissions
- Download the latest
Switcher-{version}.dmgfrom the Releases page - Open the DMG file
- Drag Switcher.app to the Applications folder
- Launch Switcher from your Applications folder
First Launch Notes:
- If you see a Gatekeeper warning, right-click the app and select "Open"
- Or go to System Settings > Privacy & Security > Click "Open Anyway"
On first use, macOS will prompt for automation permissions:
- Automation: Allow Switcher to control Terminal, iTerm2, and System Events
- This enables automatic environment variable injection into running terminals
You can manually grant these permissions at: System Settings > Privacy & Security > Automation
- Click the Switcher icon in the menu bar
- Click the "+" button to add a new configuration
- Fill in your API details:
- Name: A friendly name (e.g., "Official API", "Proxy 1")
- Auth Token: Your Claude API key
- Base URL: API endpoint (e.g.,
https://api.anthropic.com) - Model (optional): Default model to use
- Small/Fast Model (optional): Model for quick operations
- Click Save
- Double-click the config to activate it (or click the play icon)
Via Menu Bar:
- Click the Switcher menu bar icon
- Double-click any configuration to activate it
- Or hover over a config and click the play icon (
βΆοΈ )
Via Hotkeys:
- Press
Cmd+Shift+Right Arrowto switch to the next config - Press
Cmd+Shift+Left Arrowto switch to the previous config
Via Right-Click Menu:
- Right-click the menu bar icon
- Select a configuration from the list
- Or choose "Quit" to exit the app
Switcher manages the following environment variables in your ~/.zshrc:
export ANTHROPIC_AUTH_TOKEN="your-api-key"
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
export ANTHROPIC_MODEL="claude-sonnet-4-5-20250929" # Optional
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-20250131" # OptionalThese variables are used by Claude Code and other Claude API clients.
| Terminal | Auto-Refresh | Notes |
|---|---|---|
| Terminal.app | β Yes | Fully supported |
| iTerm2 | β Yes | Fully supported |
| Warp | β No | Manual source ~/.zshrc required |
| VS Code | β No | Manual source ~/.zshrc required |
| Alacritty | β No | Manual source ~/.zshrc required |
For unsupported terminals, the app will still update ~/.zshrc, but you need to manually run:
source ~/.zshrcOr restart your terminal to apply the changes.
- macOS 10.15 (Catalina) or later
- Xcode 14.0 or later
- Apple Developer account (optional, for code signing)
Development Build:
xcodebuild -project Switcher.xcodeproj -scheme Switcher -configuration Release buildBuild DMG Installer (Unsigned):
./build-dmg.shBuild DMG Installer (Signed):
CODE_SIGN_IDENTITY="Developer ID Application: Your Name (TEAM_ID)" ./build-dmg.shClean Build Artifacts:
xcodebuild clean -project Switcher.xcodeproj -scheme Switcher
rm -rf build/ *.dmg dmg-staging/- Unsigned builds will trigger Gatekeeper warnings on other users' computers
- Signed builds require an Apple Developer account ($99/year)
- Notarization is recommended for public distribution (see CLAUDE.md for details)
Switcher is built with SwiftUI and follows modern macOS app patterns:
- SwitcherApp.swift: Main app entry point with AppDelegate
- ConfigModel.swift: Configuration data model and persistence logic
- HotKeyManager.swift: Global hotkey registration using Carbon API
- ContentView.swift: SwiftUI views and UI components
Key features:
- Configs stored in UserDefaults with JSON encoding
- AppleScript for terminal command injection
- Popover UI for quick access
- Native menu bar integration
For detailed architecture documentation, see CLAUDE.md.
Contributions are welcome! Here's how you can help:
- Report Bugs: Open an issue with details about the problem
- Suggest Features: Share your ideas in the issues section
- Submit Pull Requests: Fork the repo, make your changes, and submit a PR
- Improve Documentation: Help make the docs clearer and more comprehensive
# Clone the repository
git clone https://github.com/yourusername/switcher.git
cd switcher
# Open in Xcode
open Switcher.xcodeproj
# Or build from command line
xcodebuild -project Switcher.xcodeproj -scheme Switcher buildTo add support for a new terminal that has AppleScript capabilities:
- Open
ConfigModel.swift - Add a new case to the
SupportedTerminalenum (around line 343) - Implement the
commandInjectionScript()method for your terminal - Test the integration
See CLAUDE.md for detailed instructions.
Grant automation permissions:
- Open System Settings > Privacy & Security > Automation
- Enable Switcher for Terminal, iTerm2, and System Events
- Restart Switcher
- Ensure automation permissions are granted
- Check if your terminal is supported (see Terminal Compatibility)
- For unsupported terminals, manually run
source ~/.zshrc
- Open
~/.zshrcin a text editor - Manually remove the section between the markers:
# ========== Claude Code Config - Managed by ClaudeConfigSwitcher ========== - Restart Switcher (it will recreate the section correctly)
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with SwiftUI
- Icon design inspired by macOS design guidelines
- Created for the Claude Code community
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with β€οΈ for the Claude Code community