jetbrains.md +80 −40
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 (for example, @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
3236If you haven't installed Claude Code yet, see [our quickstart guide](/en/quickstart) for installation instructions.If you haven't installed Claude Code yet, see the [quickstart guide](/en/quickstart) for installation instructions.
33 37
34<Note>38<Note>
35 After installing the plugin, you may need to restart your IDE completely for it to take effect.39 After installing the plugin, you may need to restart your IDE completely for it to take effect.
37 41
38## Usage42## Usage
39 43
4044### From Your IDE### From your IDE
41 45
42Run `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.
43 47
4448### From External Terminals### From external terminals
45 49
46Use 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:
47 51
48```bash theme={null}52```bash theme={null}
49claude53claude
5054> /ide```
55
56```text theme={null}
57/ide
51```58```
52 59
53If 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.
54 61
55## Configuration62## Configuration
56 63
5764### Claude Code Settings### Claude Code settings
58 65
59Configure IDE integration through Claude Code's settings:66Configure IDE integration through Claude Code's settings:
60 67
611. Run `claude`681. Run `claude`
622. Enter the `/config` command692. Enter the `/config` command
63703. 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
64 71
6572### Plugin Settings### Plugin settings
66 73
67Configure 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]**:
68 75
6976#### General Settings#### General settings
70 77
7178* **Claude command**: Specify a custom command to run Claude (for example, `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`
7279* **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
7380* **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.
7481* **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
75 82
76<Tip>83<Tip>
77 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)
78</Tip>85</Tip>
79 86
8087#### ESC Key Configuration#### ESC key configuration
81 88
82If 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:
83 90
89 96
90This allows the ESC key to properly interrupt Claude Code operations.97This allows the ESC key to properly interrupt Claude Code operations.
91 98
9299## Special Configurations## Special configurations
93 100
94101### Remote Development### Remote development
95 102
96<Warning>103<Warning>
97 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)**.
99 106
100The 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.
101 108
102109### WSL Configuration### WSL configuration
103 110
104111<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.
105112 WSL users may need additional configuration for IDE detection to work properly. See our [WSL troubleshooting guide](/en/troubleshooting#jetbrains-ide-not-detected-on-wsl2) for detailed setup instructions.
106113</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 ```
124
125 Note the subnet, for example `172.21.123.45` is in `172.21.0.0/16`.
126 </Step>
127
128 <Step title="Create a firewall rule">
129 Open PowerShell as Administrator and run the following, adjusting the IP range to match your subnet:
107 130
108131WSL configuration may require: ```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>
109 135
110136* Proper terminal configuration <Step title="Restart your IDE and Claude Code">
111137* Networking mode adjustments Close and reopen both so the new rule takes effect.
112138* Firewall settings updates </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.
113 153
114## Troubleshooting154## Troubleshooting
115 155
116156### Plugin Not Working### Plugin not working
157
158If the plugin is installed but Claude Code features don't appear in your IDE:
117 159
118* Ensure you're running Claude Code from the project root directory160* Ensure you're running Claude Code from the project root directory
119* Check that the JetBrains plugin is enabled in the IDE settings161* Check that the JetBrains plugin is enabled in the IDE settings
120* 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)
121* For Remote Development, ensure the plugin is installed in the remote host163* For Remote Development, ensure the plugin is installed in the remote host
122 164
123165### IDE Not Detected### IDE not detected
166
167If running `claude` shows "No available IDEs detected":
124 168
125* Verify the plugin is installed and enabled169* Verify the plugin is installed and enabled
126* Restart the IDE completely170* Restart the IDE completely
127* Check that you're running Claude Code from the integrated terminal171* Check that you're running Claude Code from the integrated terminal
128172* For WSL users, see the [WSL troubleshooting guide](/en/troubleshooting#jetbrains-ide-not-detected-on-wsl2)* For WSL users, see [WSL configuration](#wsl-configuration) above
129 173
130174### Command Not Found### Command not found
131 175
132If clicking the Claude icon shows "command not found":176If clicking the Claude icon shows "command not found":
133 177
1341781. 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
1352. Configure the Claude command path in plugin settings1792. Configure the Claude command path in plugin settings
1363. 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
137 181
138182## Security Considerations## Security considerations
139 183
140When 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.
141 185
145* Taking extra care to ensure Claude is only used with trusted prompts189* Taking extra care to ensure Claude is only used with trusted prompts
146* Being aware of which files Claude Code has access to modify190* Being aware of which files Claude Code has access to modify
147 191
148192For additional help, see our [troubleshooting guide](/en/troubleshooting).For Claude Code installation or login problems outside the IDE, see [Troubleshoot installation and login](/en/troubleshoot-install).
149
150
151
152> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt