Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Claude Code SwitcherNew to Visual Studio Code? Get it now.
Claude Code Switcher

Claude Code Switcher

Manuj

| (0) | Free
Quickly switch Claude Code between Pro/Max subscription and API Key mode with a single click
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Code Switcher ⚡

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

  1. The extension manages the ANTHROPIC_API_KEY in your claude-code.environmentVariables setting
  2. When switching to Pro Plan: removes the API key env var
  3. When switching to API Key: sets the API key env var
  4. Sends /logout to Claude Code terminal (if enabled)
  5. Reminds you to run /login to complete the switch

Commands

Command Description
Claude Code: Toggle Auth Mode Switch between Pro and API mode
Claude Code: Switch to Pro/Max Plan Switch to subscription auth
Claude Code: Switch to API Key Switch to API key auth
Claude Code: Set API Key Save your API key for later
Claude Code: Show Current Auth Mode View detailed auth status

Settings

Setting Default Description
claudeSwitcher.apiKey "" Your saved Anthropic API key
claudeSwitcher.autoRunLogout true Auto-send /logout to Claude Code terminal
claudeSwitcher.showReminder true Show reminder to run /login

Installation

From VS Code Marketplace (Recommended)

  1. Open VS Code
  2. Go to Extensions (Cmd+Shift+X)
  3. Search for "Claude Code Switcher"
  4. Click Install

Or install directly from the VS Code Marketplace.

From source

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

  1. After installing, you'll see "Claude: Pro Plan" or "Claude: API Key" in your status bar (bottom left)
  2. Click it to toggle between modes
  3. When prompted, run /login in Claude Code to complete the switch
  4. 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

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft