How to install and use Claude Code extensions for VS Code and JetBrains IDEs. Step-by-step setup, keyboard shortcuts, and tips for getting the most out of Claude Code inside your editor.
Claude Code's official IDE extensions let you run Claude Code commands without leaving VS Code or JetBrains. The extensions pass your current file and selection as context automatically, making common operations faster.
# Option 1: Install from VS Code Marketplace
# Open VS Code → Extensions (Ctrl+Shift+X) → search "Claude Code" → Install
# Option 2: Install from terminal
code --install-extension anthropic.claude-code
# Option 3: Make sure Claude Code CLI is installed first
npm install -g @anthropic-ai/claude-code
claude --version # verify CLI works before using extension
| Action | Default shortcut (Mac) | Default shortcut (Windows/Linux) |
|---|---|---|
| Open Claude Code panel | ⌘+Shift+C | Ctrl+Shift+C |
| Send selected code to Claude | ⌘+Shift+A | Ctrl+Shift+A |
| Ask Claude about current file | ⌘+Shift+F | Ctrl+Shift+F |
| Accept Claude suggestion | Tab | Tab |
| Reject Claude suggestion | Esc | Esc |
| Toggle Claude panel | ⌘+B (sidebar) | Ctrl+B (sidebar) |
# Install from JetBrains Plugin Marketplace:
# Settings → Plugins → Marketplace → search "Claude Code" → Install → Restart IDE
# Supported IDEs:
# - IntelliJ IDEA (Community + Ultimate)
# - PyCharm (Community + Professional)
# - WebStorm
# - GoLand
# - Rider
# - Android Studio (via JetBrains plugin)
# After install: Tool Windows → Claude Code
# Or: View → Tool Windows → Claude Code
# VS Code workflow:
# 1. Select code in editor
# 2. Right-click → "Ask Claude about selection"
# OR press Ctrl+Shift+A (Mac: ⌘+Shift+A)
# 3. Type your request in the Claude panel
# Example prompts after selecting code:
# "What does this function do?"
# "Refactor this to use async/await"
# "Add error handling for edge cases"
# "Write unit tests for this function"
# "Explain the performance implications"
{
// Claude Code extension settings
"claude-code.model": "claude-sonnet-4-6",
"claude-code.maxTokens": 4096,
"claude-code.includeFileContext": true,
"claude-code.autoOpenPanel": false,
"claude-code.theme": "system",
// If you use API billing:
"claude-code.apiKey": "", // leave empty to use ANTHROPIC_API_KEY env var
// Keybinding override (keybindings.json):
// { "key": "ctrl+shift+c", "command": "claude-code.openPanel" }
}
# CLAUDE.md in your project root is automatically loaded by both
# the CLI and the IDE extension. Use it to give Claude project context:
# Example CLAUDE.md sections that help the IDE extension:
# - Coding conventions (naming, patterns)
# - File structure overview
# - Testing framework and patterns
# - Common tasks and how to do them in this codebase
# The extension picks up CLAUDE.md from the workspace root.
# Multi-root workspaces: each folder's CLAUDE.md is loaded for that folder.
# No dedicated Cursor extension — use the terminal:
# 1. In Cursor: View → Terminal (Ctrl+backtick)
# 2. The terminal panel opens in your project root
# 3. Run: claude
# 4. Claude Code works normally — reads files, edits code, runs commands
# Tip: Cursor's AI and Claude Code are complementary.
# Use Cursor's Tab autocomplete for flow coding.
# Use Claude Code for multi-file refactors, PR review, and complex tasks.
| Capability | IDE Extension | Terminal (Claude CLI) |
|---|---|---|
| Auto-pass current file context | Yes | No (type path manually or use /read) |
| Inline diff view | Yes (editor gutter) | No (text diff output only) |
| Keyboard shortcuts | Yes (configurable) | No (shell shortcuts only) |
| Headless / CI mode | No | Yes (--print flag) |
| MCP server access | Yes (via CLI) | Yes |
| Hooks (PostToolUse) | Yes (via CLI) | Yes |
| SSH remote use | Via Remote SSH extension | Native |
For cost estimation with the IDE extension, use claude-cost-calc.vercel.app. For pricing across all Claude models, see prompt-pricing.vercel.app.