Using Claude Code in JetBrains IDEs
Claude Code deeply integrates with JetBrains IDEs through a dedicated plugin, offering powerful features such as interactive diff viewing and code selection context sharing, seamlessly weaving AI-assisted programming into your development workflow.
Supported IDEs
The Claude Code plugin supports the vast majority of JetBrains IDEs, including:
- IntelliJ IDEA
- PyCharm
- Android Studio
- WebStorm
- PhpStorm
- GoLand
Core Features
| Function | Description |
|---|---|
| Quick start | On Mac, use Cmd+Esc, on Windows/Linux use Ctrl+Esc, to open Claude Code directly from the editor |
| Diff viewing | Code changes are displayed directly in the IDE's diff viewer rather than in the terminal |
| Selection context sharing | The currently selected code or tab content in the IDE is automatically shared with Claude Code |
| File reference shortcuts | On Mac, use Cmd+Option+K, on Linux/Windows use Alt+Ctrl+K, to quickly insert a file reference in the form of @src/auth.ts#L1-99 a reference in this form |
| Diagnostic information sharing | Diagnostic information such as lint errors and syntax errors in the IDE is automatically shared with Claude as you work |
Installation and Configuration
Step 1: Install prerequisites
Before installing the JetBrains plugin, you need to install the Claude Code CLI first.
# macOS、Linux、WSL 安装
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell Installation
irm https://claude.ai/install.ps1 | iex
# Verify installation
claude --version
For detailed installation steps, please refer to the Claude Code installation guide。
Step 2: Install the JetBrains plugin
- Open your JetBrains IDE
- Enter Settings -> Plugins
- Switch to Marketplace tag
- Search Claude Code
- Click Install
- After installation is completeRestart the IDE

Step 3: Launch and connect Claude Code
Launch from the IDE's integrated terminal (recommended)
Run the following command in the IDE's built-in terminal, and all integration features will activate automatically:
claude

This is a welcome screen; after pressing Enter, you can start working:

Connect from an external terminal
If you are using an external terminal, you can use the /ide command to connect Claude Code to your JetBrains IDE:
# 先启动 Claude Code
claude
# Then execute the /ide command to connect to the IDE
/ide

💡 Tip: To ensure Claude can access the same files as the IDE, launch Claude Code from the IDE project root directory.
Step 4: Configure Claude Code
Configure the diff tool
After running Claude Code, set the diff display mode with the following steps:
# 启动 Claude Code
claude
# Enter configuration
/config
Set the diff tool to auto, and code changes will be displayed directly in the IDE diff viewer; set it to terminal to keep displaying in the terminal.

Configure plugin settings
Enter Settings → Tools → Claude Code [Beta], you can configure the following options:
- Claude command (Claude command path): Customize the command to run Claude, for example
claude、/usr/local/bin/claudeornpx @anthropic-ai/claude-code - Suppress notification for Claude command not found: Disable the notification when the Claude command is not found
- Enable using Option+Enter for multi-line prompts(macOS only): When enabled,
Option+Enteryou can insert a line break in the prompt box - Enable automatic updates: Automatically check for and install plugin updates; takes effect after restart

💡 WSL users: Set the Claude command to
wsl -d Ubuntu -- bash -lic "claude"(replaceUbuntuwith your WSL distribution name).
Configure the ESC key (optional)
If both the ESC key cannot interrupt Claude Code operations; fix it with these steps:
- Enter Settings → Tools → Terminal
- Uncheck "Move focus to the editor with Escape", or click "Configure terminal keybindings" and delete "Switch focus to Editor" Keyboard shortcut
- Apply changes

Special scenario configuration
Remote Development
When using JetBrains Remote Development, the plugin must be installed on theremote host, not the local client machine.
Operation path:Settings → Plugin (Host)
WSL2 configuration
If you use Claude Code in a WSL2 environment and encounter a "No available IDEs detected" error, it is usually because WSL2's NAT networking or the Windows firewall is blocking the connection.
Solution 1: Add a Windows firewall rule (recommended)
# 第一步:在 WSL 中查看 IP 地址
hostname -I
# Example output 172.21.123.45, subnet is 172.21.0.0/16
# 第二步:以管理员身份打开 PowerShell,创建防火墙规则(根据你的子网调整 IP 范围)
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 the IDE and Claude Code for it to take effect.
Solution 2: Switch WSL2 to mirrored networking mode(requires Windows 11 22H2 or later)
In the .wslconfig file in your Windows user directory, add:
[wsl2]
networkingMode=mirrored
Then run in PowerShell: wsl --shutdown Restart WSL.
Troubleshooting common problems
Plugin features do not appear after installation
- Confirm that Claude Code is launched from theProject root directoryand started there
- Check whether the JetBrains plugin is enabled in the IDE settings
- TryFully restart the IDE(multiple restarts may be needed)
- In remote development scenarios, confirm the plugin is installed on the remote host
Prompt: "No available IDEs detected"
- Confirm the plugin is installed and enabled
- Fully restart the IDE
- Ensure Claude Code is running from the IDE's integrated terminal
- WSL users, please refer to the above WSL2 configuration Section
Clicking the Claude icon prompts "command not found"
- Run in the terminal:
claude --version, to verify Claude Code is installed correctly - Manually configure the Claude command path in the plugin settings
- WSL users, please use the WSL command format described above