YouTip LogoYouTip

Claude Code Jetbrains

Using Claude Code in JetBrains IDEs

Claude Code integrates deeply with JetBrains IDEs through a dedicated plugin, offering powerful features such as interactive diff viewing, code selection context sharing, and more, seamlessly incorporating AI-assisted programming into your development workflow.

Supported IDEs

The Claude Code plugin supports most JetBrains IDEs, including:

  • IntelliJ IDEA
  • PyCharm
  • Android Studio
  • WebStorm
  • PhpStorm
  • GoLand

Core Features

Feature Description
Quick Launch Use Cmd+Esc on Mac or Ctrl+Esc on Windows/Linux to open Claude Code directly from the editor
Diff Viewer Code changes are displayed in the IDE's diff viewer instead of in the terminal
Selection Context Sharing Currently selected code or tab content in the IDE is automatically shared with Claude Code
File Reference Shortcut Use Cmd+Option+K on Mac or Alt+Ctrl+K on Linux/Windows to quickly insert file references in the format @src/auth.ts#L1-99
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 installation
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

  1. Open your JetBrains IDE
  2. Go to Settings β†’ Plugins
  3. Switch to the Marketplace tab
  4. Search for Claude Code
  5. Click Install
  6. Restart the IDE after installation is complete

Image 1

Step 3: Launch and Connect Claude Code

Launch from IDE Integrated Terminal (Recommended)

Run the following command in the IDE's built-in terminal, and all integration features will be automatically activated:

claude

Image 2

This is a welcome screen. After pressing Enter, you can start working:

Image 3

Connect from External Terminal

If you are using an external terminal, you can connect Claude Code to your JetBrains IDE using the /ide command:

# First, start Claude Code
claude

# Then execute the /ide command to connect to the IDE
/ide

Image 4

πŸ’‘ Tip: To ensure Claude can access the same files as the IDE, please start Claude Code from the IDE project root directory.

Step 4: Configure Claude Code

Configure Diff Tool

After running Claude Code, set the diff display mode through the following steps:

# Start 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.

Image 5

Configure Plugin Settings

Go to Settings β†’ Tools β†’ Claude Code to configure the following options:

  • Claude command: Customize the command to run Claude, for example claude, /usr/local/bin/claude, or npx @anthropic-ai/claude-code
  • Suppress notification for Claude command not found: Disable notification when the Claude command is not found
  • Enable using Option+Enter for multi-line prompts (macOS only): When enabled, Option+Enter inserts a new line in the prompt box
  • Enable automatic updates: Automatically check and install plugin updates, effective after restart

Image 6

πŸ’‘ WSL Users: Set the Claude command to wsl -d Ubuntu -- bash -lic "claude" (replace Ubuntu with your WSL distribution name).

Configure ESC Key (Optional)

If the ESC key cannot interrupt Claude Code operations, follow these steps to fix it:

  1. Go to Settings β†’ Tools β†’ Terminal
  2. Uncheck "Move focus to the editor with Escape", or click "Configure terminal keybindings" and delete the "Switch focus to Editor" shortcut
  3. Apply changes

Image 7


Special Scenario Configuration

Remote Development

When using JetBrains Remote Development, the plugin must be installed on the remote host, not the local client machine.

Navigation path: Settings β†’ Plugin (Host)

WSL2 Configuration

If you are using Claude Code in a WSL2 environment and encounter the "No available IDEs detected" error, it is usually because WSL2's NAT network or Windows Firewall is blocking the connection.

Solution 1: Add Windows Firewall Rule (Recommended)

# Step 1: Check IP address in WSL
hostname -I
# For example, output 172.21.123.45, subnet is 172.21.0.0/16

# Step 2: Open PowerShell as administrator and create firewall rule (adjust IP range according 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 the IDE and Claude Code for changes to take effect.

Solution 2: Switch WSL2 to Mirrored Network Mode (requires Windows 11 22H2 or later)

Add the following to the .wslconfig file in your Windows user directory:


networkingMode=mirrored

Then execute wsl --shutdown in PowerShell to restart WSL.


Troubleshooting

Plugin Features Not Appearing After Installation

  • Confirm that Claude Code was started from the project root directory
  • Check if the JetBrains plugin is enabled in IDE settings
  • Try fully restarting the IDE (may require multiple restarts)
  • In remote development scenarios, confirm the plugin is installed on the remote host

"No available IDEs detected" Message

  • Confirm the plugin is installed and enabled
  • Fully restart the IDE
  • Ensure Claude Code is running from the IDE integrated terminal
  • WSL users please refer to the WSL2 Configuration section above

Clicking Claude Icon Shows "command not found"

  1. Run claude --version in the terminal to verify Claude Code is correctly installed
  2. Manually configure the Claude command path in plugin settings
  3. WSL users please use the WSL command format mentioned above
← Agent ArchitectureAssembly File β†’