← AI-pair numerics

Getting started with Claude Code on Windows

Six steps from never-opened-a-terminal to Claude running in a folder on your machine. Read top to bottom; copy each block; paste into PowerShell.

Why this works: Claude Code is a command-line program that talks to Anthropic's models. You'll install it, give it your login, and point it at a folder. After that, you type claude, type a request, and it edits files. That's the whole loop.
1

Open Windows PowerShell

Hit Win, type powershell, press Enter. A blue or black window opens with a prompt that looks like PS C:\Users\YourName>. Feel the power.

PowerShell has a right-click-to-paste shortcut. After you've copied a code block below, click into the PowerShell window and right-click. The text appears at the prompt. Press Enter to run.
If your prompt shows C:\Users\YourName> without the PS prefix, you're in CMD, not PowerShell. Close it and reopen — make sure you typed powershell, not cmd.
2

Install Git

Claude Code uses Git to run shell commands on Windows. Install it with one line:

winget install --id Git.Git -e
PowerShell

Right-click into the PowerShell window, press Enter. Windows pops a UAC permission dialog. Click Yes. If your machine is managed, IT will approve this — Git is the standard version-control tool, used by every developer on Earth.

Wait until you see Successfully installed.

3

Install Claude Code

The official PowerShell one-liner — downloads the latest installer, runs it, installs the claude binary:

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

When prompted, sign in with your email. Your browser opens; complete the Anthropic login flow there; come back to PowerShell.

What irm | iex means: irm (Invoke-RestMethod) downloads the install script; iex (Invoke-Expression) executes it. Standard PowerShell-installer convention. You're running a script Anthropic publishes from their own domain.
4

Add Claude to your PATH

The installer tries to do this, but its change to PATH doesn't affect the PowerShell window you already have open. Belt and suspenders: run this one-liner to make sure the claude command can be found from any future shell:

[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\.local\bin", "User")
PowerShell

This appends %USERPROFILE%\.local\bin (where Claude Code lives) to your user-level PATH in the Windows registry. No visible output — that's normal. It worked.

5

Close PowerShell, open a fresh one

PATH changes only take effect in new terminal windows. Close this one (type exit or click the X), then hit Win, type powershell, Enter.

Confirm everything is wired up:

claude --version
PowerShell

You should see a version number like 2.1.x (Claude Code). If you do, you're set. If you see 'claude' is not recognized, see Troubleshooting below.

6

Make a workspace and launch Claude

Claude works best when it's pointed at a specific folder. Make one inside Documents:

cd Documents
mkdir Claude
cd Claude
claude
PowerShell

Or — the variant I personally use, which I've found gives snappier responses and fewer interruptions:

claude --dangerously-skip-permissions --system-prompt "."
PowerShell

--dangerously-skip-permissions stops Claude from pausing to ask before running shell commands or editing files — the “dangerously” prefix is real, use it in folders where you're OK with Claude acting freely. --system-prompt "." replaces the default Claude Code system prompt with a single dot; you trade some of Claude Code's built-in scaffolding for a noticeably faster, less hedged feel.

The prompt changes. You're in. Type a request and press Enter:

Try first: “Write me a Python script that simulates a damped harmonic oscillator and plots the displacement over time.” Claude will draft the script, write it to a file in your Claude folder, ask permission to run it, and show you the plot. Welcome.

Troubleshooting

'claude' is not recognized as an internal or external command

PATH didn't take. Three things to check, in order:

  1. You opened a new PowerShell window after Step 4? PATH only refreshes in new windows.
  2. Re-run the Step 4 PATH command in the new window, then close and reopen again.
  3. As a last resort, run claude with the full path: & "$env:USERPROFILE\.local\bin\claude.exe" --version
winget: The term 'winget' is not recognized

Old Windows 10 (pre-1809). Update Windows, or install winget from the Microsoft Store (search "App Installer"). Alternatively, download Git directly from git-scm.com and run the .exe installer.

UAC prompt doesn't appear, or IT blocks winget

Managed corporate machines sometimes block winget. Ask IT to whitelist winget install Git.Git, or have them install Git for you. Once Git is installed (any way), the rest of these steps work.

Browser sign-in didn't complete during install

Run claude (no arguments) in PowerShell. It'll re-open the browser for sign-in. If that also fails, run claude /login for explicit login.

I prefer winget for Claude Code itself

Anthropic also publishes a winget package. Skip Step 3 and run this instead:

winget install Anthropic.ClaudeCode
PowerShell

Trade-off: winget installs don't auto-update by default. Run winget upgrade Anthropic.ClaudeCode periodically. The native installer (Step 3) auto-updates in the background.

WSL vs native Windows

If you have WSL (Windows Subsystem for Linux) installed and your projects live in there, install Claude Code inside WSL using the Linux installer (curl -fsSL https://claude.ai/install.sh | bash), not via PowerShell. Native Windows install is the right pick for Windows-native projects, Visual Studio work, and most engineering workflows.

Official docs: code.claude.com/docs/en/setup.