A VS Code extension that lets you switch Claude Code between Pro/Max Plan and API Key mode with a single click from the status bar.
Requirements
macOS only — Currently only supported on macOS
Claude Code Terminal Mode — Works properly only when using Claude Code in VS Code's integrated terminal (not in other editors or standalone terminal)
The Problem
Claude Code uses different auth methods — your Pro/Max subscription or an API key — but switching between them requires manually setting/unsetting environment variables, running /logout, then /login. This extension automates most of that.
Features
Status Bar Indicator — Shows your current auth mode (Pro Plan 👤 or API Key 🔑) at a glance
One-Click Toggle — Click the status bar to switch between modes
API Key Management — Securely save your API key in VS Code settings
Auto-Logout — Optionally sends /logout to your Claude Code terminal automatically
Reminders — Prompts you to run /login to complete the switch
How It Works
The extension manages the ANTHROPIC_API_KEY in your claude-code.environmentVariables setting
When switching to Pro Plan: removes the API key env var
When switching to API Key: sets the API key env var
Sends /logout to Claude Code terminal (if enabled)
git clone https://github.com/manuj10/claude-code-switcher.git
cd claude-code-switcher
npm install
npm run package
# Then install the generated .vsix file via "Extensions: Install from VSIX..."
Usage
After installing, you'll see "Claude: Pro Plan" or "Claude: API Key" in your status bar (bottom left)
Click it to toggle between modes
When prompted, run /login in Claude Code to complete the switch
That's it!
⚠️ Important Note
If you have ANTHROPIC_API_KEY set as a system environment variable (in .bashrc, .zshrc, etc.), it will always override this extension's settings. The extension will warn you about this in the status display. Remove it from your shell config to let the extension manage switching.
Limitations
macOS only — Windows and Linux are not currently supported
Terminal mode required — The auto-logout feature and terminal detection only work with Claude Code running in VS Code's integrated terminal
The /login step still requires manual browser authentication (OAuth flow) — this is an inherent limitation of Claude Code's auth system