From CLI to VS Code Extension: Claude Code Plugin and API Setup Guide

This guide walks through installing the Claude Code VS Code extension, explains differences from the CLI version, notes beta limitations, and provides step‑by‑step instructions for creating and editing the config.json file with API keys and base URL to enable custom API access.

Xiaolong Cloud Tech Team
Xiaolong Cloud Tech Team
Xiaolong Cloud Tech Team
From CLI to VS Code Extension: Claude Code Plugin and API Setup Guide

Installation

Search for Claude Code in the VS Code, Cursor, or Qoder extension marketplace, select the version published by Anthropic, click Install, trust the prompt, and the extension downloads.

After installation, open the Claude Code conversation panel directly from the editor area, similar to the older CLI plugin.

Claude Code extension UI
Claude Code extension UI

First‑time Use

The extension displays the chat in the editor area rather than a sidebar, providing a larger visible area compared to tools such as Cursor, Codex, or Copilot.

On first launch, a login prompt appears. Users with an Anthropic account can log in directly; otherwise they can configure a proxy or domestic model (e.g., GLM, Kimi) by providing API credentials.

First‑time launch UI
First‑time launch UI

Custom API Configuration

Create a configuration file at the following paths:

Mac: ~/.claude/config.json Windows: C:\Users\Administrator\.claude\config.json Insert the JSON content (the primaryApiKey value can be any placeholder): { "primaryApiKey": "yiyuan" } In VS Code, open the Claude Code settings, edit the JSON configuration, and add environment variables for the API credentials:

"claude-code.environmentVariables": [
    {
        "name": "ANTHROPIC_AUTH_TOKEN",
        "value": "YOUR_SK_KEY"
    },
    {
        "name": "ANTHROPIC_BASE_URL",
        "value": "YOUR_API_ENDPOINT"
    }
],

Save the file, reopen the Claude Code conversation panel, and the extension operates with the custom API.

Settings JSON editor
Settings JSON editor

Beta Caveats and UI Benefits

The extension is in beta; several CLI‑only features—MCP server configuration, sub‑proxy or checkpoint settings, advanced shortcuts, and Tab file‑path completion—are not yet supported and must be used via the CLI.

The chat appears in the editor area, offering a larger visual space and easier access to conversation history. The top‑left corner of the chat page provides a dropdown to select previous conversations, a convenience absent from the CLI.

History selection UI
History selection UI
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ExtensionVS CodeAI coding assistantAnthropicAPI ConfigurationClaude Code
Xiaolong Cloud Tech Team
Written by

Xiaolong Cloud Tech Team

Xiaolong Cloud Tech Team

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.