How to use Claude Code in VS Code and JetBrains: complete IDE setup guide
Most Claude Code tutorials start in the terminal. That makes sense for learning the tool, but it is not where most developers spend their day. If you work in VS Code or a JetBrains IDE, the terminal-first workflow means constant context switching between your editor and a separate window.
Claude Code now has extensions for both VS Code and JetBrains that bring the full CLI experience into your editor. Same engine, same CLAUDE.md configuration, same tool calls. The extensions add visual diffs, inline annotations, and editor-native keybindings on top.
This guide covers how to set up Claude Code in each environment, how to configure your project so the IDE integration works well, and the practical differences between terminal, VS Code, and JetBrains workflows.
VS Code setup
Install the Claude Code extension from the VS Code marketplace. Search for "Claude Code" by Anthropic. After installation, you will see a Claude icon in the activity bar on the left side of your editor.
Click the icon to open the Claude Code panel. The first time you open it, you will be prompted to authenticate. If you already use Claude Code in the terminal and have an active session, the extension picks up your existing credentials automatically. If not, it walks you through the OAuth flow for your Anthropic account or Claude Max subscription.
Once authenticated, the extension is ready. Open any project with a CLAUDE.md file and the extension loads your project configuration automatically. You can start typing in the Claude panel exactly like you would in the terminal.
VS Code features worth knowing about
Inline diffs. When Claude proposes a file change, VS Code shows it as a native diff view in your editor tab. You can review each change, accept or reject individual hunks, and see exactly what will change before it happens. This is significantly easier to review than terminal output for large changes.
Editor context. The extension knows which files you have open, which file is active, and where your cursor is. This means you can say "fix the function I am looking at" and Claude understands which function you mean without you having to specify the file path and line number.
Status bar. The bottom status bar shows Claude's current state: idle, thinking, reading files, or writing. It also shows the running token cost for the current session. This is useful for staying aware of session costs without checking the terminal.
Keybindings. The default keybinding to open the Claude panel is Cmd+Shift+P (or Ctrl+Shift+P) then typing "Claude." You can rebind this to any shortcut you prefer. Common choices are Cmd+K Cmd+C or a dedicated function key.
JetBrains setup
Open your JetBrains IDE (IntelliJ, WebStorm, PyCharm, GoLand, or any other). Go to Settings, then Plugins, then Marketplace. Search for "Claude Code" and install the plugin by Anthropic.
After installation, restart the IDE. A new tool window called "Claude Code" appears in the bottom panel, similar to the Terminal or Version Control tool windows. Authentication works the same way as VS Code: existing terminal credentials are picked up automatically, or you go through the OAuth flow.
The JetBrains plugin reads the same CLAUDE.md and .claude/rules/ as the terminal CLI. Your project configuration does not need any changes.
JetBrains-specific features
Diff viewer. Proposed changes open in JetBrains' native diff viewer. If you already use JetBrains for code review, the diff interface will feel familiar. Multi-file changes are easier to review here than in terminal output.
Project-aware navigation. When Claude references a file or symbol, the JetBrains plugin can link directly to the definition in your IDE. Click a file path in the Claude output and it opens in the editor at the correct line.
Terminal integration. The JetBrains built-in terminal works well alongside the Claude Code plugin. You can keep a terminal tab open for CLI-specific workflows while using the plugin for interactive work. Teams often create shell aliases or scripts for common Claude Code workflows that run from the JetBrains terminal.
Configuring your CLAUDE.md for IDE workflows
The same CLAUDE.md works in all three environments, but some configuration choices work better when you are primarily using an IDE.
Keep your CLAUDE.md concise. IDE sessions tend to be shorter and more focused than terminal sessions. A 300-word CLAUDE.md that covers your project structure, coding conventions, and test commands is better than a 2,000-word document. In an IDE, you are usually working on one file or feature at a time. The context window should not be dominated by project instructions.
Use .claude/rules/ for specific conventions. Move detailed rules about testing, security, API patterns, and framework-specific conventions into separate files under .claude/rules/. These load on demand rather than on every message. In an IDE workflow where sessions are focused on a single concern, this keeps the active context tight.
Specify your preferred file structure. IDE users tend to work within established directory conventions more strictly than terminal users. Make your directory structure explicit in your CLAUDE.md so Claude creates new files in the right places. Something like:
# File structure
src/components/ — React components (PascalCase.tsx)
src/hooks/ — Custom hooks (use*.ts)
src/utils/ — Utility functions (camelCase.ts)
src/types/ — TypeScript type definitions
tests/ — Mirror src/ structure Add your IDE-specific test commands. If you run tests through your IDE rather than the terminal, still document the CLI test commands in CLAUDE.md. Claude needs to be able to verify its own work, and it does that by running commands, not by clicking IDE buttons.
Terminal vs IDE: when to use which
The IDE extensions are better for focused, iterative work on specific files. Reviewing diffs visually, applying changes selectively, and staying in your editor flow. This covers most day-to-day development.
The terminal is better for broad, multi-file operations. Refactoring across 20 files, running batch operations, or doing exploratory work where you are not sure which files will change. The terminal output is faster for scanning large volumes of changes.
The terminal is also better for automation. If you are running Claude Code in CI/CD pipelines, pre-commit hooks, or scheduled tasks, the CLI is the only option. IDE extensions are interactive tools.
Many developers use both. IDE for feature work and bug fixes during the day. Terminal for larger refactors, project setup, and automation tasks. The CLAUDE.md configuration is shared, so there is no duplication.
Setting up a project from scratch for IDE use
If you are starting a new project and want Claude Code to work well from the IDE immediately, here is the minimal setup:
Step 1: Generate a CLAUDE.md. Use ContextKit's free generator to create a config file for your stack. Answer 5 questions about your project (language, framework, test runner, conventions) and get a production-ready CLAUDE.md in 30 seconds. Export it and drop it in your project root.
Step 2: Create .claude/rules/ for detailed conventions. If your project has strict patterns (API response format, error handling, naming conventions), create rule files. One file per concern. Keep each under 200 words.
Step 3: Open the project in your IDE. The Claude Code extension detects the CLAUDE.md automatically. Start a conversation and verify that Claude follows your conventions on the first task.
Step 4: Score your config. After your first session, paste your CLAUDE.md into the ContextKit Analyzer to see what you might be missing. Most initial configs score 4-6 out of 10. The suggestions are specific enough to act on immediately.
Troubleshooting common IDE issues
"Claude Code not found" in the IDE. The extensions require the Claude Code CLI to be installed and on your PATH. Run claude --version in a terminal to verify. If it works in the terminal but not the IDE, your IDE might be using a different shell profile. Check the IDE's terminal settings and ensure the PATH includes the Claude Code binary location.
Changes not appearing in the editor. If Claude makes changes through the CLI that do not immediately appear in the IDE, it is usually a file watcher delay. Most IDEs refresh open files within a second. If you are using an external file sync tool (like Docker volumes or remote development), the delay can be longer.
Authentication expiring. Claude Code sessions use OAuth tokens that refresh automatically. If you see authentication errors in the IDE, close and reopen the Claude panel. If that does not work, run claude auth in the terminal to refresh your credentials. The IDE extension picks up new credentials on the next interaction.
High token usage in IDE mode. IDE extensions send additional context (open files, cursor position) that the terminal CLI does not. This adds a small amount to each message. If you are cost-sensitive, close files you are not actively working on before starting a Claude session. The extension only sends context for open editor tabs.
The practical difference IDE integration makes
The core improvement is that you stay in your editor. No terminal tab switching, no copy-pasting file paths, no mentally translating diff output into "what actually changed." The visual diff review alone saves significant time on anything beyond trivial changes.
The less obvious improvement is context. When Claude knows which file you are looking at and where your cursor is, your prompts can be shorter and more natural. "Add error handling to this function" works when Claude can see which function you mean. In the terminal, that same instruction requires specifying the file, the function name, and probably the line range.
The configuration investment is the same either way. A good CLAUDE.md makes Claude Code work well whether you use it from the terminal, VS Code, or JetBrains. The IDE extensions just make the interaction smoother.
You might also like
Want to build your own AI OS?
The AI OS Blueprint gives you the complete system: 53-page playbook, working skills, and a clonable repo. Starting at $47.
30-day money-back guarantee. No subscription.