Claude Manual

Claude Code IDE Integration (VS Code / JetBrains)

Claude Code can be used from the terminal, but the IDE integration — which lets you stay inside your editor — is extremely convenient. Extensions are available for VS Code and JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, and more), letting you leverage your editor's context to get the most out of the AI assistant.

This article covers how to set up each IDE and how to incorporate Claude Code into your daily development workflow.

IDE Integration Overview

Differences from the Terminal Version

Claude Code was originally a CLI tool that runs in the terminal, but with IDE integration you can work entirely within your editor.

Terminal versionIDE integration
EnvironmentTerminal (command line)VS Code / JetBrains side panel
ContextManually specify file paths and contentsAutomatically recognizes open files and selected code
Diff viewText output in the terminalInline diff view that is easy to read
File operationsOperated via commandsChanges apply directly in the editor
Conversation continuitySession may be interruptedConversation persists tied to the workspace

Benefits of IDE Integration

  • Send selected code directly as context: Select a range in the editor and ask Claude — that code is automatically included as context
  • Inline diff view: Change proposals are shown as diffs; you can Accept or Reject each one
  • Seamless file changes: Claude's proposed changes are reflected directly in the editor, so you can review them before saving
  • Execution via the integrated terminal: Claude Code runs in the IDE's built-in terminal, so your working context is never interrupted
  • Shared conversation with the CLI: The VS Code extension embeds the CLI, so conversations started in the CLI can be continued inside the IDE, and vice versa
  • Checkpoint feature: Automatically creates Git snapshots during your session so you can safely roll back changes

Four Ways to Use Claude Code

Claude Code is available in four forms. They all use the same AI capabilities, and you can switch between them depending on the situation.

FormCharacteristicsBest for
CLI (terminal)Launch with the claude commandLarge-scale changes, embedding in scripts
IDE extensionVS Code / JetBrains side panelDay-to-day coding
Desktop appCode mode in Claude DesktopWhen you want to combine with other Claude features
Web appclaude.ai/codeWhen you want to work entirely in the browser

How They Complement Each Other

IDE integration and the terminal version are not mutually exclusive — using them situationally is the most effective approach.

  • IDE integration is best for: Reviewing, editing, or asking questions about specific files while viewing them in the editor
  • Terminal version is best for: Large-scale changes that span the whole project, embedding in CI/CD scripts, multi-step automation tasks

VS Code Extension

Installation

The standard way to add Claude Code to VS Code goes through VS Code's built-in terminal. There are two approaches: installing from the Extension Marketplace, or launching directly from the CLI.

Requirements: VS Code 1.98.0 or later is required. The same package also supports Cursor IDE.

Install from the Extension Marketplace

  1. Click the "Extensions" icon in the VS Code left sidebar (or press Ctrl+Shift+X / Cmd+Shift+X)
  2. Type "Claude Code" in the search box
  3. Select the "Claude Code" extension published by Anthropic and click "Install"

Launch Directly from the CLI

If Claude Code is already installed, you can simply run the following command in any project directory to start it with VS Code integration.

claude

When run in VS Code's integrated terminal, it automatically detects the VS Code context (open files, workspace information).

Initial Setup

