Skip to content

JetBrains Integration

📚 Series Navigation: The previous article 08 VS Code Integration moved Claude Code into VS Code. This article switches camps—if your main force is the JetBrains family like IntelliJ IDEA, PyCharm, WebStorm, there is also a native plugin, the gameplay is both similar and different. Next article 10 Desktop app.

A: "I soak in PyCharm every day, that VS Code extension stuff has nothing to do with me, right?"

B: "There's a native plugin, install it, and you can call Claude out from the editor with Cmd+Esc."

A: "Is it the same thing as the VS Code extension? Diffs, @ mentions, it has all those?"

B: "The core is the same CLI, but the interface wasn't made by the same group of people—some places are the same, some places you have to change your posture. For example, by default it runs in the IDE's built-in terminal, not a separate panel."

This is a common doubt for people who write backend in GoLand, very typical: JetBrains users always worry they are 'second-class citizens', good stuff always goes to VS Code first.

Honestly speaking, this worry is half right and half wrong. The right part: the JetBrains plugin is indeed lighter than the VS Code extension, it connects the CLI to the IDE, letting information flow back and forth between the two, instead of making a large, comprehensive graphical panel. The wrong part: None of the core experiences that should be there are missing.

This article will explain clearly: How to install, how to connect, where it falls short compared to VS Code, and how to fill the JetBrains-exclusive pits (ESC key, WSL, remote development).

After reading this article, you will get:

  • The complete steps to install the Claude Code plugin in JetBrains IDEs like IntelliJ / PyCharm / WebStorm
  • Two connection methods: "IDE built-in terminal" and "External terminal /ide", and when to use each
  • A "JetBrains Plugin vs VS Code Extension" comparison table, plus JetBrains exclusive shortcuts
  • Official solutions for three high-frequency pits: ESC key interrupt failure, WSL2 "cannot detect IDE", remote development

01 First Clear Up: What Does the Plugin Actually Do

Many people are confused after installing the plugin: "I installed the plugin, why didn't I see a chat panel like VS Code's?"

Conclusion first: The JetBrains plugin is not an independent chat window, it is a 'bridge'. Claude Code itself is still that CLI running in the terminal, what the plugin does is connect the IDE and the CLI—the code you selected in the editor, lint errors reported by the IDE, changes Claude wants to make, can automatically pass back and forth between the "IDE" and "Claude in the terminal".

Analogy: AirDrop between phone and computer. Files and clipboards normally stay on their respective devices, turning on AirDrop makes the two devices "know" each other—copy on computer, paste directly on phone. The plugin is this channel between IDE and Claude: You select a piece of code in PyCharm, Claude in the terminal immediately 'sees' it, no need to copy and paste.

So there is a key understanding:

In JetBrains, the place where you converse with Claude is the IDE's built-in integrated terminal—not a newly opened sidebar panel.

This is the biggest difference in feel from VS Code: VS Code extension gives you a graphical dialogue panel; JetBrains lets you run claude in the built-in terminal, and the plugin feeds context behind the scenes. Dialogue happens in the terminal, diff pops up in the IDE native viewer, you get the benefits of both sides, and there is almost zero learning cost—commands, shortcuts, / slash commands are all exactly the terminal's set. When I first installed the plugin in IntelliJ, I was originally worried about having to re-adapt to the interface, only to find it's just the familiar terminal Claude, except it suddenly 'grew eyes' and can see what you selected and where the IDE marked red.

💡 One-sentence summary: The JetBrains plugin is the "AirDrop" between IDE and CLI, dialogue happens in the built-in terminal, diff pops into the IDE, it is not an independent chat panel.


02 Which IDEs Are Supported, Check Your Number First

JetBrains is a whole family, not a single software. The good news is: the Claude Code plugin covers almost all mainstream ones.

The support list explicitly listed officially:

IDEMain Language / Scenario
IntelliJ IDEAJava / Kotlin, Backend, Android old trade
PyCharmPython, Data, AI, Scripts
WebStormFrontend JS / TS
PhpStormPHP
GoLandGo
Android StudioAndroid Development (based on IntelliJ)

The official wording is "applicable to most JetBrains IDEs"—JetBrains IDEs not on the list (RubyMine, CLion, Rider, etc.) can likely also be used, but not officially endorsed; if you can install it use it, treat issues as "not explicitly supported."

