Skip to content

JetBrains Plugin

The Claude Code JetBrains plugin integrates Claude Code into IntelliJ-based IDEs. Its standout feature is interactive diff viewing — you can select exactly which hunks to apply rather than accepting or rejecting a change in full.

Supported IDEs

  • IntelliJ IDEA
  • PyCharm
  • Android Studio
  • WebStorm
  • PhpStorm
  • GoLand
  • Other JetBrains IDEs

Install

From JetBrains Marketplace:

  1. Open your IDE
  2. Go to Settings → Plugins → Marketplace
  3. Search Claude Code Beta
  4. Click Install
  5. Restart the IDE completely (may need to restart twice for the plugin to register)

Direct link: Claude Code Beta on JetBrains Marketplace

If you have not installed the Claude Code CLI yet, see the quickstart guide.

Open Claude Code

From the integrated terminal:

Terminal window
claude

Run claude from the IDE’s integrated terminal — all integration features activate automatically.

Keyboard shortcut: Cmd+Esc (Mac) / Ctrl+Esc (Windows/Linux) — opens Claude Code directly from the editor without switching to the terminal manually.

From an external terminal: run /ide inside Claude Code to connect it to the running JetBrains IDE and enable all integration features.

> /ide

This is useful if you prefer an external terminal but still want diff viewing and selection sharing.

Key Features

Interactive Diff Viewing

When Claude proposes edits to a file, the changes appear in the IDE’s native diff viewer rather than the terminal. Unlike VS Code (which shows a side-by-side preview you accept or reject in full), JetBrains lets you select individual hunks to apply:

  • Accept specific sections while rejecting others in the same file
  • Navigate hunk-by-hunk using the diff viewer’s arrow controls
  • Discard individual changes without touching unrelated edits in the same file

This granular control is JetBrains’ primary advantage over the VS Code extension when Claude edits large files with multiple independent changes.

Selection Context Sharing

Select any code block in the editor — the current selection and active tab are automatically shared with Claude Code as context. You do not need to copy-paste or use @-mentions.

File reference shortcut: Cmd+Option+K (Mac) / Alt+Ctrl+K (Windows/Linux) — inserts a file reference with line numbers (e.g., @File#L1-99) into the prompt.

Diagnostic Sharing

Lint errors, type errors, and other diagnostics from the IDE’s built-in analysis tools are automatically visible to Claude Code as you work. Claude can see the same problems that appear in the IDE’s Problems panel without you needing to paste error text.

Quick Launch

Cmd+Esc / Ctrl+Esc opens Claude Code from anywhere in the IDE. You can also click the Claude Code button in the IDE toolbar.

Configure the Plugin

Go to Settings → Tools → Claude Code [Beta]:

SettingNotes
Claude commandOverride the default claude command — useful if Claude is installed at a non-standard path (e.g., /usr/local/bin/claude) or when using npx @anthropic/claude-code
Enable automatic updatesAuto-check for plugin updates; changes apply on restart
Enable Option+Enter for multi-line prompts (macOS)Option+Enter inserts newlines instead of sending; disable if Option key is captured unexpectedly

Configure diff tool: run claude, then /config, and set the diff tool to auto for automatic IDE detection.

WSL Users

Set the Claude command to:

wsl -d Ubuntu -- bash -lic "claude"

Replace Ubuntu with your WSL distribution name. See the WSL troubleshooting guide for networking and firewall details.

Remote Development

When using JetBrains Remote Development (Gateway), install the plugin on the remote host, not the local client:

Settings → Plugin (Host) → search Claude Code Beta → Install

The standard client-side plugin does not work for remote sessions.

Comparison with VS Code Extension

Both extensions wrap the same Claude Code engine. Choose based on which IDE you use and which workflow fits better:

VS CodeJetBrains
@-mention files in prompt❌ (use selection + shortcut instead)
Plan review UI (markdown)
Conversation history panel
Per-hunk diff selection
Selection auto-context
Diagnostic sharing
Stability labelStableBeta

The JetBrains plugin is labeled Beta — more features are planned. Per-hunk diff control is the current headline capability; the VS Code extension has a wider graphical feature set today.

Troubleshooting

Plugin not working after install — restart the IDE completely. JetBrains IDEs sometimes need two full restarts for a new plugin to register.

Claude Code not found — verify the CLI is installed (npm list -g @anthropic-ai/claude-code), then set the correct path under Settings → Tools → Claude Code [Beta] → Claude command.

ESC key does not interrupt Claude — go to Settings → Tools → Terminal and either uncheck “Move focus to the editor with Escape”, or open “Configure terminal keybindings” and delete the “Switch focus to Editor” shortcut. This returns ESC to Claude Code’s interrupt handler.

IDE not detected from external terminal — run /ide inside the Claude Code session to connect manually.


See also: VS Code Extension · IDE Extensions Overview