IDE Integration: VS Code, JetBrains, and Beyond
You have Claude Code running in your terminal, and it works great. But switching between your editor and a separate terminal window breaks your flow — you are constantly alt-tabbing, copy-pasting file paths, and losing context about what you were looking at. The IDE integrations solve this by putting Claude Code directly inside your editor, where it can see your open files, your cursor position, and your terminal output.
This guide covers setting up the VS Code extension (the primary integration), the JetBrains plugin, and how to use the CLI inside any editor’s integrated terminal.
What You’ll Walk Away With
Section titled “What You’ll Walk Away With”- The Claude Code VS Code extension installed and configured
- Knowledge of the JetBrains plugin setup
- Understanding of when to use the extension versus the CLI
- Keyboard shortcuts and workflow patterns for IDE-based usage
VS Code Extension Setup
Section titled “VS Code Extension Setup”The VS Code extension is the most polished IDE integration. It provides a native graphical chat panel, checkpoint-based undo, @-mention file references, and parallel conversations.
Prerequisites
Section titled “Prerequisites”- VS Code 1.98.0 or higher (or Cursor)
- An authenticated Claude Code installation (see Authentication)
Installation
Section titled “Installation”-
Install the extension using one of these methods:
- Open VS Code, press
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows/Linux), search for “Claude Code”, and click Install - Or install directly: Install for VS Code | Install for Cursor
- Open VS Code, press
-
Open the Claude panel by clicking the Spark icon in the top-right corner of any open file, or click “Claude Code” in the bottom-right status bar.
-
Sign in when prompted. The extension uses the same authentication as the CLI — if you already authenticated via terminal, it picks up your existing credentials.
-
Send your first prompt in the chat panel to verify everything works.
Key Features
Section titled “Key Features”@-mention files and folders — Type @ followed by a filename to give Claude specific context. Claude supports fuzzy matching:
@auth.ts # Fuzzy matches auth.ts, AuthService.ts, etc.@src/components/ # Include an entire folder (trailing slash)Selected text context — When you highlight code in the editor, Claude automatically sees your selection. Press Option+K (Mac) / Alt+K (Windows/Linux) to insert an explicit @-mention reference with line numbers like @app.ts#5-10.
Permission modes — Click the mode indicator at the bottom of the prompt box:
- Normal: Claude asks before each action
- Plan mode: Claude describes what it will do, waits for approval, then executes
- Auto-accept: Claude edits files without asking (equivalent to “Accept Edits” mode)
Multiple conversations — Open the Command Palette (Cmd+Shift+P) and select “Claude Code: Open in New Tab” to run parallel conversations for different tasks.
Checkpoints — Hover over any message to access the rewind button. You can fork the conversation, revert file changes, or both. This is your undo system when Claude makes a wrong turn.
Essential Keyboard Shortcuts
Section titled “Essential Keyboard Shortcuts”| Shortcut | Action |
|---|---|
Cmd+Esc / Ctrl+Esc | Toggle focus between editor and Claude panel |
Cmd+Shift+Esc / Ctrl+Shift+Esc | Open Claude in a new tab |
Option+K / Alt+K | Insert @-mention for current selection |
Cmd+N / Ctrl+N | New conversation (when Claude panel is focused) |
Shift+Enter | New line without sending |
Extension Settings
Section titled “Extension Settings”Open VS Code Settings (Cmd+,) and go to Extensions > Claude Code:
| Setting | Default | What It Does |
|---|---|---|
initialPermissionMode | default | Starting permission mode for new conversations |
useTerminal | false | Use CLI-style terminal instead of graphical panel |
autosave | true | Auto-save files before Claude reads or writes them |
useCtrlEnterToSend | false | Require Ctrl/Cmd+Enter to send (instead of Enter) |
JetBrains Plugin Setup
Section titled “JetBrains Plugin Setup”Claude Code also has a plugin for JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, and others).
-
Install via JetBrains Marketplace — Open your JetBrains IDE, go to Settings > Plugins > Marketplace, search for “Claude Code”, and install.
-
Authenticate — The plugin uses the same credentials as the CLI. If you have not authenticated yet, open the integrated terminal in your JetBrains IDE and run
claudeto complete the login flow. -
Open the Claude panel from the tool window on the right side of the IDE.
The JetBrains plugin provides a similar chat experience to the VS Code extension, with file references and conversation history. Configuration is shared via the same ~/.claude/settings.json file.
CLI Inside Any Editor
Section titled “CLI Inside Any Editor”If your editor does not have a dedicated extension, or if you prefer the CLI experience, you can run claude in any editor’s integrated terminal:
Open the integrated terminal (Ctrl+` or Cmd+`) and run:
claudeWhen Claude Code detects it is running inside VS Code, it automatically integrates with the IDE for features like diff viewing and diagnostic sharing. If you are using an external terminal, run /ide inside Claude Code to connect it to VS Code.
Open the Terminal tool window (usually at the bottom) and run:
claudeThe CLI works fully inside JetBrains terminals, though without the deeper IDE integration that the dedicated plugin provides.
Any editor with an integrated terminal (Neovim, Emacs, Sublime Text, etc.) can run Claude Code:
claudeThe experience is identical to running in a standalone terminal. Claude reads and writes files directly on disk, and your editor picks up the changes.
Extension vs. CLI: When to Use Which
Section titled “Extension vs. CLI: When to Use Which”| Feature | VS Code Extension | CLI in Terminal |
|---|---|---|
| Graphical chat panel | Yes | No |
| Checkpoint rewind | Yes | No (use git) |
| @-mention files | Yes | Yes (@ in terminal) |
| MCP server config | No (use CLI) | Yes |
| All slash commands | Subset | Full set |
| Tab completion | No | Yes |
! bash shortcut | No | Yes |
| Multiple parallel sessions | Yes (tabs) | Yes (tmux/terminals) |
The practical workflow: use the extension for daily development where you want visual diffs and easy checkpoint rewind. Switch to the CLI for MCP server configuration, advanced slash commands, and headless automation.
Browser Integration
Section titled “Browser Integration”The VS Code extension can connect to Chrome for testing web applications. This requires the Claude in Chrome extension (version 1.0.36+):
@browser go to localhost:3000 and check the console for errorsClaude opens new tabs, reads page content, and shares your browser’s login state. Useful for end-to-end testing and debugging visual issues.
When This Breaks
Section titled “When This Breaks”Spark icon not visible in VS Code — You need a file open (not just a folder). Check that you have VS Code 1.98.0+ (Help > About). Try “Developer: Reload Window” from the Command Palette. If other AI extensions are installed (Cline, Continue), disable them temporarily to rule out conflicts.
Extension installed but Claude never responds — Check your internet connection and authentication. Start a fresh conversation. If it persists, open the CLI in a terminal (claude) to see more detailed error messages.
Settings do not sync between extension and CLI — Both use ~/.claude/settings.json for shared settings. Extension-specific settings (like initialPermissionMode) are in VS Code’s own settings system, not the shared file.
JetBrains plugin does not find credentials — Open the integrated terminal in JetBrains and run claude to trigger the authentication flow. The plugin reads credentials from the same location as the CLI.
What’s Next
Section titled “What’s Next”With your IDE integration working, the next step is initializing project context so Claude deeply understands your codebase.