Skip to content

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.

  • 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

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.

  • VS Code 1.98.0 or higher (or Cursor)
  • An authenticated Claude Code installation (see Authentication)
  1. Install the extension using one of these methods:

  2. 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.

  3. 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.

  4. Send your first prompt in the chat panel to verify everything works.

@-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.

ShortcutAction
Cmd+Esc / Ctrl+EscToggle focus between editor and Claude panel
Cmd+Shift+Esc / Ctrl+Shift+EscOpen Claude in a new tab
Option+K / Alt+KInsert @-mention for current selection
Cmd+N / Ctrl+NNew conversation (when Claude panel is focused)
Shift+EnterNew line without sending

Open VS Code Settings (Cmd+,) and go to Extensions > Claude Code:

SettingDefaultWhat It Does
initialPermissionModedefaultStarting permission mode for new conversations
useTerminalfalseUse CLI-style terminal instead of graphical panel
autosavetrueAuto-save files before Claude reads or writes them
useCtrlEnterToSendfalseRequire Ctrl/Cmd+Enter to send (instead of Enter)

Claude Code also has a plugin for JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, and others).

  1. Install via JetBrains Marketplace — Open your JetBrains IDE, go to Settings > Plugins > Marketplace, search for “Claude Code”, and install.

  2. 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 claude to complete the login flow.

  3. 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.

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:

Terminal window
claude

When 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.

FeatureVS Code ExtensionCLI in Terminal
Graphical chat panelYesNo
Checkpoint rewindYesNo (use git)
@-mention filesYesYes (@ in terminal)
MCP server configNo (use CLI)Yes
All slash commandsSubsetFull set
Tab completionNoYes
! bash shortcutNoYes
Multiple parallel sessionsYes (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.

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 errors

Claude opens new tabs, reads page content, and shares your browser’s login state. Useful for end-to-end testing and debugging visual issues.

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.

With your IDE integration working, the next step is initializing project context so Claude deeply understands your codebase.