Claude Code guide · Chapter 4 of 10
Claude Code in VS Code, Cursor and JetBrains: the extension, step by step
The Claude Code extension for VS Code puts Claude in a panel next to your code, with each change marked in the file before you accept it. You install it from the Extensions view, in Cursor too, and it doesn't need the terminal version. JetBrains IDEs have a plugin that does need it.

Chapter 4 of 10 · See all
Claude Code in VS Code: 6 quick answers
What people search for most about Claude Code in the editor, with a short answer. Checked in the official documentation on November 18, 2026.
- Is there an official extension? Yes: the Claude Code extension by Anthropic, on the Visual Studio Marketplace and on Open VSX. It is the recommended way to use Claude Code in VS Code.
- What do I need? VS Code 1.94.0 or later and a paid Claude account (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. You don’t need an API key.
- Does it work in Cursor? Yes, the same extension installs in Cursor and in other VS Code-based editors.
- What about JetBrains? There is a plugin for IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand and Android Studio. It uses the terminal version of Claude Code.
- Do I also need the terminal version? Not for the VS Code extension: it brings its own copy. For the JetBrains plugin, yes.
- Is it free? The extension is; using it needs the same paid plan as Claude Code. Pro costs $20 a month, or $17 a month billed annually.
If you prefer the terminal, see chapter 3, how to install Claude Code.
What the Claude Code extension for VS Code is
It is Claude Code with a visual interface inside your editor. It does the same as in the terminal (reads your project, changes files, runs commands), but in a panel next to your code, where you see each change marked in the file before you accept it.
According to the documentation, with the extension you can:
- review and edit Claude’s plans before you accept them;
- auto-accept edits as they are made, if you prefer;
- mention files with
@, including a line range from your selection; - pick up past conversations from the history;
- open several conversations in separate tabs or windows.
A handy detail: the extension’s version number is the version of Claude Code it bundles. If a feature needs Claude Code 2.1.286 or later, you need extension 2.1.286 or later.
How to install it, step by step
- Open the Extensions view:
Cmd+Shift+Xon Mac orCtrl+Shift+Xon Windows and Linux. - Search for "Claude Code" and pick the one by Anthropic (its ID is
anthropic.claude-code). - Click Install. If it doesn't show up afterwards, restart VS Code or run "Developer: Reload Window" from the Command Palette.
You need VS Code 1.94.0 or later.
In Cursor, search for "Claude Code" in its Extensions view and install it the same way. In other VS Code-based editors, look for it in their Extensions view or in the Open VSX registry.
If your editor doesn't support the extension, install Claude Code in the terminal and run claude in the editor's built-in terminal: it works in any terminal.
- First install Claude Code in the terminal (chapter 3): the plugin doesn't bring its own copy and needs it in your PATH.
- Install the Claude Code plugin from the JetBrains Marketplace and restart the IDE.
- Run
claudein the IDE's built-in terminal. From an external terminal, connect it with/ide.
If the plugin says "Cannot launch Claude Code", it can't find claude: set its full path in the plugin settings.
A warning from the documentation itself: extension marketplaces are run by third parties, and Anthropic doesn’t endorse or audit them. Make sure you install the one by Anthropic, not another one with a similar name.
First steps in the panel
1. Open the panel. Look for the Claude icon, a spark. The quickest is to click it in the top right corner of the editor, which only shows when a file is open. It is also in the left sidebar (with the session list), in the status bar (“✻ Claude Code”, bottom right) and in the Command Palette (Cmd+Shift+P or Ctrl+Shift+P, type “Claude Code”).
2. Sign in. The first time you get a sign-in screen: click Sign in and approve it in the browser. Then a “Learn Claude Code” checklist appears, which you can follow or close.
3. Ask for something. Claude automatically sees the text you have selected. With Option+K on Mac or Alt+K on Windows and Linux, it also inserts a reference like @file.ts#5-10 into your message.
4. Review the changes. Below the prompt box you’ll find the permission mode. Choose based on how much control you want:
| Mode | What it does |
|---|---|
| Manual | Shows you each change side by side (before and after) and asks for permission. You can accept, reject or tell it something else |
| Plan | Describes what it will do and waits for your approval. VS Code opens the plan as a document so you can comment on it |
| Auto | A classifier reviews most actions instead of asking you |
| Edit automatically | Makes the changes without asking |
For a first day, Manual or Plan. When reviewing, you can accept or reject each change on its own with Accept this change and Reject this change, or the whole file.
If something goes wrong, you can go back. Hover over a message and a rewind button appears: you can start a new conversation from that point, undo the code changes up to there, or both.
The shortcuts you’ll use most
| Shortcut | What it does |
|---|---|
Cmd+Esc / Ctrl+Esc |
Switches between the editor and Claude |
Cmd+Shift+Esc / Ctrl+Shift+Esc |
Opens a new conversation in a tab |
Option+K / Alt+K |
Inserts a reference to the file and selection |
Cmd+Shift+P / Ctrl+Shift+P |
Command Palette: type “Claude Code” to see everything |
You can drag the panel wherever you like: to the right sidebar, to keep it in view while you code; to the left; or as another tab, for separate tasks.
Extension, terminal or desktop app: which to use
All three share the same engine and the same history: a conversation from the extension can continue in the terminal with claude --resume. What changes is how you work.
| VS Code extension | Terminal (CLI) | Desktop app | |
|---|---|---|---|
| Best for | People who already code in VS Code or Cursor | People who live in the terminal | People who want neither terminal nor editor |
| Seeing changes | Marked in the file, one by one | In the terminal, or in the editor if you connect it | In its own changes panel |
| Commands and skills | A subset (type / to see them) |
All of them | Type / to see them |
! shortcut for shell commands |
No | Yes | No |
| Install | From the editor’s marketplace | The installer in chapter 3 | Download the app |
My rule: if you already have the project open in VS Code, use the extension, because seeing each change in place helps you understand it. The terminal for what the extension doesn’t have, or for automation. And the desktop app if you want neither terminal nor editor, or if you’re going to start cloud sessions.
Need something that’s only in the terminal? Open the built-in terminal (Ctrl+` or Cmd+`) and type claude. For that you need the terminal version installed: the extension doesn’t add claude to your PATH, it uses its own private copy. If you start it in the built-in terminal with the extension installed, they connect on their own and you see the changes in the editor; from an external terminal, connect it with /ide.
Git, commits and pull requests from the editor
Claude Code works with Git inside VS Code. You can ask in plain language:
Commit my changes with a message that explains what I did.
Create a pull request for this feature.
Summarize the changes I made to the payments module.
When it creates a pull request, it writes the description from the real changes. To keep it away from your main branch, ask it to work on a separate branch before it starts.
Common mistakes
- Installing an extension that isn’t Anthropic’s. Check the publisher and the ID
anthropic.claude-code. - Expecting
claudeto work in the terminal with only the extension. The extension doesn’t add it to the PATH; install the terminal version too if you want it. - Not seeing the spark icon. The one in the top right only shows with a file open. Use the one in the sidebar or the status bar.
- “Not logged in · Please run /login” appears. The extension opens the sign-in again. If it doesn’t, run “Developer: Reload Window”.
- You have
ANTHROPIC_API_KEYset and it still asks you to sign in. VS Code didn’t inherit your terminal’s variables. Open it from the terminal withcode .or sign in with your Claude account. - In JetBrains, “Cannot launch Claude Code”. The terminal program is missing or not in the PATH: set its path in the plugin settings.
- Turning on Edit automatically on day one. Without reviewing anything, it’s easy for an unwanted change to slip in. Start with Manual or Plan.
What I would keep in mind
For anyone who already works in VS Code or Cursor, the extension is the easiest way into Claude Code: you don’t switch tools and you see each change where it will end up.
What I would do on day one:
- Install the extension and also the terminal version. That way you have both and can move between them with the same conversation.
- Start in Plan or Manual mode, and move to Auto once I trust how it works in that project.
- Always ask for a branch before big changes, so I can throw it away if I don’t like it.
What I wouldn’t do: install look-alike extensions from other publishers, or let it edit without review in a project that matters. And when I want it to keep working with the laptop closed, the next step is Claude Code on the web and in the cloud.
FAQ
How do I install Claude Code in VS Code?
Open the Extensions view with Cmd+Shift+X on Mac or Ctrl+Shift+X on Windows and Linux, search for "Claude Code", pick the one by Anthropic (anthropic.claude-code) and click Install. You need VS Code 1.94.0 or later. Then click the spark icon, sign in with your Claude account and start asking.
Is the Claude Code extension for VS Code free?
The extension is free to install, but using it needs the same as Claude Code: a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. Pro costs $20 a month, or $17 a month billed annually (as of November 18, 2026), before sales tax. You don't need an API key.
Can I use Claude Code in Cursor?
Yes. The same Anthropic extension installs in Cursor from its Extensions view, and in other VS Code-based editors through the Open VSX registry. If an editor doesn't support the extension, install Claude Code in the terminal and run claude in its built-in terminal.
How do I use Claude Code in IntelliJ or PyCharm?
With the Claude Code plugin for JetBrains, which works in IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand and Android Studio. First install Claude Code in the terminal, because the plugin needs it, then the plugin from the JetBrains Marketplace. Run claude in the IDE terminal, or connect from outside with /ide.
Do I need to install Claude Code in the terminal if I use the extension?
Not for the VS Code panel: the extension brings its own copy. But that copy isn't added to your PATH, so if you want to type claude in a terminal or use commands only the terminal has, install the terminal version too. Both share the history: claude --resume opens an extension conversation in the terminal.
What is the difference between the extension and the terminal?
The extension is a visual interface: you see each change marked in the file, mention files with @ and open several conversations in tabs. The terminal has all the commands and skills, the ! shortcut for shell commands and autocomplete. They share the same engine, settings and history.
How do I undo what Claude did in VS Code?
Hover over the message you want to go back to and click the rewind button. You can start a new conversation from that point, undo the code changes up to there, or both. In Manual mode you also review each change before you accept it.
Sources
- Claude Code Docs, Use Claude Code in VS Code (checked Nov 18, 2026)
- Claude Code Docs, JetBrains IDEs (checked Nov 18, 2026)
- Claude Code Docs, Advanced setup (checked Nov 18, 2026)
- Open VSX Registry, Claude Code (Anthropic)
- JetBrains Marketplace, Claude Code
- Claude, Plans and pricing (checked Nov 18, 2026)