headroom.walls.sh · jetbrains
Claude Code works inside any JetBrains IDE — IntelliJ IDEA, PyCharm, WebStorm, GoLand, Rider, and the rest — through its official plugin and the built-in terminal. This page covers both approaches, when to use each, and how to get the most out of the combination.
There's a dedicated Claude Code plugin for JetBrains IDEs, and there's the embedded terminal. They're complementary — the plugin brings Claude Code into the IDE sidebar; the terminal is the full agent with no restrictions.
| Approach | Best for | Tradeoffs |
|---|---|---|
| JetBrains plugin | Inline assistance, quick edits, staying in the editor flow | Not the full agentic terminal experience |
| Embedded terminal | Multi-file refactors, test-fix loops, autonomous runs | Requires switching focus to the terminal panel |
The plugin adds a Claude Code panel to the IDE sidebar. You can ask questions about code in context, get inline explanations, and trigger edits without leaving the editor. Authentication uses the same Claude account as the CLI — log in once and both work.
The JetBrains embedded terminal gives you the complete Claude Code experience — the same terminal agent as anywhere else, with full tool access, multi-file edits, and unattended runs. Open it with Alt+F12 (Windows/Linux) or ⌥F12 (macOS).
The terminal opens at the project root automatically, so Claude Code sees the same working directory as the IDE:
claude "refactor the service layer in src/services/ to use dependency injection — run tests after"
While the terminal runs, you stay in the IDE — view diffs in the editor, run the debugger, use the file tree. The terminal pane sits below the editor; you can watch the agent work and switch back to code as it writes.
Claude Code reads files relative to the directory it starts in — which is the project root when launched from the JetBrains terminal. That means you can reference any project path directly:
claude "add Javadoc to all public methods in src/main/java/com/example/api/"
Or reference the currently open file by name (check the editor tab):
claude "explain the auth flow in AuthService.java and suggest where to add rate limiting"
For longer context, use @file references at the prompt:
claude "@src/main/java/com/example/UserRepository.java write unit tests for every public method"
Add a CLAUDE.md at the project root to give Claude Code persistent context about the project. JetBrains projects often have specific build systems (Maven, Gradle, sbt) and conventions worth encoding:
## Build - Build: mvn clean install - Test: mvn test -pl module-name - Lint: ./gradlew checkstyleMain ## Conventions - Java 17, Spring Boot 3.x - All services in src/main/java/com/example/services/ - Tests in src/test/java/ mirroring the source tree - No Lombok — use explicit getters/setters
Claude Code reads CLAUDE.md at the start of every session. You never need to re-explain the project structure.
| Claude Code | JetBrains AI | |
|---|---|---|
| Model | Claude (Anthropic) | Multiple (JetBrains-managed) |
| Interaction | Terminal agent — writes and runs code | In-editor inline assistant |
| Multi-file edits | Yes — reads and edits any file in the project | Limited — focused on open files |
| Shell / terminal access | Yes — runs commands, tests, builds | No |
| Autonomous runs | Yes — write → run → fix → repeat | No |
| Billing | Claude Pro/Max subscription or API | JetBrains AI subscription |
| Offline / local | No | Some local model support |
They're complementary. JetBrains AI handles inline completions and quick questions while you type. Claude Code handles the heavier autonomous work — test-fix loops, refactors across dozens of files, build debugging — that benefits from a full agent with shell access.
A typical session in IntelliJ + Claude Code:
Alt+F12) — it's already in the project rootclaudeCtrl+D on a changed file) to see exactly what Claude Code wroteclaude "add error wrapping to all functions in pkg/storage/ that return errors — use fmt.Errorf with %w, run go vet after"
GoLand's project root matches where Claude Code starts, so package paths like ./pkg/storage/... work directly in go test commands Claude Code runs.
claude "add type hints to all functions in src/api/ that are missing them — use the existing patterns in the file as a guide, run mypy after"
Point Claude Code at the virtualenv if needed via CLAUDE.md: Test: python -m pytest. It will use that command consistently throughout the session.
Autonomous Claude Code runs from the JetBrains terminal burn session budget silently — test loops, build cycles, and multi-file refactors are fast. Headroom shows your Claude Code session (5h) and weekly (7d) utilization live in the macOS menu bar. No token, no API key: it reads the file Claude Code writes to ~/.claude/.
Install in one line:
Color-coded from calm to amber to red. You see your headroom without leaving IntelliJ — it's always in the corner of the screen.
→ Claude Code + VS Code integration
→ Claude Code + Neovim integration
→ Refactoring with Claude Code
→ Writing tests with Claude Code