← all posts

August 11, 2026

Setting Up VS Code and Claude Code on Windows

windowsvscodeclaudesetup

Every time I hand someone a fresh Windows box — or wipe my own — I end up re-deriving the same setup: VS Code, Claude Code, and a small pile of command-line tools that make the two of them pleasant to actually use. This is that process written down, so next time it’s copy-paste instead of archaeology.

Everything below assumes Windows 10 1809+ or Windows 11, run from an ordinary (non-admin) PowerShell or Command Prompt window unless a step says otherwise.

Before you start: I’ve run every winget command in this post myself on a clean Windows install and it’s the method I recommend. Installer-based and npm alternatives are documented near the bottom for anyone who can’t use winget, but winget is the path I’d point you to.

Quick start

Install both, then log in — this is the whole setup:

winget install Microsoft.VisualStudioCode
winget install Anthropic.ClaudeCode

Close and reopen your terminal so PATH picks up both, then open VS Code and log into Claude Code from its integrated terminal:

code .
claude

First run walks you through browser-based login. Everything from here down is detail, companion tools, and alternative install methods — worth reading, not required to get going.

Install VS Code

The fastest path is winget, which ships built in on current Windows 11 and is installable on Windows 10:

winget install Microsoft.VisualStudioCode

This adds VS Code to PATH automatically. Close and reopen your terminal afterward, then confirm it worked:

code --version

From any folder, code . opens it in VS Code — worth remembering, it’s the fastest way in.

Install Claude Code

Claude Code is a CLI first, with a VS Code extension layered on top for a GUI. Install the CLI, then the extension.

The CLI

winget install Anthropic.ClaudeCode

winget installs don’t auto-update on their own — run winget upgrade Anthropic.ClaudeCode periodically, or set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 to have Claude Code do it for you in the background.

Once it’s installed, verify it landed:

claude --version
claude doctor

claude doctor is the more useful of the two — it checks install health and settings validity without starting a session, and is the first thing worth running if anything below misbehaves.

Log in

claude

launches an interactive session and, on first run, walks you through browser-based login. You need a paid Claude plan (Pro, Max, Team, Enterprise, or a Console account) — the free claude.ai tier doesn’t include Claude Code access. If you’d rather authenticate with an API key, set ANTHROPIC_API_KEY first and Claude Code will prompt you to approve it instead of opening a browser.

I’d recommend logging in with the claude.ai method (a Pro or Max subscription) rather than a Console account if this is your first time setting up Claude Code — it’s the simpler of the two and is what the browser prompt defaults to. Console accounts are pay-as-you-go by API usage, which is the better fit once you know you need it, but it’s more to set up than a first-timer needs.

The VS Code extension

With the CLI installed, add the extension from inside VS Code: Ctrl+Shift+X to open Extensions, search “Claude Code”, publisher Anthropic, click Install. Or skip the search and use this direct link. It needs VS Code 1.94.0+.

Once installed, a spark icon shows up in the editor toolbar whenever a file is open — that’s the entry point. First click prompts the same account login as the CLI.

Companion tools worth having alongside both

None of these are strictly required, but each one removes friction from the VS Code + Claude Code combo specifically:

Git for Windows — Claude Code’s Bash tool needs Git Bash to function on native Windows. Without it, Claude Code falls back to driving PowerShell instead, which works but is a different (and less battle-tested) code path. Worth installing even if you don’t use Git for anything else:

winget install Git.Git

If Claude Code can’t auto-detect Git Bash after install, point it there explicitly in settings.json:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}

Windows Terminal — tabs, panes, and a terminal host that doesn’t choke on Unicode the way conhost does. VS Code’s integrated terminal covers a lot of this already, but a standalone Claude Code session outside the editor is nicer here too:

winget install Microsoft.WindowsTerminal

GitHub CLI — Claude Code shells out to gh for PR creation, issue lookups, and CI status when you ask it to work with GitHub, and it’s just generally useful on its own:

winget install GitHub.cli

WSL2 — optional, and not needed for anything above, but worth knowing it’s there: Claude Code’s sandboxing (isolated command execution) is only supported under WSL2, not native Windows. If that matters to you, or your toolchain is Linux-native anyway:

wsl --install

If you don’t want to use WinGet

If you don’t want to use WinGet, you can use this method to install VS Code or Claude Code instead.

VS Code — grab the User Setup build from the VS Code site. Use the User installer, not System, unless you specifically need it available for every account on the machine — User installs don’t need admin rights and land in %LocalAppData%\Programs\Microsoft VS Code.

Claude Code — Anthropic’s native installer keeps itself updated in the background, which winget installs don’t do on their own. In PowerShell:

irm https://claude.ai/install.ps1 | iex

Or in Command Prompt:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Mixing these up gives a distinctive error either way: irm not recognized means you’re in CMD, not PowerShell; The token '&&' is not a valid statement separator means the opposite. Your prompt tells you which shell you’re in — PS C:\> for PowerShell, C:\> without the PS for CMD.

You can also install Claude Code via npm if you already have a Node toolchain and prefer to manage it that way. This needs Node.js 22+:

npm install -g @anthropic-ai/claude-code

No sudo/admin-elevated equivalent here — if you hit permission errors on a global npm install, that’s an npm prefix problem, not a Claude Code one.

Thanks for reading.


This post was written by Claude Code.