Analogy: Different car models of the same brand, sharing the same infotainment system. IntelliJ, PyCharm, WebStorm are like a sedan, SUV, and sports car from the same manufacturer, differently positioned but built on the same platform (all built on the IntelliJ Platform). So one plugin eats all, all operation steps in this article are identical whether you use IntelliJ or GoLand. PyCharm is used for demonstration below.

One Claude Code plugin eats all JetBrains IDEs because they share the IntelliJ platform base

The image above draws this relationship clearly: There is only one Claude Code plugin on top, fanning out downwards to adapt to each IDE; while IntelliJ IDEA, PyCharm, WebStorm etc. each manage a language, they all sit on the same IntelliJ Platform base—so installing one plugin once works everywhere, and installation and configuration steps are identical everywhere.

💡 One-sentence summary: Mainstream JetBrains IDEs are supported, they share the same IntelliJ platform base—installation and configuration steps are exactly the same in any IDE.


03 Installation: Plugin + CLI, Both Are Indispensable

This step is most prone to errors, because JetBrains integration requires two things to be in place: the plugin, and the Claude Code CLI itself, missing either won't do.

Analogy: Mobile App + Backend Account. Installed the App (plugin) but didn't register a backend account (CLI), opening it is an empty shell—the plugin handles interface integration, the "backend" actually doing the work is the CLI. So before installing the plugin, first confirm the CLI is there.

Step One: First Confirm CLI is Installed

If you followed this series reading from the beginning, the CLI was installed in Article 02. If unsure, run in any terminal:

bash
claude --version

Expected output: Prints a string of version number, like 2.x.x (Claude Code).

If it prompts command not found, it means the CLI is not yet installed. Go back to 02 Installation to install it, or use the official installation command (by platform):

bash
# macOS / Linux / WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

Domestic reminder: Installing the CLI, subsequent login authorization, and letting Claude work, all require connecting to Anthropic's services throughout, requiring a proxy. This is consistent with the terminal version and VS Code version.

Step Two: Install JetBrains Plugin

Both paths work, the first is recommended.

Method One: Search in IDE (Recommended)

  1. Open your JetBrains IDE
  2. Go to Settings → Plugins (Mac shortcut Cmd+,, Windows/Linux Ctrl+Alt+S)
  3. Switch to the Marketplace tab
  4. Search Claude Code
  5. Click Install
  6. Be sure to restart IDE after installation

Method Two: Install from Plugin Marketplace Website

Directly visit the Claude Code page on the JetBrains Plugin Marketplace, follow the page instructions to install.

Notice the plugin name has a [Beta] suffix—indicating it's still in Beta phase, behavior might change with versions (subject to official docs). Features are usable, but don't treat it as an ironclad stable release.

Step Three: Restart IDE (Do Not Skip)

The official guide specifically emphasized one sentence:

After installing the plugin, you may need to completely restart the IDE for it to take effect.

"Completely restart" means thoroughly quitting and reopening, not just closing a window. It's very easy to fall into this pit—after installing you run claude in the IDE, integrated features absolutely won't activate, you think the plugin is broken; completely quit IntelliJ and reopen, everything is normal. The official guide also lists this pit as the first item in "plugin not working" troubleshooting, showing how common it is.

❌ Easy to Step Pits✅ Correct Approach
Only installed plugin, not CLIFirst claude --version to confirm CLI is there
Use without restarting after installAfter installing completely quit IDE then reopen
Searched similar plugin installed at randomLook for the official Claude Code [Beta]
Restarted by just closing window"Completely restart" = thoroughly quit process then launch

💡 One-sentence summary: JetBrains integration = CLI itself + plugin, both must be installed; after installing you must completely restart the IDE, this is the most high-frequency reason for "installed but not effective".


04 Connection: Two Postures, Depending on Where You Launch From

Plugin installed, IDE restarted, the next step is to "connect" Claude Code with the IDE. After connecting, selection sharing, diff popping into IDE, and diagnostic sharing will activate. The connection method depends on where you launch Claude from.

The least trouble. Open the IDE's built-in integrated terminal (usually at the bottom, there is a Terminal tab), run directly:

bash
claude

Expected: Claude Code launches, all integrated features activate automatically, without any manual connection action. Because you launch inside the IDE's "belly", the plugin naturally knows which IDE to connect to.

Analogy: Connecting to Wi-Fi in your own living room. Open your phone at home and it connects automatically, no need to enter a password. Launching Claude in the built-in terminal is this experience—environment is right, connection is done automatically.

