Getting Started with Claude Code on Windows: A Complete A-Z Guide
Claude Code Windows Getting Started Node.js Git Tutorial Beginner .NET

Getting Started with Claude Code on Windows: A Complete A-Z Guide

February 21, 2026 12 min read

A step-by-step beginner guide for .NET developers on Windows 10/11. Learn how to install Node.js, Git, and Claude Code, get an Anthropic API key, and have your first AI-powered coding session up and running in under 30 minutes.

Wait — What Even Is Claude Code?

Imagine having a senior developer sitting right next to you — one who never gets tired, never judges your questions, and can read, write, and understand your entire codebase in seconds. That is Claude Code in a nutshell. It is Anthropic’s AI-powered coding assistant that lives right inside your terminal, and it can help you build features, fix bugs, write tests, refactor code, and explain complex logic — all through plain, natural conversation.

If you are a .NET developer on Windows who has heard about Claude Code but had no idea where to even begin, you are in the right place. We are going to go from absolute zero to your first working Claude Code session, step by step, in plain English. No fluff, no assumed knowledge — just the exact steps you need.

📌 Who Is This Guide For?
Windows 10 or 11 users with some .NET development experience. You do not need any JavaScript or Node.js background — we will cover everything you need.

The Big Picture: What We Are Installing

Before we dive in, here is a quick map of what we are about to do so nothing feels random:

  1. Node.js — Claude Code runs on Node.js, so we need this first
  2. Git — Claude Code integrates deeply with Git, and you probably want version control anyway
  3. Claude Code — installed globally via npm (Node’s package manager)
  4. Anthropic API Key — your personal key that connects Claude Code to Anthropic’s AI models

That is it. Four things, and by the end of this guide all four will be set up and working.

Step 1: Install Node.js

Claude Code is distributed as an npm package, which means you need Node.js on your machine. If you have never touched Node before, do not worry — think of it the same way you think of the .NET runtime. It is just a runtime that lets JavaScript-based tools run on your machine.

Download Node.js

Go to the official Node.js website and download the LTS (Long-Term Support) version. LTS is the stable one — not the newest, but the most reliable. Always pick LTS for development tools.

Run the Installer

Once the .msi file downloads, double-click it and run through the installer. The defaults are fine for everything. There is one screen that asks about "Tools for Native Modules" — you can leave that unchecked unless you know you need it. Just click Next, Next, Next, Install.

💡 Tip: During installation, make sure the option "Add to PATH" is selected (it is by default). This is what lets you run node and npm from any terminal window.

Verify Node.js is Installed

After the installer finishes, open a fresh Command Prompt or PowerShell window (important: open a new one, not an existing one) and run:

node --version
npm --version

You should see version numbers printed out, something like v22.x.x for Node and 10.x.x for npm. If you see those, Node.js is installed and ready.

⚠ If you see “not recognized”: Close all terminal windows and open a brand new one. Windows only reads environment variables on startup, so old windows will not see the newly installed Node.js.

Step 2: Install Git for Windows

Claude Code works best when your project is a Git repository. It uses Git to understand your file changes, help with commits, and give you better context-aware suggestions. Even if you have used Git through Visual Studio’s GUI, you need the Git command-line tools installed for Claude Code to work properly.

Download Git

Install Git (Key Settings to Pick)

The Git installer has a lot of screens. Here are the important ones — leave everything else at defaults:

Everything else can stay as the default. Click through and install.

Verify Git

Open a new terminal and run:

git --version

You should see something like git version 2.47.x.windows.1.

Step 3: Check Your Environment Variables

This is the part that trips up most people on Windows, so let’s be thorough. Both Node.js and Git need to be in your system’s PATH variable so that any terminal window can find them.

The installers should have handled this automatically, but let’s double-check:

  1. Press Windows + S and search for "Environment Variables"
  2. Click "Edit the system environment variables"
  3. Click "Environment Variables..." in the bottom right
  4. Under "System variables", find "Path" and double-click it

You should see entries that include paths like:

C:\Program Files\nodejsC:\Program Files\Git\cmd

If both of those are present (or similar paths), you are good. If either is missing, click New and add the path manually.

📌 Quick Test: Open a brand new PowerShell window and run node -v && git --version. If both print version numbers, your PATH is set up correctly.

Step 4: Install Claude Code

Now for the main event. Claude Code is installed as a global npm package, which means you install it once and it is available everywhere on your machine — just like how you might install the dotnet CLI.

Open PowerShell as Administrator (right-click PowerShell, choose "Run as Administrator") and run:

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

This will download and install Claude Code globally. It might take 30–60 seconds. You will see some progress output. Once it finishes, verify the install:

claude --version

If you see a version number, Claude Code is installed. Simple as that.

💡 Why Administrator? Global npm packages get installed in a system-level folder. Without admin rights, the install might fail with a permissions error. If you see EACCES or permission denied, that is what is happening — re-run as Administrator.

Step 5: Get Your Anthropic API Key

Claude Code needs an API key to talk to Anthropic’s AI models. Think of it as a username+password combined into a single secret string that identifies your account.

Create an Anthropic Account

If you do not have one yet, go to the Anthropic Console and sign up. It is free to create an account.

Generate an API Key

  1. Log in to the Anthropic Console
  2. Click on "API Keys" in the left sidebar
  3. Click "Create Key"
  4. Give it a name like "My Claude Code" — just so you can identify it later
  5. Click "Create"
  6. Copy the key immediately — you will only see it once
