Claude Code in JetBrains IDEs
Use Claude Code in IntelliJ IDEA, PyCharm, WebStorm, GoLand, PhpStorm, or Android Studio with one AI in IDE API key.
This is a different integration from VS Code and Cursor: JetBrains has no self-contained chat extension. The plugin drives the claude command in the IDE's integrated terminal over a local socket, so you install a CLI, install a plugin, and configure the CLI's environment. Nothing here is a single-click install, and any guide that promises one is wrong.
How the JetBrains integration differs
| VS Code / Cursor | JetBrains | |
|---|---|---|
| What you install | one extension that bundles the CLI | the CLI plus a plugin |
| Where the chat lives | a native panel inside the editor | the IDE terminal, with diffs rendered in the IDE |
| How it finds Claude | bundled binary | claude on PATH, or a path you set in plugin settings |
| How it connects | extension process | plugin runs a local MCP server; the CLI connects over ws:// on a random loopback port |
Because the CLI is the thing talking to the network, all AI in IDE settings belong to the CLI, not to a plugin GUI. That is good news: one ~/.claude/settings.json configures the CLI, the plugin, and any terminal session.
Versions and prerequisites
| Component | Requirement |
|---|---|
| JetBrains IDE | any current build of IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, or Android Studio |
| Node.js | 22 or later for npm installation. The native CLI runs without Node.js. |
| Claude Code CLI | current build, installed globally |
| Claude Code plugin | from JetBrains Marketplace, beta channel |
| AI in IDE key | AWSQ or CCMAX channel, from API Keys |
| Anthropic account | not required when an API key and base URL are set |
The plugin is published as Claude Code [Beta]. Features and settings menus move between releases, so check the plugin page for the build you install rather than assuming an option exists.
Install
1. The CLI
1 npm install -g @anthropic-ai/claude-code2 claude --version
Confirm that claude resolves from a plain terminal. If it does not, the plugin cannot launch it and shows Cannot launch Claude Code. Node version managers (nvm, fnm, asdf) are the usual cause: the shell resolves claude through an initialization script that the IDE never runs. Install with a system-wide Node, or set the absolute path in the next step.
2. The plugin
Open Settings → Plugins → Marketplace, search for Claude Code, install, and restart the IDE completely — not just a project reopen. In Remote Development, install the plugin on the host through Settings → Plugin (Host), not on your local client; a locally installed plugin will not connect to a remote project.
3. Point the plugin at the CLI
Settings → Tools → Claude Code [Beta] → Claude command takes a command string, not just a path:
claudewhen it is onPATH/usr/local/bin/claudeor another absolute pathnpx @anthropic-ai/claude-codeto always run the latest published CLIwsl -d Ubuntu -- bash -lic "claude"on Windows with WSL, replacingUbuntuwith your distribution
That setting is the reliable fix for command not found notifications.
Create and copy the API key
- Choose a plan on pricing. One account can hold separate Claude, GPT, and Gemini keys; each key is tied to its vendor channel.
- Open API Keys and create a key.
- Select AWSQ or CCMAX. These are the Claude Code channels; Codex and Gemini keys use different endpoints and fail here.
- You can view or copy the full key again from the API Keys list.
Configuration
The CLI reads ~/.claude/settings.json (macOS/Linux) or C:/Users/<UserName>/.claude/settings.json (Windows). Create it with:
1 {2 "$schema": "https://json.schemastore.org/claude-code-settings.json",3 "env": {4 "ANTHROPIC_BASE_URL": "https://api.aiinide.com",5 "ANTHROPIC_AUTH_TOKEN": "YOUR_DASHBOARD_API_KEY",6 "API_TIMEOUT_MS": "600000",7 "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"8 }9 }
Keep ANTHROPIC_BASE_URL at the host: the CLI appends /v1/messages. A base URL with /v1 produces /v1/v1/messages and a 404. If you already have a settings.json with permissions or hooks, add the env object to it rather than replacing the file.
Why the file instead of a shell export? Because a JetBrains IDE launched from the dock or Start menu does not run your shell profile, and the plugin inherits the IDE's environment. A file is read by the CLI itself and works no matter how the terminal was started. If you do want environment variables, put them in the shell profile and make sure the IDE was started from a shell, or set them in the plugin's command line.
If you also want the CLI to skip its first-run login prompt, the presence of ANTHROPIC_AUTH_TOKEN is enough — Claude Code uses the token when no claude.ai session exists.
Verify
First check your key and Claude channel by listing models. This request does not consume quota.
1 curl --globoff -i 'https://api.aiinide.com/v1/models' \2 -H "x-api-key: YOUR_DASHBOARD_API_KEY" \3 -H "anthropic-version: 2023-06-01"
HTTP 200 returns the model list. HTTP 401 means the key is missing, invalid, or expired. HTTP 400 means this key belongs to a different channel. Use an ID from the list in the Messages example below.
- Terminal first. Open the IDE's integrated terminal in your project root and run
claude. You should get a prompt with no login screen. If this fails, the plugin cannot work either; fix the CLI and environment before touching the plugin. - Connect from the IDE. With the project open, run
claudefrom the IDE terminal or pressCmd+Esc/Ctrl+Esc. The plugin launches the CLI and connects. - Confirm the connection. Ask
/status; it reports the version, model, and account state. A connected IDE session also renders file edits as diffs in the IDE rather than in the terminal. - Connect an external terminal if you started
claudeoutside the IDE: type/ideinside Claude Code. Success printsConnected to IntelliJ IDEA.(with your IDE's name). Start the CLI from the same directory as the project root or the file set will not match. - Test model inference directly with the verified key.
1 curl --globoff 'https://api.aiinide.com/v1/messages' \2 -H "x-api-key: YOUR_DASHBOARD_API_KEY" \3 -H "anthropic-version: 2023-06-01" \4 -H "Content-Type: application/json" \5 -d '{"model":"MODEL_ID_FROM_LIST","messages":[{"role":"user","content":"ping"}],"max_tokens":16}'
- Usage. Usage shows tokens billed to the key after the first successful prompt.
Troubleshooting
Use an exact ID from GET /v1/models. A mistyped claude-* name can resolve to the configured default Claude model and incur charges at that model’s rate.
API Error: 404
Set ANTHROPIC_BASE_URL to https://api.aiinide.com. Adding /v1 sends the request to /v1/v1/messages, which returns 404.
API Error: 400
- Wrong channel. A Codex or Gemini key authenticates against
/responsesor/v1beta/models/...; on this endpoint it returns 400. Create an AWSQ or CCMAX key. - Broken
settings.json. The CLI silently falls back when the JSON does not parse, so the request goes to the real Anthropic endpoint with your proxy token and fails. Validate the file — the$schemaline gives inline errors in the IDE.
Authentication checks
Use the status from GET /v1/models to diagnose the key. Native POST /v1/messages can return HTTP 200 with an authentication message in content even when the key is missing or invalid.
- Settings in the wrong place. In Remote Development or a container,
~/.claude/settings.jsonmust exist on the host or container running the CLI, not on your laptop. - A stale
ANTHROPIC_API_KEY. If your environment also exports an Anthropic key, it can take precedence overANTHROPIC_AUTH_TOKEN. Unset it and restart the IDE. - Expired key. Check the key's expiration in the dashboard; rotate rather than extend.
JetBrains-specific integration failures
| What you see | Cause | Fix |
|---|---|---|
Cannot launch Claude Code | claude not on the IDE's PATH | set Claude command to an absolute path or npx @anthropic-ai/claude-code |
No available IDEs detected from /ide | plugin disabled, IDE not restarted, or CLI started from a different user session | enable the plugin, restart the IDE fully, start claude from the IDE terminal |
No available IDEs detected on WSL2 | NAT networking or Windows Firewall blocking loopback between WSL and the IDE | allow the WSL subnet through the firewall, or switch .wslconfig to networkingMode=mirrored |
| Plugin installed but no diffs appear | Diff tool set to terminal | run /config and set Diff tool to auto — the entry only appears while connected to an IDE |
Esc does not interrupt Claude | IDE steals the key | Settings → Tools → Terminal, uncheck Move focus to the editor with Escape |
| Features missing in a Remote Development project | plugin installed on the client | install it via Settings → Plugin (Host) |
| Diffs open in a new window instead of the project | project root mismatch | start claude from the project root directory |
Timeouts and proxying
The CLI's API_TIMEOUT_MS covers long agent turns; a corporate proxy adds latency on every request. If requests fail at a fixed interval, the timeout is not being read — confirm it is inside env in settings.json and restart the IDE. Behind a TLS-inspecting proxy, set NODE_EXTRA_CA_CERTS to the proxy root CA path in the same env block.
A note on permission modes
In JetBrains, the plugin can modify IDE configuration files that the IDE may execute. Keep edits in Manual mode with acceptEdits off for untrusted repositories, and be deliberate about which project directories you open in a session that can write.
Models and pricing
| Model | Channel | Use it for |
|---|---|---|
claude-opus-5-5 / claude-opus-5.5 | AWSQ, CCMAX | multi-file refactors, long autonomous tasks |
claude-sonnet-5-5 / claude-sonnet-5.5 | AWSQ, CCMAX | default for everyday work |
claude-haiku-4-5-20251001 | AWSQ, CCMAX | fast, cheap edits and checks |
Opus 5.5 base rates: $4 per 1M input tokens, $0.20 per 1M cache reads, $20 per 1M output tokens. Quota consumption is 0.8× on AWSQ and 2× on CCMAX. Fast mode doubles base and cache rates when the upstream serves it.
- Plans: pricing
- Keys and quota: API Keys
- Protocol details: Configuration
- Official plugin listing: JetBrains Marketplace
- Official integration guide: code.claude.com JetBrains
FAQ
Why is there no one-click setup? Because the plugin deliberately does not bundle the CLI — it launches your installed claude so the terminal and the IDE share one configuration. That means a CLI install plus a plugin install, in that order.
Can I reuse my VS Code extension? No. The VS Code and Cursor extension is a separate product; here the interface is the CLI in the IDE terminal. What you can reuse is ~/.claude/settings.json, which both read.
Does the plugin need an Anthropic login? No. With ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL set, the CLI skips the login prompt and sends requests to AI in IDE.
Which IDEs are supported? IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, and Android Studio are the documented ones. Others built on the same platform often work; the plugin is beta, so verify diffs and /ide before relying on it.