Posture Two: Launch from External Terminal, Connect Manually with /ide

If you are accustomed to using standalone terminals like iTerm, Windows Terminal, then launch Claude first, then manually connect:

bash
claude

Then enter in the Claude conversation:

text
/ide

Expected: Claude lists the detected JetBrains IDEs, select the corresponding one, connection established, features activated. Analogy: Connecting to Wi-Fi at someone else's house, you have to manually select the network—/ide is this action.

An Easily Overlooked Prerequisite: Launch from Project Root Directory

Regardless of the posture, the official emphasizes:

If you want Claude to access the same files as the IDE, please launch Claude Code from the same directory as the IDE project root directory.

Put plainly: whichever project the IDE has open, launch claude in the root directory of that project. Launching in a directory like ~/Downloads, the files Claude sees won't match up with the project in the IDE. Launching with the built-in terminal naturally satisfies this—this is also another reason for Recommended Posture One.

Launch SourceConnection MethodProject Directory
IDE Built-in TerminalAuto-activates, no action neededDefaults right in project root ✅
External Terminal (iTerm etc.)Manually run /ide to select IDENeed to cd to project root yourself

Generally using the IDE built-in terminal throughout is enough—connection is automatic, directory naturally aligns, terminal and code are in the same window, pressing Cmd+Esc jumps between the two. Unless you already have an external terminal open and running something else, then you use /ide to temporarily connect.

💡 One-sentence summary: IDE built-in terminal launch = auto-connect, directory naturally aligns (recommended); external terminal launch = run /ide manually to connect. Either way, launch from the project root directory.


05 What Can It Do: Five Integrated Features

After connecting, the "buffs" given by the plugin are officially listed as five, spoken of one by one, focusing on the differences with VS Code, summarize and see the comparison table at the end of this section.

  • ① Quick Launch: Press Cmd+Esc (Mac) / Ctrl+Esc (Windows/Linux) in the editor to open Claude directly, or click the button in the UI. This is used most frequently—writing code and want to ask a question, no need to click the terminal tab with the mouse, one shortcut and focus goes over.
  • ② Selection Context Sharing: The code currently selected in the IDE, or the open tab, is automatically shared to Claude. Select a snippet and ask "why does this error", it knows which snippet you mean.
  • ③ File Citation Shortcut: Press Cmd+Option+K (Mac) / Alt+Ctrl+K (Linux/Windows) to insert a file citation, looking like @src/auth.ts#L1-99, with path and line numbers, letting Claude locate precisely.
  • ④ Diff Viewing: Code changes are displayed directly in the IDE's diff viewer, rather than drawn with text characters in the terminal (defaults might not be on, must set auto, next section explains).
  • ⑤ Diagnostic Sharing: The IDE's lint warnings, syntax errors, those red and yellow lines, are automatically shared to Claude, it can directly "see" where it's marked red, no need for you to repeat the error.

Two safety / error-prone points singled out:

⚠️ Safety (consistent with VS Code): If a file hits your set Read deny rules, its selection sharing will be blocked, not sent to Claude (subject to official docs). Sensitive files like .env are recommended to be added.

⚠️ Error-prone: The file citation shortcut is different from VS Code—VS Code is Option+K / Alt+K, JetBrains has one more key, it's Cmd+Option+K / Alt+Ctrl+K, cutting over from VS Code it is easiest to press wrong.

The diagnostic sharing point is felt most deeply. JetBrains' code inspection is originally one of the strongest in the industry—in the past you had to copy the red-marked error to the terminal Claude, now it reads it directly. For example, PyCharm marked an "unused import" plus a few yellow lines for type mismatches, just saying "fix the problems marked by the IDE", it fixes them one by one according to the diagnostics, without you pasting a line of error.

Integrated FeatureJetBrainsVS CodeNote
Quick LaunchCmd/Ctrl+EscCmd/Ctrl+EscConsistent
Selection / Tab Sharing✅ Auto✅ AutoConsistent
File Citation ShortcutCmd+Option+K / Alt+Ctrl+KOption+K / Alt+KDifferent!
Diff Pops into IDE✅ (must set auto)Consistent
Diagnostic Sharing✅ Auto✅ AutoConsistent
Dialogue Interface FormIDE Built-in TerminalIndependent Graphical PanelCore Difference

💡 One-sentence summary: Of the five buffs, selection sharing, diagnostic sharing, and diff popping into IDE are basically consistent with VS Code; the biggest difference is dialogue runs in the built-in terminal, and the file citation shortcut requires pressing one more key.


