← All insights
AI & Emerging TechGuides

Claude Code - Windows Installation & Setup Guide

April 18, 20268 min readMichael Franklin

Claude Code functions as Anthropic's terminal-based AI coding agent, enabling users to read code, edit files, and execute commands directly from the command line. This guide addresses the native Windows installer and the critical PATH remediation step that requires manual completion.

Why this guide exists

The native installer places the Claude Code binary at C:\Users\<username>\.local\bin\claude.exe. On many machines — particularly domain-joined workstations where usernames contain dots — the installer fails to append this folder to the user PATH. While appearing successful, the claude command subsequently fails with an unrecognized command error. This represents a known upstream issue (GitHub #21365) with a straightforward resolution.

Prerequisites: Local admin rights, a Claude Pro/Max/Team/Enterprise/Console account, and internet access to claude.ai, github.com, and git-scm.com.

Components to install

| Component | Required? | Purpose | |---|---|---| | Git for Windows | Required | Provides Git Bash for internal Claude Code operations | | Claude Code (native) | Required | The executable binary and auto-updater | | PATH entry | Required | Exposes executable to PowerShell, CMD, Git Bash | | Claude account | Required | Authentication (free accounts excluded) | | VS Code | Optional | IDE integration via extension |

Pre-install checklist

Verify Windows version

Press Win + R, type winver, and confirm Windows 10 (version 1809+) or Windows 11.

Install Git for Windows

This step is mandatory. Claude Code shells out to Git Bash internally, even from PowerShell. Without it, runtime failures occur.

  1. Download the 64-bit installer from https://git-scm.com/downloads/win
  2. Run the installer, accepting all defaults
  3. Confirm the middle option ("Git from the command line and also from 3rd-party software") is selected on the PATH screen
  4. In a fresh PowerShell window, verify:
powershell
git --version

Expected output: git version 2.45.x.windows.1

Confirm PowerShell execution policy

Check current policy:

powershell
Get-ExecutionPolicy -Scope CurrentUser

Acceptable values: RemoteSigned, Unrestricted, or Bypass. If restricted, run:

powershell
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Have your Claude account ready

Sign in at claude.ai using one of these account types:

  • Claude Pro ($20/month)
  • Claude Max ($100-$200/month)
  • Claude Team or Enterprise
  • Anthropic Console with API credits

Free Claude.ai accounts will not work with Claude Code.

Install Claude Code

Run the installer

  1. Open PowerShell as your regular user (not Administrator)
  2. Confirm your prompt begins with PS
  3. Execute:
powershell
irm https://claude.ai/install.ps1 | iex

Expected output includes version information and location confirmation. The installer may report that C:\Users\<username>\.local\bin is not in your PATH — this requires manual remediation in the next section.

Fix the PATH

Add ~/.local/bin to user PATH

Run this command in PowerShell:

powershell
$claudeBin = Join-Path $env:USERPROFILE ".local\bin"
$currentPath = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($currentPath -notlike "*$claudeBin*") {
    [Environment]::SetEnvironmentVariable("PATH", "$currentPath;$claudeBin", "User")
    Write-Host "Added $claudeBin to user PATH" -ForegroundColor Green
} else {
    Write-Host "$claudeBin is already in user PATH" -ForegroundColor Yellow
}

This reads your current user PATH, checks for duplicates, and writes changes at the user scope without requiring admin rights.

Restart your terminal

PowerShell caches environment variables at session start. Close all PowerShell, CMD, VS Code integrated terminals, and Git Bash windows, then open a fresh PowerShell window.

Verify the update:

powershell
$env:PATH -split ";" | Select-String ".local"

You should see one line pointing to your .local\bin folder.

Verify and authenticate

Confirm Claude is on PATH

powershell
claude --version

Expected output: 2.1.114 (or current version number)

Run Claude doctor

powershell
claude doctor

A healthy install displays:

  • Currently running: native (with version number)
  • Proper file path
  • Config install method: native
  • Search: OK (bundled)
  • Auto-updates: enabled
  • Auto-update channel: latest

Set up your working folder

Create a standard repository directory at C:\repo:

powershell
mkdir C:\repo

Benefits of this location:

  • Avoids Windows' 260-character path limitation
  • Sits outside OneDrive sync (which corrupts .git files)
  • Contains no dots or spaces
  • Short enough for frequent typing

Use lowercase names with hyphens for project folders (acme-api, acme-web, client-discovery). Store all related materials — Word docs, PDFs, spreadsheets, screenshots, research notes, and meeting transcripts — in the project folder.

Authenticate

From your project directory:

powershell
claude

The CLI opens your default browser for sign-in. After completing authentication, you will reach an interactive prompt. Type /exit to end the session.

Key CLI commands

| Command | Purpose | |---|---| | claude | Start an interactive session in current directory | | claude --version | Print version number | | claude doctor | Run diagnostics | | claude update | Force immediate update check | | claude --help | Show all available flags and subcommands | | /config (in-session) | Open settings menu | | /exit (in-session) | Exit the interactive session |

Following this guide ensures a properly configured Claude Code installation on Windows workstations, with particular attention to the PATH remediation step that the native installer leaves incomplete.