Free resources · Getting started
How to use Claude Code in VS Code, Cursor and JetBrains
How to use Claude Code in VS Code, Cursor or a JetBrains IDE - pick the panel or the terminal, install the right add-on, review each edit as a diff, and keep Claude's file tools off a secret file.
Should you use the extension panel or the terminal?
Either one: they are the same Claude Code. Your IDE (the program you write code in) can run it two ways: the extension puts a chat panel beside your code, or you type claude in the integrated terminal, the one built into the editor. Both share one conversation history, so you can switch freely.
In our view, start with the panel: it needs no other install and, in Manual mode, shows each change as a diff. The terminal has every slash command but needs the command-line tool (install line below), since the extension does not put claude on your PATH. New to the tool? Start with how to use Claude Code.
How do you install it in VS Code?
Open the Extensions view (Cmd+Shift+X on a Mac, Ctrl+Shift+X on Windows or Linux), search for Claude Code, and install "Claude Code for VS Code" by Anthropic. It needs VS Code 1.94.0 or later; Code > About Visual Studio Code on a Mac, or Help > About on Windows and Linux, shows your version.
To open it, click the Spark icon at the top right of an open file, or Claude Code in the status bar. First time, click Sign in and finish in your browser. Any paid Claude plan works; no API key.
Is it safe to install in Cursor?
It installs the same way, but check one date. Forks (editors built from VS Code's code) such as Cursor install it from their own Extensions view. Tampered copies once got into Cursor's: versions 2.1.312 and 2.1.313, for macOS and Windows, were there between about 2:27am and 1:35pm PT on October 29, 2026. If you installed or updated it in Cursor in that window, follow Cursor's security notice and run its check, because uninstalling may not be enough. Cursor found no evidence that other versions were affected.
How do you set it up in a JetBrains IDE?
Install the command-line tool first, then the plugin. On macOS, Linux or WSL, this line installs the tool:
curl -fsSL https://claude.ai/install.sh | bash
If the installer says ~/.local/bin is not in your PATH, run the line it prints, then open a new terminal.
In IntelliJ, PyCharm and other JetBrains IDEs, the plugin "Claude Code [Beta]" by Anthropic runs claude in the IDE's terminal and links it to the editor. It does not bring its own copy. Install it from the JetBrains Marketplace, restart the IDE, and press Cmd+Esc (Ctrl+Esc on Windows or Linux) to open it.
If you see "Cannot launch Claude Code", the IDE cannot find claude on its PATH. Check with claude --version in a terminal (if not found, see the PATH step above). If that works, on Mac or Linux run which claude and paste the path it prints into the Claude command field under Settings, Tools, Claude Code [Beta]. Claude Agent, Anthropic's agent inside JetBrains AI Assistant, is not related to this plugin.
What happens when Claude wants to edit a file?
That depends on the permission mode: the setting for how much Claude may do without asking. On current versions, new terminal and VS Code sessions start in Auto mode, where Claude edits most files without asking. To see each edit first, click the mode indicator at the bottom of the VS Code prompt box (Shift+Tab in the terminal) and pick Manual. In Manual mode, each edit opens as a side-by-side diff of your file before and after, and you accept it, reject it, or tell Claude what to do instead. JetBrains shows diffs in its own viewer.
What can Claude reach in your project?
Claude works in the folder it starts in and reads files there without asking. Edits and most shell commands follow the permission mode. It also sees the text you select and which file you have open.
Its rules live in the project settings file, .claude/settings.json, which the terminal, the VS Code extension and the JetBrains plugin all read, so a rule holds in each.
How do you keep Claude's file tools off a secret file?
Write one deny rule for it. A permission rule is a line in a settings file that allows, asks about, or blocks one action. A deny rule on reading .env keeps Claude's file tools off it. It does not stop a command that reads files without naming them, such as grep -r, or a script that opens files itself.
Try it on a throwaway folder: paste this block, our own wording, into a Mac or Linux terminal. It makes a fake .env and one rule, with no sign-in.
mkdir -p claude-practice/.claude
cd claude-practice
printf 'API_KEY=fake-key-not-real-12345\n' > .env
cat > .claude/settings.json <<'EOF'
{
"permissions": {
"deny": [
"Read(./.env)"
]
}
}
EOF
grep -nF 'Read(./.env)' .claude/settings.jsonThen do the same by hand on a copy of your own project, with real secrets swapped for fake ones; the block would overwrite both files. If the copy has no .claude/settings.json yet, write the same file. If it has one, add "Read(./.env)" inside its deny list, with a comma between entries.
Where is the full answer?
Check that the rule is in place
The last command prints the line number and your rule, which shows the rule is saved in the file, not yet tested in a session:
4: "Read(./.env)"
If nothing prints, run cd .. and the block again.