How to Install Claude Code on a Windows Laptop
Claude Code is Anthropic’s official CLI that lets you use Claude directly from your terminal. This guide walks through installing it on a Windows laptop using PowerShell.
Prerequisites
You need Node.js 18 or higher installed. Check if you already have it:
node --version
npm --versionIf those commands return versions, you’re good to skip ahead. If not, install Node.js first.
Step 1: Install Node.js (if needed)
The easiest way on Windows is via winget, which comes built into Windows 11:
winget install OpenJS.NodeJS.LTSAfter installation, close and reopen PowerShell, then verify:
node --version
npm --versionStep 2: Install Claude Code
Install the Claude Code CLI globally via npm:
npm install -g @anthropic-ai/claude-codeVerify the installation:
claude --versionStep 3: Authenticate
Run Claude Code for the first time:
claudeIt will open a browser window asking you to log in with your Anthropic account and authorise the CLI. Once done, you’ll be dropped into an interactive session in your terminal.
Step 4: Using Claude Code in a Project
Navigate to any project folder and start a session:
cd C:\Users\YourName\Projects\my-project
claudeClaude will read the files in your current directory and you can start asking it to help with code, explain things, or make changes.
Tips
- Run
claude --helpto see all available flags and commands. - You can pass a one-off prompt without entering interactive mode:
claude "explain this repo". - Claude Code works well inside VS Code’s integrated terminal — no extra setup needed.
Troubleshooting
claude is not recognised as a command
Close and reopen PowerShell after installing. If it still fails, npm’s global bin folder may not be on your PATH. Check with:
npm config get prefixAdd the output path (e.g. C:\Users\YourName\AppData\Roaming\npm) to your system environment variables under PATH.
That’s it — Claude Code should now be running on your Windows machine. Give it a project folder and start experimenting.