jetbrains.md +81 −39
1> ## Documentation Index
2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt
3> Use this file to discover all available pages before exploring further.
4
1# JetBrains IDEs5# JetBrains IDEs
2 6
3> Use Claude Code with JetBrains IDEs including IntelliJ, PyCharm, WebStorm, and more7> Use Claude Code with JetBrains IDEs including IntelliJ, PyCharm, WebStorm, and more
17 21
18## Features22## Features
19 23
2024* **Quick launch**: Use `Cmd+Esc` (Mac) or `Ctrl+Esc` (Windows/Linux) to open Claude Code directly from your editor, or click the Claude Code button in the UI* **Quick launch**: use `Cmd+Esc` (Mac) or `Ctrl+Esc` (Windows/Linux) to open Claude Code directly from your editor, or click the Claude Code button in the UI
2125* **Diff viewing**: Code changes can be displayed directly in the IDE diff viewer instead of the terminal* **Diff viewing**: code changes can be displayed directly in the IDE diff viewer instead of the terminal
2226* **Selection context**: The current selection/tab in the IDE is automatically shared with Claude Code* **Selection context**: the current selection or tab in the IDE is automatically shared with Claude Code
2327* **File reference shortcuts**: Use `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Linux/Windows) to insert file references (e.g., @File#L1-99)* **File reference shortcuts**: use `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Linux/Windows) to insert file references such as `@src/auth.ts#L1-99`
2428* **Diagnostic sharing**: Diagnostic errors (lint, syntax, etc.) from the IDE are automatically shared with Claude as you work* **Diagnostic sharing**: diagnostic errors from the IDE, such as lint and syntax errors, are automatically shared with Claude as you work
25 29
26## Installation30## Installation
27 31
2832### Marketplace Installation### Marketplace installation
29 33
30Find and install the [Claude Code plugin](https://plugins.jetbrains.com/plugin/27310-claude-code-beta-) from the JetBrains marketplace and restart your IDE.34Find and install the [Claude Code plugin](https://plugins.jetbrains.com/plugin/27310-claude-code-beta-) from the JetBrains marketplace and restart your IDE.
31 35
3236### Auto-InstallationIf you haven't installed Claude Code yet, see the [quickstart guide](/en/quickstart) for installation instructions.
33
34The plugin may also be auto-installed when you run `claude` in the integrated terminal. The IDE must be restarted completely to take effect.
35 37
36<Note>38<Note>
3739 After installing the plugin, you must restart your IDE completely for it to take effect. You may need to restart multiple times. After installing the plugin, you may need to restart your IDE completely for it to take effect.
38</Note>40</Note>
39 41
40## Usage42## Usage
41 43
4244### From Your IDE### From your IDE
43 45
44Run `claude` from your IDE's integrated terminal, and all integration features will be active.46Run `claude` from your IDE's integrated terminal, and all integration features will be active.
45 47
4648### From External Terminals### From external terminals
47 49
48Use the `/ide` command in any external terminal to connect Claude Code to your JetBrains IDE and activate all features:50Use the `/ide` command in any external terminal to connect Claude Code to your JetBrains IDE and activate all features:
49 51
50```bash theme={null}52```bash theme={null}
51claude53claude
5254> /ide```
55
56```text theme={null}
57/ide
53```58```
54 59
55If you want Claude to have access to the same files as your IDE, start Claude Code from the same directory as your IDE project root.60If you want Claude to have access to the same files as your IDE, start Claude Code from the same directory as your IDE project root.
56 61
57## Configuration62## Configuration
58 63
5964### Claude Code Settings### Claude Code settings
60 65
61Configure IDE integration through Claude Code's settings:66Configure IDE integration through Claude Code's settings:
62 67
631. Run `claude`681. Run `claude`
642. Enter the `/config` command692. Enter the `/config` command
65703. Set the diff tool to `auto` for automatic IDE detection3. Set the diff tool to `auto` to show diffs in the IDE, or `terminal` to keep them in the terminal
66 71
6772### Plugin Settings### Plugin settings
68 73
69Configure the Claude Code plugin by going to **Settings → Tools → Claude Code \[Beta]**:74Configure the Claude Code plugin by going to **Settings → Tools → Claude Code \[Beta]**:
70 75
7176#### General Settings#### General settings
72 77
7378* **Claude command**: Specify a custom command to run Claude (e.g., `claude`, `/usr/local/bin/claude`, or `npx @anthropic/claude`)* **Claude command**: specify a custom command to run Claude, for example `claude`, `/usr/local/bin/claude`, or `npx @anthropic-ai/claude-code`
7479* **Suppress notification for Claude command not found**: Skip notifications about not finding the Claude command* **Suppress notification for Claude command not found**: skip notifications about not finding the Claude command
7580* **Enable using Option+Enter for multi-line prompts** (macOS only): When enabled, Option+Enter inserts new lines in Claude Code prompts. Disable if experiencing issues with the Option key being captured unexpectedly (requires terminal restart)* **Enable using Option+Enter for multi-line prompts**: on macOS only. When enabled, Option+Enter inserts new lines in Claude Code prompts. Disable if the Option key is being captured unexpectedly. Requires a terminal restart.
7681* **Enable automatic updates**: Automatically check for and install plugin updates (applied on restart)* **Enable automatic updates**: automatically check for and install plugin updates, applied on restart
77 82
78<Tip>83<Tip>
79 For WSL users: Set `wsl -d Ubuntu -- bash -lic "claude"` as your Claude command (replace `Ubuntu` with your WSL distribution name)84 For WSL users: Set `wsl -d Ubuntu -- bash -lic "claude"` as your Claude command (replace `Ubuntu` with your WSL distribution name)
80</Tip>85</Tip>
81 86
8287#### ESC Key Configuration#### ESC key configuration
83 88
84If the ESC key doesn't interrupt Claude Code operations in JetBrains terminals:89If the ESC key doesn't interrupt Claude Code operations in JetBrains terminals:
85 90
91 96
92This allows the ESC key to properly interrupt Claude Code operations.97This allows the ESC key to properly interrupt Claude Code operations.
93 98
9499## Special Configurations## Special configurations
95 100
96101### Remote Development### Remote development
97 102
98<Warning>103<Warning>
99 When using JetBrains Remote Development, you must install the plugin in the remote host via **Settings → Plugin (Host)**.104 When using JetBrains Remote Development, you must install the plugin in the remote host via **Settings → Plugin (Host)**.
101 106
102The plugin must be installed on the remote host, not on your local client machine.107The plugin must be installed on the remote host, not on your local client machine.
103 108
104109### WSL Configuration### WSL configuration
105 110
106111<Warning>If you're using Claude Code on WSL2 with a JetBrains IDE and see "No available IDEs detected", the cause is usually WSL2's NAT networking or Windows Firewall blocking the connection between WSL2 and the IDE running on the Windows host. WSL1 uses the host's network directly and isn't affected.
107112 WSL users may need additional configuration for IDE detection to work properly. See our [WSL troubleshooting guide](/en/docs/claude-code/troubleshooting#jetbrains-ide-not-detected-on-wsl2) for detailed setup instructions.
108113</Warning>#### Allow WSL2 traffic through Windows Firewall
114
115This is the recommended fix because it keeps your existing WSL2 networking mode.
116
117<Steps>
118 <Step title="Find your WSL2 IP address">
119 From inside your WSL shell, run:
120
121 ```bash theme={null}
122 hostname -I
123 ```
109 124
110125WSL configuration may require: Note the subnet, for example `172.21.123.45` is in `172.21.0.0/16`.
126 </Step>
111 127
112128* Proper terminal configuration <Step title="Create a firewall rule">
113129* Networking mode adjustments Open PowerShell as Administrator and run the following, adjusting the IP range to match your subnet:
114130* Firewall settings updates
131 ```powershell theme={null}
132 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
133 ```
134 </Step>
135
136 <Step title="Restart your IDE and Claude Code">
137 Close and reopen both so the new rule takes effect.
138 </Step>
139</Steps>
140
141#### Switch WSL2 to mirrored networking
142
143Mirrored networking requires Windows 11 22H2 or later. If you're on Windows 10, use the firewall rule above instead.
144
145Add this to `.wslconfig` in your Windows user directory:
146
147```ini theme={null}
148[wsl2]
149networkingMode=mirrored
150```
151
152Then restart WSL with `wsl --shutdown` from PowerShell.
115 153
116## Troubleshooting154## Troubleshooting
117 155
118156### Plugin Not Working### Plugin not working
157
158If the plugin is installed but Claude Code features don't appear in your IDE:
119 159
120* Ensure you're running Claude Code from the project root directory160* Ensure you're running Claude Code from the project root directory
121* Check that the JetBrains plugin is enabled in the IDE settings161* Check that the JetBrains plugin is enabled in the IDE settings
122* Completely restart the IDE (you may need to do this multiple times)162* Completely restart the IDE (you may need to do this multiple times)
123* For Remote Development, ensure the plugin is installed in the remote host163* For Remote Development, ensure the plugin is installed in the remote host
124 164
125165### IDE Not Detected### IDE not detected
166
167If running `claude` shows "No available IDEs detected":
126 168
127* Verify the plugin is installed and enabled169* Verify the plugin is installed and enabled
128* Restart the IDE completely170* Restart the IDE completely
129* Check that you're running Claude Code from the integrated terminal171* Check that you're running Claude Code from the integrated terminal
130172* For WSL users, see the [WSL troubleshooting guide](/en/docs/claude-code/troubleshooting#jetbrains-ide-not-detected-on-wsl2)* For WSL users, see [WSL configuration](#wsl-configuration) above
131 173
132174### Command Not Found### Command not found
133 175
134If clicking the Claude icon shows "command not found":176If clicking the Claude icon shows "command not found":
135 177
1361781. Verify Claude Code is installed: `npm list -g @anthropic-ai/claude-code`1. Verify Claude Code is installed by running `claude --version` in a terminal
1372. Configure the Claude command path in plugin settings1792. Configure the Claude command path in plugin settings
1383. For WSL users, use the WSL command format mentioned in the configuration section1803. For WSL users, use the WSL command format mentioned in the configuration section
139 181
140182## Security Considerations## Security considerations
141 183
142When Claude Code runs in a JetBrains IDE with auto-edit permissions enabled, it may be able to modify IDE configuration files that can be automatically executed by your IDE. This may increase the risk of running Claude Code in auto-edit mode and allow bypassing Claude Code's permission prompts for bash execution.184When Claude Code runs in a JetBrains IDE with auto-edit permissions enabled, it may be able to modify IDE configuration files that can be automatically executed by your IDE. This may increase the risk of running Claude Code in auto-edit mode and allow bypassing Claude Code's permission prompts for bash execution.
143 185
147* Taking extra care to ensure Claude is only used with trusted prompts189* Taking extra care to ensure Claude is only used with trusted prompts
148* Being aware of which files Claude Code has access to modify190* Being aware of which files Claude Code has access to modify
149 191
150192For additional help, see our [troubleshooting guide](/en/docs/claude-code/troubleshooting).For Claude Code installation or login problems outside the IDE, see [Troubleshoot installation and login](/en/troubleshoot-install).