06 Configuration: Call Out Diff, Then Tune Plugin

Installed and connected is not enough, there are two configurations worth spending two minutes tuning, the experience varies a lot.

Configuration One: Set diff tool to auto (Important)

Said earlier that diffs can pop into the IDE, but this depends on a configuration item. Run /config in Claude Code, find the diff tool, set it to auto:

text
/config
ValueEffect
autoChanges display side-by-side in the IDE's diff viewer (Recommended)
terminalChanges stay in the terminal drawn with text characters

It is strongly recommended to set auto here—since you are using an IDE, utilize that handy side-by-side diff view of JetBrains, terminal text diff is really hard on the eyes when there are many changes.

Configuration Two: Plugin Settings (Settings → Tools → Claude Code [Beta])

The plugin's own settings are hidden in Settings → Tools → Claude Code [Beta]. A few worth knowing:

  • Claude command: Defaults to claude; if your claude is not in standard PATH, you can fill in absolute path (like /usr/local/bin/claude) or npx @anthropic-ai/claude-code. When clicking the Claude icon prompts "command not found", mostly it needs to be configured here.
  • Suppress "Claude command not found" notifications: Can be turned off if you find the prompts annoying.
  • Enable Option+Enter for multiline input (macOS only): When enabled, Option+Enter in prompt box inserts newline. If Option key is unexpectedly captured, affecting typing, turn it off, requires restarting terminal after modifying.
  • Enable auto-update: Automatically checks and installs plugin updates, applied upon restart.

Of these items the most important to remember is the top line Claude command path—clicking the Claude icon reporting "command not found", nine times out of ten it's this that needs configuring.

💡 WSL Users pay special attention: Set the Claude command to wsl -d Ubuntu -- bash -lic "claude" (replace Ubuntu with your WSL distribution name).

💡 One-sentence summary: Enter Claude Code run /config set diff to auto, then go to Settings → Tools → Claude Code [Beta] to tune plugin—where the Claude command path is the key to troubleshooting "command not found".


07 Three Pits Exclusive to JetBrains Users

These three pits below, JetBrains users are more likely to run into than VS Code users, the official specifically listed solutions.

Pit One: ESC Key Interrupt Fails

The JetBrains terminal has an old habit: You want to press ESC to interrupt the operation Claude is currently running, but the focus "snaps" to the editor, and the operation wasn't interrupted. The reason is it defaults to binding ESC to "Move focus to editor". Fix:

  1. Go to Settings → Tools → Terminal
  2. Choose one: Uncheck "Move focus to the editor with Escape", or click "Configure terminal keybindings" and delete the binding for "Switch focus to Editor"
  3. Apply changes

After modifying, ESC can interrupt normally. Strongly recommend changing it immediately after installing—otherwise one time Claude runs wild and you want to call stop, pressing ESC does nothing, that moment is truly anxious.

Pit Two: WSL2 Prompts "No available IDEs detected"

Using Claude Code + JetBrains IDE on WSL2, running /ide often reports "No available IDEs detected". The root cause is not the plugin being broken, but WSL2's NAT network or Windows Firewall blocking the connection between "Claude in WSL2" and "IDE on Windows" (WSL1 is unaffected). The official gave two solutions, recommend Solution One (allow firewall), because it doesn't touch the existing network mode:

bash
# Step One: check IP in WSL shell
hostname -I
# Assuming output 172.21.123.45, note down subnet 172.21.0.0/16
powershell
# Step Two: open PowerShell as administrator, create firewall rule (change IP range to your subnet)
New-NetFirewallRule -DisplayName "Allow WSL2 Internal Traffic" -Direction Inbound -Protocol TCP -Action Allow -RemoteAddress 172.21.0.0/16 -LocalAddress 172.21.0.0/16

Then restart IDE and Claude Code for rules to take effect.

Solution two is to switch WSL2 to "mirrored network" (requires Windows 11 22H2 or higher), add [wsl2] section in .wslconfig of Windows user directory, set networkingMode=mirrored, then wsl --shutdown to restart. Those using Windows 10 don't tinker with mirrored network, directly use Solution One.

Pit Three: Remote Development, Plugin Must be Installed on "Remote Host"

If you use JetBrains' Remote Development—local client connects to remote server to write code—there is a counter-intuitive point:

