Claude Code in VS Code — extension and integrated terminal

Claude Code runs in VS Code both as an extension with a graphical panel and as a CLI in the integrated terminal. Both read one settings.json, so you set up Zukko once.

5 min · · IDE · development

You can use Claude Code right inside VS Code: through the official extension with a graphical panel, or as a CLI in the integrated terminal. Both read the same settings file, so connecting to Zukko is a one-time setup. Below: installation, config, how the two modes differ, and common errors.

Two ways to use Claude Code in VS Code

1. The official extension

Anthropic's Claude Code extension installs from the Marketplace (requires VS Code 1.94.0 or newer; it also works in Cursor). According to the Claude Code documentation, it opens a graphical chat panel where you can:

  • review and edit the plan before the agent starts changing code;
  • accept edits one by one or turn on auto-accept;
  • @-mention files, including a line range from your selection;
  • open conversation history and run several conversations in tabs.

The extension bundles its own copy of Claude Code, so the panel doesn't need a separate CLI install.

2. The CLI in the integrated terminal

Claude Code is a command-line program that runs in any terminal. Open the VS Code terminal (Terminal → New Terminal or Ctrl+`) and run claude. This needs a separate CLI install: the extension doesn't add the claude command to your PATH.

Both methods use the shared ~/.claude/settings.json file, and that's where the Zukko connection goes.

What to configure for Zukko

Add an env block to ~/.claude/settings.json:

bash
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.zukko.pro",
    "ANTHROPIC_AUTH_TOKEN": "fetch_...",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-5"
  }
}

Key points:

  • ANTHROPIC_BASE_URL = https://api.zukko.pro — no /v1, Claude Code adds the path itself.
  • ANTHROPIC_AUTH_TOKEN = your fetch_... key from the API keys page. Use exactly this variable: it's sent as Authorization: Bearer, and Claude Code won't ask you to sign in to an Anthropic account.
  • The ANTHROPIC_DEFAULT_*_MODEL variables map Zukko models to the Opus, Sonnet, and Haiku slots in the /model menu. Claude Code also uses the Haiku slot for background tasks.

If settings.json already exists, add the env block inside it without wiping other settings.

File location:

  • macOS / Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json

Installing the CLI

You need it if you want to run claude in the terminal. If you only use the extension, you can skip this step.

macOS / Linux

bash
curl -fsSL https://claude.ai/install.sh | bash
claude --version

Windows (PowerShell)

bash
irm https://claude.ai/install.ps1 | iex

After installing, fully close and reopen PowerShell — PATH only updates in new windows.

Via npm (all platforms):

bash
npm install -g @anthropic-ai/claude-code

Running in the VS Code terminal

  1. Open your project folder in VS Code.
  2. Open the integrated terminal: Ctrl+` (Ctrl on macOS too).
  3. Run claude.
  4. Claude Code reads ~/.claude/settings.json and connects to Zukko.

Ask any question, then check the charge under Usage in your dashboard — the request should show up there.

Installing the extension

  1. Open Extensions (Ctrl/Cmd+Shift+X).
  2. Find Claude Code by Anthropic and click Install.
  3. Make sure ~/.claude/settings.json with the env block from above already exists.
  4. In VS Code settings (Ctrl/Cmd+,), find Claude Code: Disable Login Prompt and enable it. The Claude Code docs recommend this setting for third-party providers; otherwise the extension keeps offering to sign in to Anthropic.
  5. Reload the window: Command Palette → Developer: Reload Window.

The Claude Code panel appears in the side bar and works through Zukko.

Environment variables: a one-off run

For a quick test you can leave settings.json alone and set variables in the current terminal:

macOS / Linux

bash
export ANTHROPIC_BASE_URL="https://api.zukko.pro"
export ANTHROPIC_AUTH_TOKEN="fetch_..."
claude

Windows (PowerShell)

bash
$env:ANTHROPIC_BASE_URL = "https://api.zukko.pro"
$env:ANTHROPIC_AUTH_TOKEN = "fetch_..."
claude

Limitations: the variables last until you close the terminal, and the extension panel doesn't see them — it gets VS Code's own environment. For everyday use, settings.json is more reliable.

What it costs

Claude Code sends the system prompt, tool descriptions, your CLAUDE.md, and the conversation history to the model, so most of the spend is input tokens. On Zukko, claude-sonnet-5 and claude-opus-5-5 cost $0.30 per 1M input and output tokens. One caveat: Anthropic bills part of the repeated context at the cache-read price (around 10% of the input price), while Zukko bills cached tokens at the regular input price. For long agent sessions the real difference from the official price list is smaller than a head-to-head price comparison suggests. Spend per key is visible in the dashboard, and a daily limit on the key protects you from surprises.

Troubleshooting

Claude Code or the extension asks you to sign in to Anthropic

The token isn't visible. Check:

  1. ~/.claude/settings.json is valid JSON (a trailing comma silently breaks the whole file).
  2. The key is set exactly as ANTHROPIC_AUTH_TOKEN.
  3. Disable Login Prompt is enabled in the extension.
  4. If you previously signed in to an Anthropic account, run /logout once in a session.

401 invalid_api_key

The key is mistyped, revoked, or has spaces around it. Create a new one on the keys page.

402

Your balance has run out. Top up and retry.

404 on requests

Make sure the base URL is exactly https://api.zukko.pro without /v1. Claude Code adds the path itself.

claude is not found in the terminal

The extension doesn't install the CLI system-wide. Install Claude Code using the steps above and open a new terminal.

FAQ

Can I use different keys for different projects?

Yes. Besides the user-level ~/.claude/settings.json, Claude Code reads project settings, including .claude/settings.local.json in the repository root (it isn't committed). Put an env block with a different fetch_... key there — it applies once you confirm you trust the project folder. Keys with different limits and model lists are created on the keys page.

Does the extension work without the CLI installed?

Yes. The extension bundles its own copy of Claude Code. A separate CLI is only needed to run claude in the terminal.

Can I use the extension and the CLI at the same time?

Yes. Settings are shared, and according to the Claude Code docs the extension and the CLI share conversation history: you can continue a panel conversation in the terminal with claude --resume.

What if variables are set both in settings.json and in the terminal?

According to the Claude Code docs, in most sessions the value from the settings file's env block wins: Claude Code writes it into the process environment over the value inherited from the shell.

Detailed setup, including model selection, is in the Claude Code guide in the Zukko docs.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

Claude Code in VS Code: extension and terminal via Zukko · Zukko