After installing the extension, the following setup is required on first launch.

  1. Authentication: Sign in with your claude.ai account (if you haven't set this up yet, read Getting Started with Claude Code first)
  2. Grant workspace access: Allow Claude Code to read and write files in the workspace

Troubleshooting: If you see "Permission denied," check the Permission settings in the extension. Open VS Code Settings (Cmd+, / Ctrl+,), search for "Claude Code," and review the Workspace Trust settings.

Chat in the Side Panel

After installing the extension, a Claude Code icon appears in the VS Code left sidebar. Click it to open the side panel, where you can have a chat-style conversation.

From the side panel you can:

  • Ask free-form questions: Type questions about your code in natural language
  • Reference files: Type @ to trigger filename completion and add specific files to the context
  • Send selected code: Select code in the editor and type a question in the panel — the selected code is automatically included

Keyboard Shortcuts

ActionShortcut
Open / close the Claude Code panelCtrl+Shift+C
Send selected code to ClaudeSelect code, then Ctrl+Shift+Enter
Accept inline diffCtrl+Enter
Reject inline diffCtrl+Delete
Clear conversationType /clear in the chat

Tips: You can customize keybindings in VS Code's "Keyboard Shortcuts" settings (Cmd+K Cmd+S / Ctrl+K Ctrl+S). Search for "claude" to see all Claude Code-related shortcuts listed in one place.

Working with Inline Diffs

When Claude Code proposes changes, they appear as diffs in the editor. Deleted lines are shown in red and added lines in green — the same familiar look as a Git diff view.

  • Accept: Apply the change to the file
  • Reject: Discard the change and keep the original code
  • Accept All / Reject All: Apply bulk operations when there are multiple changes

Troubleshooting: If the inline diff is not appearing and Claude's response only shows a code block in the chat, check whether the extension is on the latest version. Older versions may not support the inline diff feature.

JetBrains Plugin

Claude Code is also available for JetBrains IDEs including IntelliJ IDEA, WebStorm, PyCharm, and GoLand.

Supported IDEs

  • IntelliJ IDEA (Ultimate / Community)
  • WebStorm
  • PyCharm (Professional / Community)
  • GoLand
  • Rider
  • CLion
  • PhpStorm

Installation

Install from JetBrains Marketplace

  1. Open Settings from the IDE menu
    • macOS: Cmd+,
    • Windows / Linux: Ctrl+Alt+S
  2. Select Plugins
  3. Open the Marketplace tab and search for "Claude Code"
  4. Click Install on the "Claude Code" plugin published by Anthropic
  5. Restart the IDE

Launch from the Integrated Terminal

Just like with VS Code, running the claude command in the JetBrains IDE's integrated terminal starts Claude Code with the IDE's context available.

claude

Using the Tool Window

After installing the plugin, a "Claude Code" tool window is added to the right sidebar of the IDE. If it is not visible, open it via View > Tool Windows > Claude Code.

The functionality is equivalent to the VS Code version:

  • Chat-style questions and conversation
  • Add files to context using @filename syntax
  • Send selected code
  • View inline diffs and Accept / Reject changes

Keyboard Shortcuts

ActionShortcut
Open / close the Claude Code tool windowCtrl+Shift+C
Send selected code to ClaudeSelect code, then Ctrl+Shift+Enter
Accept inline diffCtrl+Enter
Reject inline diffCtrl+Delete

Tips: In JetBrains IDEs, go to Settings > Keymap and search for "Claude" to see all Claude Code keybindings in one place. Conflicting shortcuts are highlighted in red so you can resolve them on the spot.

Feature Differences from the VS Code Version

As of March 2026, the VS Code and JetBrains versions offer nearly identical functionality. The main differences are:

FeatureVS CodeJetBrains
Chat panelSidebarTool window
Inline diffYesYes
File reference (@ completion)YesYes
Terminal integrationVia built-in terminalVia built-in terminal
Git integrationYesYes
Refactoring suggestionsYesYes

Troubleshooting: In JetBrains IDEs, the tool window may not appear unless the plugin is enabled with a project open. Try restarting the IDE or closing and reopening the project.

Daily Development Workflow

Here are practical development workflows using IDE integration.

Select Code and Ask a Question

This is the most common pattern.

  1. Select the code you are interested in (a function, class, entire file, etc.)
  2. Open the Claude Code panel / tool window
  3. Type your question (the selected code is automatically included as context)

Example prompts:

Tell me about any performance issues in this code
This class has too many methods. Suggest a way to split it up
Add TypeScript types to this code

Request a Fix for an Error

When you encounter a compile error or runtime error:

  1. Select the code that has the error
  2. Copy the error message
  3. Paste "Fix this error" along with the error message into the Claude Code panel

Example prompt:

I'm getting the following error. Please fix it.

Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.

Once Claude proposes a fix, review it in the inline diff and choose Accept or Reject.

Auto-Generate Tests

  1. Select the function or class you want to write tests for
  2. Give the instruction "Write unit tests"

Example prompt:

Write unit tests for the selected code.
Use Vitest as the framework. Include edge cases.

Once a test file is proposed, you can save it as a new file or append it to an existing test file.

Generate a Commit Message

  1. Review the output of git diff --staged in the IDE's integrated terminal (or pass it directly to Claude)
  2. Ask Claude to "Generate a commit message"

Example (chat panel):

@src/utils/date.ts @src/utils/date.test.ts
Generate a Conventional Commits commit message for these changes

Example (when Claude Code is running in the integrated terminal):

git diff --staged | claude -p "Generate a commit message in Conventional Commits format"

Request a Refactor

  1. Select the code to refactor (or reference the entire file with @filename)
  2. Describe the refactoring direction

Example prompt:

@src/components/UserForm.tsx
This component has grown too large. Please split it by responsibility.
Do not change the props type definitions.

Tips: When requesting a refactor, also state what you do NOT want changed — this helps prevent unintended modifications. For example: "Do not modify the tests" or "Maintain the API type definitions."

When to Use Terminal vs. IDE Integration

When IDE Integration Is Better

  • File-level work: Writing, editing, or reviewing code while viewing a specific file
  • Interactive editing: Repeatedly reviewing change proposals and choosing Accept / Reject
  • Clear context: You know exactly which file and which section you are working on
  • Normal development work: Feature implementation, bug fixes, refactoring, and other everyday coding tasks

When the Terminal Version Is Better

  • Cross-project work: Refactoring across multiple directories, bulk search and replace
  • Automation / scripting: Embedding claude -p in shell scripts
  • Large-scale changes: Processing changes that affect dozens of files at once
  • CI/CD integration: Using Claude Code inside a GitHub Actions pipeline or similar

Combining both: Use IDE integration for everyday implementation while handling cross-cutting tasks — such as "Translate all comments to English throughout the project" — with the terminal version.

Settings and Customization

VS Code Settings

Open VS Code Settings (Cmd+, / Ctrl+,) and search for "Claude Code" to configure the following options:

SettingDescription
claudeCode.modelSpecify the model to use (e.g., claude-sonnet-4-5)
claudeCode.autoApproveSet which types of actions are auto-approved
claudeCode.contextLinesNumber of lines of code sent as context (default: 50)

JetBrains Settings

Go to Settings > Tools > Claude Code to configure:

SettingDescription
ModelSelect the model to use
Auto-approve actionsTypes of actions to auto-approve
Context windowNumber of lines to include in the context

Customizing Keybindings

VS Code: Open Keyboard Shortcuts with Ctrl+K Ctrl+S and search for "claude."

JetBrains: Open Settings with Ctrl+Alt+S and search for "claude" under Keymap.

Permission Settings

You can restrict or allow the operations Claude Code is permitted to perform. This is especially important when using it on a team or on a shared machine.

  • Read: Reading files
  • Write: Writing / modifying files
  • Execute: Running shell commands

From the Claude Code settings in each IDE, you can configure which actions are auto-approved and which require confirmation each time.

Tips: For a project you are working with for the first time, start with strict permissions (no auto-approval) and loosen them as you get comfortable with how Claude behaves.

Adding Project-Specific Settings with CLAUDE.md

Rules written in CLAUDE.md are also loaded when using IDE integration.

## Notes for IDE Usage

- Always confirm that tests pass before accepting a code change
- Do not commit auto-generated code before review
- Do not change type definitions during refactoring

For details, see Getting Started with Claude Code — Creating CLAUDE.md.

Troubleshooting

Extension / Plugin Not Recognized

Symptom: The Claude Code panel does not appear even though the extension appears to be installed.

Fix:

  1. Fully restart the IDE (close the window and reopen it)
  2. Verify the extension is enabled (VS Code: check that the extension shows as "Enabled" in the extensions list)
  3. Confirm the Claude Code CLI itself is installed: claude --version

Authentication Error

Symptom: An error such as "Authentication failed" or "Not authorized" is displayed.

Fix:

  1. Run claude in the terminal to verify that authentication works
  2. Restart the IDE and sign in again
  3. If you are using an API key, confirm the environment variable is set correctly
echo $ANTHROPIC_API_KEY

Troubleshooting: If you set an environment variable in .bashrc or .zshrc, it will not take effect until you open a new terminal session. You need to fully restart the IDE.

Inline Diff Not Appearing

Symptom: Claude's response only appears as text in the chat and no diff is shown in the editor.

Fix:

  1. Update the extension to the latest version
  2. In VS Code: run the Developer: Reload Window command (open the command palette with Cmd+Shift+P / Ctrl+Shift+P and search for it)
  3. The diff view may be suppressed when a file has unsaved changes. Try saving the file first, then try again

Slow Response

Symptom: Claude's response is slow or times out.

Fix:

  1. Reduce the context window (the amount of code sent). Lower the contextLines setting
  2. Instead of including an entire large file as context, select only the relevant portion and send that
  3. Use the /compact command to summarize the conversation and reduce token usage

claude Command Not Found in VS Code

Symptom: Running claude in the integrated terminal produces "command not found."

Fix: VS Code's integrated terminal may not be loading the system PATH correctly.

  1. Run which claude in a WSL terminal to find the installation path
  2. Verify that VS Code is connected to WSL via the WSL extension (check that "WSL" appears in the bottom-left status bar)
  3. Install the WSL extension and work from a WSL workspace

Next Steps

Once you are comfortable with IDE integration, move on to articles that help you get even more out of Claude Code.