Skip to main content
Back to Blog
AITutorialWindowsDevelopment

Installing Claude Code on Windows: The Complete Guide

December 3, 20258 min read

## What is Claude Code?

Claude Code is Anthropic's AI-powered coding assistant that lives in your terminal. Unlike browser-based AI assistants, Claude Code can:

  • Read and edit files directly in your codebase
  • Run terminal commands on your behalf
  • Navigate projects and understand context across multiple files
  • Execute complex multi-step tasks autonomously

Think of it as having a senior developer pair programming with you, but one that never gets tired and knows every programming language.


Prerequisites

Before we start, you'll need:

  • ✅ Windows 10 (version 2004+) or Windows 11
  • ✅ Administrator access
  • ✅ An Anthropic API key (or Claude Pro/Max subscription)
  • ✅ About 15-30 minutes

Choose Your Path

Claude Code now works natively on Windows! You have two options:

| Option A: Native Windows | Option B: WSL | |------------------------------|-------------------| | ⚡ Faster setup (5 min) | 🔧 Better for Unix tools | | ✅ Works in PowerShell | ✅ Linux environment | | ✅ Great for most projects | ✅ Matches production servers |

Recommendation: Start with Native Windows. Switch to WSL later if needed.


Option A: Native Windows Setup (Recommended)

Step 1: Install Node.js

Download and install from nodejs.org (LTS version).

Or use winget:

winget install OpenJS.NodeJS.LTS

Verify installation:

node --version  # Should show v20.x.x or higher

Step 2: Install Claude Code

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

Step 3: Set API Key

$env:ANTHROPIC_API_KEY = "sk-ant-xxxxx"

To make it permanent, add to your PowerShell profile or use System Environment Variables.

Step 4: Run It!

cd C:\Users\YourName\Projects\my-app
claude

That's it! You're ready to go. Skip to "Pro Tips" below.


Option B: WSL Setup (For Unix Tools)

Use this if you need bash scripts, make, or Linux-specific tooling.

Step 1: Install WSL

Open PowerShell as Administrator:

wsl --install

Restart your computer when prompted.

Step 2: Set Up Ubuntu

After restart, Ubuntu launches automatically. Create a username and password:

Enter new UNIX username: yourname
New password: ********

Update packages:

sudo apt update && sudo apt upgrade -y

Step 3: Install Node.js (via NVM)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.bashrc
nvm install 20

Step 4: Install Claude Code

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

Step 5: Set API Key

export ANTHROPIC_API_KEY="sk-ant-xxxxx"
echo 'export ANTHROPIC_API_KEY="sk-ant-xxxxx"' >> ~/.bashrc

Step 6: Run It!

cd /mnt/c/Users/YourName/Projects/my-app
claude

Authentication Options

API Key (Pay-per-use)

Get your API key from console.anthropic.com

Claude Pro/Max Subscription

claude auth login

This opens a browser window to authenticate with your Anthropic account.

That's it! You now have an AI pair programmer at your fingertips.


Pro Tips

  1. Don't work from /mnt/c - Clone projects to Linux home for 10x faster file operations
  2. Use VS Code Remote WSL - Best of both worlds
  3. Be specific - The more context you give Claude, the better results you get

Cost Breakdown

  • API: ~$0.10-$1 per session
  • Claude Pro ($20/mo): Includes usage
  • Claude Max ($100/mo): For power users

The ROI is insane. Time saved > money spent.


Happy coding!