Claude Code runs in your terminal, but it also plugs straight into your editor so you can review its diffs inline, share your current selection, and see language-server errors without copy-pasting. There are two setups: the VS Code extension (which also covers forks like Cursor and Windsurf) and the JetBrains plugin. Here is how to install each and what you get.
Set up Claude Code in VS Code
The VS Code extension gives Claude Code a native panel inside the editor, and it is the recommended way to use Claude Code in VS Code. You need VS Code 1.94.0 or later and any paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account. No API key is required.
To install it:
- Open the Extensions view with
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows/Linux). - Search for Claude Code and click Install.
- If the extension doesn’t appear afterwards, restart VS Code or run Developer: Reload Window from the Command Palette.
The extension also installs in VS Code forks. Cursor and Windsurf can install it the same way, and other builds can pull it from the Open VSX registry. If your editor can’t install the extension at all, install the Claude Code CLI and run claude in its integrated terminal instead.
There’s a shortcut worth knowing: if you run claude in a VS Code integrated terminal, Claude Code installs the extension for you automatically. So either route gets you there.
Once it’s installed, open the panel by clicking the Spark icon in the editor toolbar (top-right, visible when a file is open), or the ✱ Claude Code item in the status bar. The first time, a sign-in screen appears: click Sign in and finish authorization in your browser. Then send a prompt and Claude gets to work.
Set up Claude Code in JetBrains IDEs
The JetBrains plugin works with most JetBrains IDEs, including IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand and Android Studio. Unlike the VS Code extension, the plugin does not bundle the CLI, so you install both pieces:
- Install the Claude Code CLI first, following the install guide. The plugin shows a “Cannot launch Claude Code” notice if
claudeisn’t on your PATH. - Install the Claude Code plugin from the JetBrains Marketplace (Settings → Plugins → Marketplace, search for “Claude Code”), then restart your IDE.
After the restart, open your IDE’s integrated terminal and run claude. All the integration features turn on automatically. The first run prompts you to log in with your Claude account.
If claude lives somewhere your IDE can’t find, set the full path under Settings → Tools → Claude Code [Beta] in the Claude command field (for example /usr/local/bin/claude). For JetBrains Remote Development, install the plugin on the remote host, not your local client.
What the integration gives you
Once connected, in either editor, Claude Code gains several editor-aware features:
- Inline diffs: Claude opens proposed changes in your IDE’s native diff viewer, side by side, so you can review, edit or reject them before they land instead of reading a diff in the terminal.
- Selection and file context: your current selection and the active file are shared with Claude automatically, so you can ask about “this function” without pasting it. In VS Code press
Option+K/Alt+K, and in JetBrains pressCmd+Option+K/Alt+Ctrl+K, to insert an @-mention reference with the exact line range (like@src/auth.ts#L1-99). - Diagnostics sharing: Claude can read your IDE’s inspection results (the errors and warnings from the language server) through the built-in
getDiagnosticstool, so it sees the same problems you do. - Quick launch shortcut:
Cmd+Esc(Mac) orCtrl+Esc(Windows/Linux) opens or focuses Claude Code from your editor.
A note on privacy: because your selection and open file are sent as context, you can keep a sensitive file such as .env out of Claude’s reach by adding a Read deny rule for it in your permissions. That blocks both the selected text and the open-file notice for that path.
Troubleshooting
A few issues come up often:
- Spark icon missing in VS Code: it only appears when a file is open, not just a folder. Confirm you’re on VS Code 1.94.0 or later, run Developer: Reload Window, and temporarily disable other AI extensions that might conflict. You can always open Claude from the status bar or Command Palette instead.
- JetBrains plugin features don’t appear: make sure you launched
claudefrom the project root, check the plugin is enabled in Settings, and fully restart the IDE (sometimes more than once). For Remote Development, confirm the plugin is on the remote host. - “No available IDEs detected” from
/ide: verify the plugin is installed and enabled and restart the IDE. If you expected an automatic connection, check that you ranclaudefrom the IDE’s own integrated terminal. Cmd+Escdoes nothing on macOS: on recent macOS versions the system Game Overlay shortcut can interceptCmd+Esc. Clear it under System Settings → Keyboard → Keyboard Shortcuts → Game Controllers, or rebind Claude Code’s “Focus input” command in the VS Code Keyboard Shortcuts editor.- “command not found” in JetBrains: run
claude --versionin a terminal to confirm the CLI is installed, then set the correct path in the plugin’s Claude command setting.
Keep going
Getting Claude Code into your editor is one piece of a larger workflow. Once it’s set up, explore slash commands to run repeatable actions, set up MCP servers to connect external tools, and browse the full Claude Code hub for more guides. If you’re newer to working with AI tools in general, our AI course covers the fundamentals, and you can start with the free lessons first.