Skip to main content

Command Palette

Search for a command to run...

# How to Install Claude Code on Windows

Complete Step-by-Step Setup Guide

Updated
10 min read
# How to Install Claude Code on Windows
Z

Tech enthusiast and community builder, sharing knowledge through articles. Let's learn, grow, and support each other. 🌟 #CodingForAll 🤝

So you have heard people talk about Claude Code, this AI tool that lives in your terminal (or now, your desktop) and actually writes, edits, and fixes your code for you. You want in. Good news: installing Claude Code on Windows takes way less effort than people make it sound, and this guide walks through the entire setup from scratch.

There are two ways to install Claude Code on Windows. You can go full point and click with the Desktop app, or you can go classic and live in the terminal/CLI. We will walk through both in detail, straight from Anthropic's own official documentation, so you do not end up following some random outdated tutorial.

Note: This guide focuses specifically on Windows installation, including folder paths, usernames, and environment variables. If you are on macOS or Linux, the install process is similar but the file paths differ. Official download links for those platforms are included below.

Let's get into it.


Section 1: Install Claude Code Desktop on Windows (Easiest Method, No Terminal Needed)

If the word "terminal" makes you sweat a little, start here. The Claude Desktop app gives you Claude Code with an actual graphical interface, including a sidebar, diff viewer, and file editor. No command line required at all.

What you need first

Before anything else, you need a Pro, Max, Team, or Enterprise Claude subscription. The free claude.ai plan will not get you into the Code tab, so upgrade first if that is where you are at.

Step 1: Download the Windows installer

Head to the official download page and grab the right installer for your system:

Not sure which one you need? Most Windows laptops and desktops use x64. ARM64 is only for newer ARM based Windows devices.

Other platforms, if you need them:

  • macOS: Download for macOS

  • Linux: no desktop app available, use the CLI section below instead.

Run the .exe installer once it downloads. Windows might show a SmartScreen warning since it is a newer app. Click "More info" then "Run anyway." Launch Claude from your Start menu once it is installed, and sign in with your Anthropic account.

Step 2: Open the Code tab

Once you are in, you will notice three tabs up top:

  • Chat: just regular conversation, no file access. Like talking to Claude on the website.

  • Cowork: a background agent that works on tasks independently in the cloud.

  • Code: this is the one we are here for. Direct access to your local files, with real time review of every change.

Click Code. If it asks you to upgrade, that means your current plan does not include it, so check pricing. If it asks you to sign in online, do that and restart the app.

Step 3: Pick a project and let it run

With the Code tab open:

  1. Choose Local to work on your own machine, then click "Select folder" and pick your project. For example, C:\Users\Zeeshan\Projects\my-app.

    • On Windows, you will need Git installed for local sessions to work properly. If you do not have it, grab it from git-scm.com.
  2. Pick a model from the dropdown near the send button.

  3. Type something simple to test it out, like "find a TODO comment and fix it" or "create a CLAUDE.md for this codebase."

By default, Claude works in Ask permissions mode. It proposes a change, shows you a diff, and waits for your approval before touching anything. Nothing gets modified until you accept it, which is reassuring for a first run.

A few things worth trying after your first edit

  • Interrupt anytime: hit stop or just type a correction mid task, no need to wait it out.

  • Drag in context: type @filename or drop files straight into the prompt box.

  • Slash commands: type / to browse built in commands and reusable skills.

  • Permission modes: switch to "Auto accept edits" once you trust it more, or use "Plan mode" for big refactors where you want Claude to map things out first without touching files.

And that is genuinely it for the desktop route. No Node.js, no npm, nothing extra. The app comes with everything bundled in.


Section 2: Install Claude Code CLI on Windows (Terminal Method)

If you are more of a terminal person, this is your path. It is just as quick once you know the right commands, and it gives you more control over configuration.

System requirements for Windows

  • Windows 10 version 1809 or later, or Windows Server 2019 or later

  • At least 4GB RAM, x64 or ARM64 processor

  • An internet connection

  • PowerShell or CMD (PowerShell is recommended since it is simpler to work with)

Step 1: Open PowerShell and run the install command

Press Win + X and choose Windows Terminal or PowerShell (not CMD, unless you prefer it). Then run:

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

If you would rather use CMD instead:

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

Quick tip if something feels off: if you see an error about && not being valid, you are actually in PowerShell, not CMD, so use the irm command instead. If irm is not recognized, you are in CMD, not PowerShell. Your prompt tells you which one you are in. "PS C:\Users\Zeeshan>" means PowerShell, and just "C:\Users\Zeeshan>" without the PS means CMD.

Installing Git for Windows is optional but recommended, since it lets Claude Code use a proper Bash tool. Without it, Claude just falls back to using PowerShell instead, which still works fine. Grab it from git-scm.com if you want it.

On macOS or Linux, the install command is curl -fsSL https://claude.ai/install.sh | bash, same idea, different shell. Full details are in the official setup docs.

Step 2: Start it up

