Claude Code extension (VS Code / Cursor / Trae / Antigravity)
Download VS Code, install the Claude Code extension, and connect it to the LMU AI API — a full walkthrough that shares one settings.json with the CLI.
The official VS Code extension Claude Code for VS Code lets you use Claude Code right in the editor sidebar, without switching to the terminal. It shares one config file with the Claude Code CLI, so the key / Base URL you set up in the CLI work directly in the extension — no need to set them up again.
Also works with Cursor / Trae / Antigravity and other editors
Any editor built on the VS Code core (Cursor, Trae, Antigravity, etc.) can search its built-in extension store for the same Claude Code for VS Code extension to install and configure it — the steps are exactly the same as VS Code.
All screenshots and commands on this page use VS Code as the example; Cursor / Trae / Antigravity users can follow them as-is.
Download and install VS Code
Using Cursor / Trae / Antigravity?
These are standalone editors — download the right installer from each one's official site (not VS Code), and once installed, jump straight to the next section, Install the extension — the extension marketplace and install steps are the same as VS Code.
Go to code.visualstudio.com and click the Download button; the site detects your OS automatically. You can also use the official direct links below (no version number, always pointing to the latest stable release, no need to visit the site first):
Download: Windows User Installer (x64) — no admin rights needed, installs to the current user's directory, and is the official recommendation. For ARM devices, use the ARM64 build.
Install:
- Double-click the downloaded
VSCodeUserSetup-*.exe - Click "Next" through the steps, and at "Select Additional Tasks", check:
- "Add to PATH" (checked by default, keep it) — lets the terminal use the
codecommand - "Register Code as an editor for supported file types"
- "Add 'Open with Code' action to the Windows Explorer context menu" (optional, convenient)
- "Add to PATH" (checked by default, keep it) — lets the terminal use the
- Launch VS Code when done
Download: macOS Universal build — one package that supports both Apple Silicon and Intel chips.
Install:
- You get
VSCode-darwin-universal.zip; double-click to unzip it - Drag the extracted Visual Studio Code.app into the Applications folder in Finder
- Open VS Code from Launchpad
- (Recommended) Press
Cmd+Shift+Pto open the Command Palette and run Shell Command: Install 'code' command in PATH; afterward you can open the current directory in the terminal withcode .
Choose by distribution:
- Debian / Ubuntu: download the .deb package, then
sudo apt install ./code_*.deb - RHEL / Fedora / openSUSE: download the .rpm package, then
sudo rpm -i code-*.rpm(orsudo dnf install code-*.rpm)
The .deb / .rpm install automatically adds code to PATH and hooks into the system's software updates. Once installed, run code in the terminal or launch it from the application menu.
Official site or download slow?
The installer is 100–200 MB, and single-threaded browser downloads can occasionally be slow in China. Copying the official direct links above into a download tool that supports multi-threading is usually much faster — these direct links contain no version number and always point to the latest stable release.
Install the extension
- Open VS Code (or Cursor / Trae / Antigravity) and go to the Extensions panel (shortcut
Cmd+Shift+X/Ctrl+Shift+X) - Search for
Claude Code for VS Code, and make sure it's the official Anthropic release - Click Install; once installed, a Claude icon appears in the sidebar
A note for Cursor / Trae / Antigravity
Some VS Code-derived editors use a private extension store (such as Open VSX). If you can't find Claude Code for VS Code:
- Go to the official VS Code extension marketplace page and download the
.vsixpackage - In the
…menu at the top-right of the editor's Extensions panel, choose Install from VSIX
Configure the LMU AI API
If you've already configured the Claude Code CLI, you can skip this section
The extension reads ~/.claude/settings.json, exactly the same as the CLI. The key and Base URL you set up in the Claude Code CLI config are reused automatically by the extension — no extra steps needed.
That also means VS Code, Cursor, Trae, and Antigravity all share the same config — change it once in any editor, and it applies to the other editors and the CLI.
If this is your first time configuring it, create the config file as follows:
mkdir -p ~/.claude && touch ~/.claude/settings.jsonmkdir "$env:USERPROFILE\.claude" -Force
New-Item "$env:USERPROFILE\.claude\settings.json" -ForceAdd the following (replace the key with yours):
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.lmuai.com",
"ANTHROPIC_AUTH_TOKEN": "sk-your-lmu-ai-api-key",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_ATTRIBUTION_HEADER": "0"
}
}For details (including default Chinese-model settings, tuning effortLevel, and more), see the Claude Code CLI config; all config options apply.
Launch the extension
- In the editor, press
Cmd+Shift+P/Ctrl+Shift+Pto open the Command Palette - Type
Claude Code: Open, or just click the Claude icon in the sidebar - In the chat panel that opens, you can talk to Claude Code, generate code, and let it edit files automatically
One config, usable everywhere
- Run
claudein the terminal → use the Claude Code CLI - Click the Claude icon in the VS Code / Cursor / Trae / Antigravity sidebar → use the extension
They read the same ~/.claude/settings.json, so the key, Base URL, model, and timeout settings all take effect everywhere when changed in one place.
Common issues
401 / Unauthorized in the extension
Same approach as the CLI — it's usually the shell environment variables ANTHROPIC_BASE_URL / ANTHROPIC_API_KEY overriding settings.json. See Claude Code CLI config → Common issues to troubleshoot.
Using a Chinese model / switching the default model
Add "model": "qwen3.8-max-preview" to settings.json, and the CLI and all VS Code-family editors will use that model automatically. See the Model Gallery for the list of available models.
Can't find the extension in Cursor / Trae / Antigravity
Follow the earlier "A note for Cursor / Trae / Antigravity" and install offline via VSIX.
Extension or CLI — which should I choose?
- Prefer coding inside the editor → use the extension, where all your context stays in the editor
- Working across editors, writing scripts, batch tasks → use the CLI, which is more flexible
Neither is functionally better — pick whichever suits you.
Last updated:
Get an LMU AI key and start using Claude, Codex and more
Free sign-up, flexible plans, one key across Claude Code, Codex CLI, Cursor, VS Code, OpenCode, Cherry Studio and other AI tools.
Sign upClaude Code Desktop
Connect the Claude Code for Desktop client to the LMU AI API: enable Developer Mode, then configure the third-party inference endpoint.
Configure GPT models in Claude Code
Use GPT models (e.g. gpt-5.6-sol) in Claude Code via the LMU AI API: plan prerequisites, the settings.json config, and switching with /model.