⚠ Keep your API key private! Treat it like a password. Do not paste it into public repositories, Discord, or anywhere else. If it leaks, anyone can use it and run up your bill. You can always delete a compromised key and generate a new one from the Console.

Understanding Billing

Anthropic charges based on how much you use the API (tokens in and out). For a developer using Claude Code moderately, costs are typically very reasonable — a few dollars a month. You can set spending limits in the Console under Billing → Usage Limits to make sure you are never surprised. I recommend setting a monthly cap when you first get started.

Step 6: Log In to Claude Code

Now let’s connect everything together. Navigate in your terminal to any project folder (or just your Desktop for now) and run:

claude

The first time you run Claude Code, it will ask how you want to authenticate. You will see options like:

Option A: Browser Login (Easiest)

Choose the browser login option. Claude Code will open your browser and ask you to log in to your Anthropic account. Once you approve, it handles everything automatically — no copying and pasting keys needed. This is the recommended approach for most people.

Option B: API Key (Manual)

If you prefer to use your API key directly, choose that option and paste the key you copied in Step 5. Claude Code will save it securely for future sessions.

Alternatively, you can set it as an environment variable before running Claude Code:

# In PowerShell (current session only):
$env:ANTHROPIC_API_KEY = "sk-ant-your-key-here"
claude

# Or set it permanently via System Environment Variables
# Variable name: ANTHROPIC_API_KEY
# Variable value: sk-ant-your-key-here
💡 Permanent Setup Tip: To set the key permanently, go to Environment Variables (same place as Step 3), add a new User variable named ANTHROPIC_API_KEY with your key as the value. Then you never have to set it again on this machine.

Step 7: Your First Claude Code Session

Let’s try it out for real. Navigate to one of your .NET projects and fire up Claude Code:

cd C:\Projects\MyDotNetApp
claude

Claude Code will start, read your project structure, and drop you into an interactive chat. Try asking it something like:

> Explain what this project does
> What are the main controllers in this ASP.NET app?
> Add a GET endpoint to return all users as JSON
> Fix the bug on line 42 in HomeController.cs

Watch as it reads your actual files, understands your codebase, and responds with code that fits your project. It is not generating generic boilerplate — it knows your folder structure, your namespaces, your naming conventions. That is what makes it genuinely useful.

Running Claude Code Without Entering Chat

You can also use Claude Code for one-off tasks without entering the interactive mode:

# Ask a single question and get an answer
claude "explain what HomeController does"

# Run a specific task
claude "add XML comments to all public methods in UserService.cs"

Useful Commands to Know

Here are the commands you will reach for most often as you get started:

CommandWhat It Does
claudeStart interactive session in current folder
claude "your question"One-shot question, no interactive mode
claude --helpShow all available options
claude --versionCheck installed version
/help (inside session)Show in-session commands
/clear (inside session)Clear conversation context
/exit (inside session)Exit Claude Code
Ctrl + CCancel current operation

Pro Tips for .NET Developers

Since you are coming from a .NET background, here are a few things that will make your Claude Code experience much smoother right from the start:

1. Always Run from Your Project Root

Claude Code reads your project by looking at the files around it. Always cd into your solution or project root before running claude. If you run it from a random folder, it will not have the right context.

2. Let It See Your .sln File

Claude Code handles multi-project solutions well. Running it from the folder containing your .sln file gives it the best view of everything — multiple projects, shared libraries, the whole picture.

3. Be Specific With Your Requests

Instead of saying "add a feature", say "add a POST endpoint at /api/orders that accepts an OrderDto and saves it to the Orders table via EF Core". The more specific you are, the better the result. You already know how to write requirements — just apply that same clarity here.

4. Use It for Code Review

> Review this class for any potential issues, security concerns, or improvements

It is like having a code review at any hour of the day.

5. Ask It to Write Tests

> Write xUnit tests for the UserService class covering all public methods

Test writing is one of Claude Code’s strongest use cases — it understands your code and generates tests that actually match your patterns.

Troubleshooting Common Issues

“claude is not recognized as an internal or external command”

This means npm’s global bin folder is not in your PATH. Run npm config get prefix to find where global packages are installed, then add that path to your system PATH variable (same process as Step 3). Restart your terminal after.

“401 Unauthorized” Error

Your API key is wrong or expired. Go back to the Anthropic Console, generate a new key, and update your ANTHROPIC_API_KEY environment variable.

“429 Rate Limit Exceeded”

You are sending too many requests too fast, or you have hit your usage limit. Check your Console dashboard. If you just signed up, new accounts sometimes have lower initial rate limits that increase over time.

Node.js or npm Not Found After Install

Close all terminal windows completely and open a fresh one. If it still does not work, log out and back into Windows. In rare cases a full restart is needed for PATH changes to take effect.

What to Learn Next

Once you have the basics working, here are some great next steps to go deeper:

Wrapping Up

That is it — you now have a fully working Claude Code setup on Windows. Let’s quickly recap what you did:

The first few sessions might feel a bit different from what you are used to. Instead of writing every line yourself, you are directing an AI that can write, read, and modify code on your behalf. It takes a little getting used to — but once it clicks, going back feels painfully slow.

Give it a real project, be specific with what you want, and let it surprise you. Welcome to the future of .NET development.

Share this article
All Posts
Get In Touch Portfolio