Open a terminal inside whatever project folder you want to work in, then type:

claude

That is the whole command. It will walk you through the rest.

Step 3: Log in

You will need a Pro, Max, Team, Enterprise, or Console account, since the free plan does not include Claude Code. Run claude, follow the browser link it gives you, log in, and you are authenticated.

If you are using your Claude Pro or Max subscription and not paying per API token, you are done, no environment variable needed. Skip straight to Step 4.

Optional: Setting the ANTHROPIC_API_KEY environment variable on Windows

Only do this if you are paying through the Anthropic Console or API instead of a subscription. If you are on Pro or Max, leave this alone, since setting an API key here will route billing through the API instead of your subscription.

Here is how to set it permanently on Windows, using Zeeshan as the example username. Replace it with whatever your actual Windows account name is. You will see it in your file paths automatically, like C:\Users\Zeeshan.

  1. Press Win + R, type sysdm.cpl, hit Enter.

  2. Go to the Advanced tab, then click Environment Variables.

  3. Under "User variables for Zeeshan," click New.

  4. Set:

    • Variable name: ANTHROPIC_API_KEY

    • Variable value: your key (starts with sk-ant-...)

  5. Click OK on all the open windows.

  6. Close and reopen PowerShell completely, since environment variables do not apply to terminals already open.

To check it actually took effect, open a fresh PowerShell window and run:

echo $env:ANTHROPIC_API_KEY

If it prints your key back, you are set.

You can also set it temporarily for just the current session, which disappears once you close the window:

$env:ANTHROPIC_API_KEY = "your-api-key-here"

Step 4: Double check everything is working

A couple of sanity checks:

claude --version

If that returns a version number, you are good. For a deeper health check:

claude doctor

This tells you if anything is misconfigured, such as missing dependencies or PATH issues.

Alternative install methods on Windows

The irm command above is the recommended native install, and it auto updates in the background. But Windows has a couple of other options:

  • WinGet, if you manage software through Windows Package Manager already:

    winget install Anthropic.ClaudeCode
    

    Note: WinGet installs do not auto update by default, so run winget upgrade Anthropic.ClaudeCode periodically.

  • npm, if you would rather install it as a global Node package:

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

    This requires Node.js 18 or later, available from nodejs.org if you do not have it. This installs into your npm global folder, usually something like C:\Users\Zeeshan\AppData\Roaming\npm. Do not use sudo style elevated installs here, since it can cause permission headaches later.

Running Claude Code via WSL instead

If you would rather use a Linux environment on Windows, you have that option too:

Option What it needs Best for
Native Windows (covered above) Nothing required, Git is optional Windows native projects
WSL 2 WSL 2 enabled Linux toolchains, sandboxing

If you go the WSL route, you install and run claude inside your WSL terminal, not PowerShell or CMD directly. Also worth knowing: Windows environment variables, like the ANTHROPIC_API_KEY you set above, do not automatically carry over into WSL. You would need to set them again inside your WSL shell config, in ~/.bashrc or ~/.zshrc.


Frequently Asked Questions

Do I need Node.js to install Claude Code on Windows? Only if you are installing via npm. The native installer (irm https://claude.ai/install.ps1 | iex) and the Desktop app do not require Node.js at all.

Can I use Claude Code with the free Claude.ai plan? No. You need a Pro, Max, Team, Enterprise, or Console account to use Claude Code, on either Desktop or CLI.

Why does Windows say "claude is not recognized"? This usually means PowerShell has not refreshed its PATH yet. Close the terminal completely and reopen it. If that does not fix it, restart your PC.

Do I need to set the ANTHROPIC_API_KEY environment variable? Only if you are billing through the Anthropic API or Console directly. If you are using a Claude Pro or Max subscription, leave it unset and just log in with claude through the browser.

Can I run both the Desktop app and the CLI at the same time? Yes. They share the same configuration, including settings, MCP servers, and skills, and they run the same underlying engine, so switching between them is seamless.


So, Desktop or CLI?

Honestly, neither is "better" on Windows, since they run the same engine underneath and even share your configuration. If you like seeing diffs visually and clicking buttons, go Desktop. If you live in PowerShell anyway, the CLI will feel right at home. You can even run both at once on the same project without anything breaking.

Either way, you are about ten minutes away from having Claude Code up and running on your Windows machine. Go build something.


Need Help Building Something With This?

If you ran through this guide and now want someone to actually build the project for you, that is what I do.

I take on full stack development, AI integrations, and automation systems, including tools like n8n, for businesses and individuals who want something working rather than just installed.

What I work on:

  • Full stack web apps (frontend and backend, end to end)

  • AI powered tools and integrations

  • Automation systems and workflows using n8n and similar platforms

  • Custom features built on top of Claude Code or other AI coding tools

If you have a project in mind, feel free to reach out directly:

Email: zeeshanwebdev7@gmail.com WhatsApp: +92 339 8787878

Happy to take a look and tell you honestly whether it is a good fit before we start anything.