Claude Code runs as a native VS Code extension installed directly from the marketplace — no browser tab, no copy-pasting between windows. The extension embeds the same Claude Code engine that powers the CLI, so everything from slash commands to file editing to MCP tool calls works the same way, just inside your editor’s sidebar. PyCharm and the rest of the JetBrains family get the same treatment through a dedicated JetBrains plugin. And because both surfaces read ANTHROPIC_BASE_URL from the environment, switching the LLM backend to Novita AI’s API — and its wider model selection — takes a single env var change.
What the VS Code Extension Actually Does
The Claude Code VS Code extension is not a chatbot tab bolted onto your editor. It surfaces the full Claude Code agent inside a sidebar panel: the same REPL-style interface, the same tool set, the same session continuity. When you ask it to refactor a function or write tests for a file you have open, it reads and edits those files directly in your workspace — no clipboard involved.
Concrete things the extension handles:
- Multi-file edits with inline diffs. Claude Code proposes changes and shows a diff you can accept or reject without leaving the editor.
- Slash commands.
/compact,/init,/memory,/clear, and the rest work identically to the CLI. - Context pinning. The
#prefix lets you attach specific files, folders, or symbols as context for a request. - CLAUDE.md awareness. Project instructions and coding standards you’ve written into
CLAUDE.mdload automatically at session start. - MCP tool calls. Any MCP servers registered in your Claude Code config are available inside the extension.
What it does not do: it does not add AI autocomplete in your editor buffer. For that, tools like Copilot or Cline fill a different role. Claude Code in VS Code is an agent — you give it a task and it executes multiple steps, not a single inline completion.
Install Claude Code in VS Code
Open the Extensions panel in VS Code (Ctrl+Shift+X on Windows/Linux, Cmd+Shift+X on macOS). Search for Claude Code and look for the extension published by Anthropic. Click Install.
Alternatively, run this from your terminal:
code --install-extension Anthropic.claude-code
After installation, the Claude icon appears in the VS Code Activity Bar on the left. Click it to open the Claude Code panel.
First launch authentication. The extension prompts you to sign in. You have two paths:
- Anthropic account (subscription or console billing): Click through the browser OAuth flow.
- API key routing to Novita AI: Skip Anthropic auth entirely. Set
ANTHROPIC_BASE_URLandANTHROPIC_AUTH_TOKENin your environment before launching VS Code, and the extension will use those instead. Full instructions in the next section.
Automatic updates. VS Code updates the extension in the background when you restart the editor. You don’t need to manage versions manually.
Using Claude Code in VS Code Daily
Once the panel is open, the workflow is straightforward. Type a request, Claude Code reads your workspace and replies with proposed actions. Before it edits a file, it shows you a diff and waits for approval by default.
A few patterns that make daily use efficient:
Reference the file you’re looking at. Type # followed by a filename to attach it explicitly as context. For a file already open in the active editor, Claude Code usually picks it up automatically, but # is useful when you want to pin a specific file across a multi-file task.
Run /init once in a new project. This creates a CLAUDE.md at the repo root where you can store project-specific instructions — preferred libraries, architecture notes, testing conventions. Claude Code reads it on every session startup, so you don’t repeat yourself.
Use /compact when the session grows long. Like the CLI, the extension compresses conversation history on demand to free up context for the current task.
Check the running tool list. At the bottom of the panel, VS Code shows which tool Claude Code is currently calling (file reads, bash commands, web searches). This is useful for understanding what’s happening in longer automated tasks.
Undo is your friend. All file edits go through the standard VS Code file system, so Ctrl+Z reverts them like any manual edit. There’s no separate undo stack for Claude Code changes.
Route the Extension to Novita AI
The VS Code extension reads ANTHROPIC_BASE_URL from the environment at startup — the same variable the CLI uses. Setting it to Novita AI’s Anthropic-compatible endpoint redirects every API call away from Anthropic’s servers. You get access to DeepSeek, Kimi K2, Qwen, GLM, and other models on Novita AI’s infrastructure, billed through your Novita AI account at Novita’s token rates.
Get a Novita AI API key
Sign up for a Novita AI account to receive free trial credits. Go to Key Management, create a new key, and copy it. This key replaces your Anthropic API key when routing through Novita.
Set environment variables before launching VS Code
macOS and Linux — add these to your shell profile (.zshrc, .bashrc, or equivalent), then reload it:
export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<Your Novita API Key>"
export ANTHROPIC_MODEL="deepseek/deepseek-v4-flash"
export ANTHROPIC_SMALL_FAST_MODEL="deepseek/deepseek-v4-flash"
source ~/.zshrc # or ~/.bashrc
Windows (persistent — survives restarts) — use PowerShell to set user-level environment variables:
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL","https://api.novita.ai/anthropic","User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN","<Your Novita API Key>","User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL","deepseek/deepseek-v4-flash","User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_SMALL_FAST_MODEL","deepseek/deepseek-v4-flash","User")
Restart VS Code after setting these so the extension reads the updated environment.
Windows (session only):
set ANTHROPIC_BASE_URL=https://api.novita.ai/anthropic
set ANTHROPIC_AUTH_TOKEN=<Your Novita API Key>
set ANTHROPIC_MODEL=deepseek/deepseek-v4-flash
set ANTHROPIC_SMALL_FAST_MODEL=deepseek/deepseek-v4-flash
After setting these, launch VS Code from the same shell. The extension picks up the variables on startup. You don’t need to sign into Anthropic — Novita handles auth through the API key.
Choosing a model
ANTHROPIC_MODEL tells Claude Code which model to use for primary tasks; ANTHROPIC_SMALL_FAST_MODEL controls background operations like file summaries. Any model available on Novita AI’s LLM API can be set here. Models frequently used with Claude Code on Novita include DeepSeek V4 Flash, Kimi K2, and GLM-4.6 — each with different context window sizes, pricing, and performance characteristics depending on your workload.
To revert to default Anthropic routing, unset the environment variables:
unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL ANTHROPIC_SMALL_FAST_MODEL
Or open VS Code from a shell where those variables were never set.
PyCharm and JetBrains Integration
Claude Code ships an official plugin for the JetBrains platform, which covers PyCharm, IntelliJ IDEA, WebStorm, GoLand, Rider, and the rest of the JetBrains family.
Install the plugin
Open Settings → Plugins in your JetBrains IDE, switch to the Marketplace tab, and search for Claude Code. Click Install, then restart the IDE when prompted.
Alternatively, download the plugin file from the JetBrains Marketplace website and install it via Settings → Plugins → Install Plugin from Disk.
First run
After installation, the Claude Code panel appears in the IDE sidebar or tool window area depending on your layout. First launch prompts for authentication, identical to VS Code.
Routing PyCharm to Novita AI
The JetBrains plugin reads the same environment variables as the VS Code extension and the CLI. Set ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL, and ANTHROPIC_SMALL_FAST_MODEL in your shell profile before launching the IDE, and the plugin routes through Novita.
If you launch PyCharm from a desktop launcher rather than a terminal (common on macOS and Linux), the IDE may not inherit your shell environment. The reliable fix is a per-project .env file or setting the variables in the system-level environment rather than in your shell profile. On macOS specifically, variables set via launchctl setenv are visible to GUI applications.
IDE Extension vs. CLI: When to Use Which
The extension and the CLI share the same engine. The practical difference is context and integration.
| VS Code / JetBrains extension | CLI | |
|---|---|---|
| File navigation | Click to open, # to reference | Reads from CWD; specify paths explicitly |
| Diff review | Inline in editor | Terminal output |
| Multiple projects | One panel per window | Separate sessions per directory |
| CI/CD and automation | Not appropriate | -p flag for non-interactive batch runs |
| Piping and scripting | Not supported | Full Unix pipe support |
| Novita AI routing | ANTHROPIC_BASE_URL env var | Same |
The extension is the better choice when your primary workflow is editing code interactively. The CLI is the right choice when you’re automating tasks, running Claude Code in scripts, integrating with CI, or building on top of the Claude Code SDK.
Novita AI’s Agent Sandbox
If you move from interactive development to automated pipelines — running Claude Code agents headlessly, spawning multiple agents against different repositories, or building evaluation harnesses — Novita AI’s Agent Sandbox provides isolated execution environments for running agents programmatically. Each sandbox is a firecracker-backed VM, so agents run in isolation without affecting your development machine.
FAQ
Do I need a paid Anthropic subscription to use the VS Code extension?
No — if you route the extension to Novita AI via ANTHROPIC_BASE_URL, all billing goes through your Novita AI account. An Anthropic account is not required and is not billed.
How do I install the Claude Code VS Code extension?
Open the Extensions panel in VS Code (Ctrl+Shift+X), search for Claude Code (publisher: Anthropic), and click Install. Or run code --install-extension Anthropic.claude-code from a terminal.
Does the Claude Code extension work in Cursor?
Cursor is a VS Code fork and supports most VS Code extensions. The Claude Code extension may install, but Cursor already ships its own built-in Claude integration. Running both simultaneously can produce duplicate suggestions and competing auth flows. Most developers use one or the other, not both.
Is there a Claude browser extension?
There is no official Claude browser extension from Anthropic. Claude Code runs as a VS Code extension, a JetBrains plugin, a CLI, a desktop app, and through the web interface at claude.ai/code — but not as a browser extension that hooks into arbitrary web pages.
How do I switch models without restarting VS Code?
Change ANTHROPIC_MODEL in your shell profile, then reopen VS Code from a fresh terminal session. Within a running VS Code session, there is no in-panel model switcher — the environment variable is read at startup.
Can I use different models for different projects?
Yes. Set ANTHROPIC_MODEL in a project-level .env file or a CLAUDE.md instruction, or use direnv to scope environment variables to specific directories. Claude Code respects environment values at the session level, so per-project routing is achievable with standard dotfile tooling.
How does integrate claude with vscode differ from using Cline?
Cline is an extension that turns VS Code into an agentic coding environment using any OpenAI-compatible backend. Claude Code is Anthropic’s own agent, available as a VS Code extension, with its own tool set and reasoning loop. The main practical difference: Cline gives you more control over which provider and model runs the loop, while Claude Code is tightly integrated with the Claude model family by default — though ANTHROPIC_BASE_URL does let you redirect it to Novita AI’s compatible endpoint.
Recommended Articles
