headroom.walls.sh · jetbrains

Claude Code + 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.

Two ways to use Claude Code in JetBrains

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.

ApproachBest forTradeoffs
JetBrains pluginInline assistance, quick edits, staying in the editor flowNot the full agentic terminal experience
Embedded terminalMulti-file refactors, test-fix loops, autonomous runsRequires switching focus to the terminal panel

Installing the Claude Code plugin

  1. Open any JetBrains IDE
  2. Go to Settings → Plugins → Marketplace
  3. Search for Claude Code
  4. Install and restart the IDE

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 embedded terminal workflow (the full agent)

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.

Pin the terminal to the bottom of the IDE (not a floating window) so you can watch Claude Code's output while keeping the editor and file tree visible. In IntelliJ, drag the terminal tab to the bottom tool window row.

Passing project context from JetBrains

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"

CLAUDE.md for JetBrains projects

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.

JetBrains + Claude Code vs JetBrains AI

Claude CodeJetBrains AI
ModelClaude (Anthropic)Multiple (JetBrains-managed)
InteractionTerminal agent — writes and runs codeIn-editor inline assistant
Multi-file editsYes — reads and edits any file in the projectLimited — focused on open files
Shell / terminal accessYes — runs commands, tests, buildsNo
Autonomous runsYes — write → run → fix → repeatNo
BillingClaude Pro/Max subscription or APIJetBrains AI subscription
Offline / localNoSome 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.

Practical workflow: IDE + terminal agent

A typical session in IntelliJ + Claude Code:

  1. Open the project in IntelliJ IDEA as usual
  2. Open the terminal pane (Alt+F12) — it's already in the project root
  3. Start Claude Code: claude
  4. Give it the task: write the failing test, fix the imports, run the build
  5. While it works, stay in the editor — review the diffs as they appear in the file tree
  6. Use IntelliJ's diff viewer (Ctrl+D on a changed file) to see exactly what Claude Code wrote
  7. Run the debugger on the result if needed

GoLand and Go projects

claude "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.

PyCharm and Python projects

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.

Monitor session usage during long runs

Headroom — session usage in your menu bar while JetBrains runs

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:

brew install patwalls/tap/headroom

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