The plugin must be installed on the "Remote Host", not installed on your local client machine.

The installation path is Settings → Plugin (Host). A common rollover is installing the plugin on the local client, but it won't connect no matter what, tossing for a long time only to find it was installed in the wrong place. Remember: Where Claude actually works, that's where the plugin is installed. In remote development the one doing the work is the remote host, so the plugin belongs to it.

PitOne-Sentence Fix
ESC cannot interruptSettings → Tools → Terminal, uncheck "Escape moves focus to editor"
WSL2 cannot detect IDEAllow Windows Firewall (Recommended) or switch mirrored network, then restart
Remote dev cannot connectPlugin installed on remote host (Settings → Plugin (Host)), not local client

💡 One-sentence summary: ESC failure change terminal shortcut, WSL2 undetectable allow firewall, remote dev plugin installed on remote host—these three are JetBrains exclusive high-frequency pits, conveniently change the ESC one after installing.


08 Hands-on Segment: 10 Minutes to Run Through Full Process in JetBrains

This set below walks through from scratch, every step gives "what you should see", just follow along to self-verify. Using PyCharm for demonstration, steps for other JetBrains IDEs are exactly the same.

Step 0: Confirm CLI is there — Run claude --version, Expected print version number (like 2.x.x (Claude Code)); if reports command not found then first return to 02 Installation.

Step 1: Install plugin and restart — PyCharm → Settings → Plugins → Marketplace, search Claude Code → Install, completely quit PyCharm and reopen. Expected after restart under Settings → Tools you can see Claude Code [Beta].

Step 2: Create a minimal practice project — Create new file demo.py:

python
def greet(name):
    return "Hello " + name

print(greet("world"))

Step 3: Launch Claude from IDE built-in terminal — Open PyCharm bottom Terminal tab and run claude. Expected integrated features auto-activate (built-in terminal launch, no /ide needed); first time will guide you to log into Anthropic account, browser completes authorization.

Step 4: Set diff to auto — Run /config in Claude, set diff tool to auto, so the next step's changes will pop into PyCharm's diff viewer.

Step 5: Select code + Ask question, verify selection sharing

In the editor select those two lines of greet function, return to Claude terminal, input:

text
What improvements can be made to this selected function?

Expected: Claude answers based on your selected two lines (might suggest using f-string, adding type annotations)—it didn't ask you back "which function", meaning selection sharing took effect. This is a crucial step to verify if "AirDrop" got through.

Step 6: Let it modify, see diff pop into IDE

Then input:

text
Help me change it to use f-string, and add type annotations

Expected: Because auto was set in the previous step, changes display side-by-side in PyCharm's diff viewer—left original return "Hello " + name, right after change return f"Hello {name}", signature also added type annotations. Accept after seeing clearly.

Running to this step, plugin installed, CLI connected, selection sharing, diff popping into IDE, these four core things you have all verified once. If at step 5 it asks you back which function, or at step 6 diff didn't pop into IDE, turn back and check sections 03, 04, 06.


09 Summary

This article installed Claude Code into the JetBrains family, the core is just these few things:

  • Plugin is a 'bridge' not a 'panel': It connects IDE and CLI, dialogue runs in IDE built-in terminal, diff pops into IDE native viewer, unlike VS Code giving you a separate chat panel.
  • Installing requires installing two things: CLI itself + plugin, indispensable; after installing you must completely restart IDE, this is the most high-frequency reason for "installed but not effective".
  • Connecting has two postures: IDE built-in terminal launch auto-connects (recommended), external terminal runs /ide manually connects; both launch from project root directory.
  • Three exclusive pits: ESC interrupt fails (change terminal shortcut), WSL2 cannot detect IDE (allow firewall), remote development plugin installed on remote host.

You should now be able to: independently install the plugin in your own JetBrains IDE, connect Claude and the IDE, use selection sharing to feed accurate context, let changes pop into the IDE's diff viewer for review. JetBrains users are not second-class citizens—none of the core experiences that should be there are missing.

By here, the two major IDE camps of VS Code and JetBrains are both covered. Their commonality is: you must first have an IDE, then plug Claude into it. Then what if you don't want to open an IDE at all, and just want a standalone, out-of-the-box Claude client?


Next article 10 Desktop app (Desktop)—Claude Code also has a standalone desktop application, not attached to any editor, double-click to use. We will see who it is suitable for, how to choose between it and the IDE integrated versions, and what conveniences it has that IDE versions cannot give.