Windows setup guide
Something stuck?

Windows 10 / 11 · Beginner guide

Claude Code.
Powered by DeepSeek.

Get set up once. Then describe what you want to make in plain English. This guide walks you through every click and command.

No coding experience neededOne Windows computerDeepSeek Flash

Before you start

Have an internet connection and a valid DeepSeek API key. An API key is a secret access code. It lets this setup use the DeepSeek account associated with that key.

Node.js + npmTools for running projects
Claude CodeThe app you talk to
DeepSeek FlashThe AI answering you

This setup uses the API balance associated with the key. You don’t need to buy a Claude subscription for this connection. Keep the key private; it is not included in this guide. About this connection ↗

Keep this guide open while you work. A browser tab is one of the labels along the top of Edge, Chrome, or Firefox. Click this guide’s tab to return here after visiting a download page. Ctrl + V means hold Ctrl, tap V, then release both keys.

Install Node.js and npm

npm is included. You only need one installer.

A. Download the installer

  1. Click the green Open the Node.js download page button below. The download page opens in another browser tab. Keep this guide’s tab open so you can return to it.
  2. At the top of the download page, use the version with an LTS badge. Make sure the selected operating system is Windows.
  3. Scroll down past the large box of code. Find Windows Installer (.msi) and click it once. Leave the Docker commands alone; the Windows installer is the option used in this guide.
  4. Keep x64 selected for most PCs. If Windows Settings says the processor is ARM-based, select ARM64 instead. If unsure, the x64 option works on typical Intel and AMD PCs.
Open the Node.js download page ↗
Choose LTS, then use the green Windows Installer (.msi) button below the large code box. Version numbers may change. Source: Node.js

B. Find the file you just downloaded

  1. While still in the browser, hold the Ctrl key and tap J, then release both. This opens the browser’s Downloads list.
  2. Wait until the download finishes. Find the newest filename that starts with node-v and ends with .msi.
  3. Click that filename or its Open file link. A Node.js Setup window should appear.
Example in Chrome: click the downloaded installer’s filename. Edge may show an Open file link.

C. Click through the setup window

  1. Click Next. Tick the box to accept the license, then click Next again.
  2. Keep the suggested installation folder and features. The npm package manager feature should stay selected. Click Next through those screens.
  3. If you see Tools for Native Modules, leave the extra-tools checkbox unchecked and click Next.
  4. Click Install. If Windows asks whether to allow the downloaded Node.js installer to make changes, click Yes.
  5. Wait for installation to finish, then click Finish. Return to the browser and click this guide’s tab at the top.

D. Find and open Windows PowerShell

PowerShell is a Windows app for typing commands. It is already on the computer.

  1. Look along the bottom of the screen for the Windows taskbar. Click the Search box or magnifying-glass icon near the Windows logo. If you do not see Search, hold the Windows key and tap S. The Windows key has a four-pane window logo.
  2. Click inside the search box and type Windows PowerShell.
  3. Under Best match, click the app named Windows PowerShell. Choose the plain name, without “ISE” or “x86”. You can also click Open on the right.
  4. A text window opens. It may be blue or black, and it may appear inside an app named Terminal. Look for a line starting with PS and a blinking cursor.
Type PowerShell in Windows search. Select the plain Windows PowerShell app under Best match, or click Open. Screenshot: Microsoft Learn

Screenshots show Windows 11. Windows 10 may look different, but searching for Windows PowerShell works the same way.

Whenever this guide says “reopen PowerShell”: close the PowerShell window with its top-right ×, then click the Windows search bar, type Windows PowerShell, and click that app again. If it is inside a Terminal tab, close that tab with its small ×.

E. Copy your first commands

  1. Click Copy on the command box below. This puts the commands on the clipboard; it does not run them yet.
  2. Click the PowerShell window you opened. If it is behind the browser, click its icon on the taskbar at the bottom of the screen.
  3. Hold Ctrl, tap V, then release both. The commands appear in PowerShell. If that does not paste, right-click once inside the PowerShell window.
  4. Press Enter. If a warning asks whether to paste multiple lines, click Paste anyway for this copied command block, then press Enter.
  5. Wait for two version numbers. Your exact numbers may differ. Once the PS ... > line returns, the commands have finished.
PASTE INTO POWERSHELL
node --version
npm.cmd --version

Two version numbers mean Node.js and npm are ready.

If PowerShell was open before Node.js finished installing, close and reopen it using the search-bar steps above, then repeat this check. npm.cmd is the Windows spelling used here to avoid a common PowerShell script error.

Official references: npm installation · Finding PowerShell

Install Claude Code

Use the official Windows installer.

  1. Click Copy on the command below.
  2. Click inside the PowerShell window, paste with Ctrl + V, and press Enter. If the window is closed, click Windows Search, type Windows PowerShell, and click that app first.
  3. Wait for the installer to finish. This can take a few minutes. Text scrolling down the window is normal.
PASTE INTO POWERSHELL
irm https://claude.ai/install.ps1 | iex

This command downloads and runs the official Claude Code installer. npm is already available for projects; you do not need another npm command to install Claude Code.

Close, reopen, and check

  1. After the installer finishes, close PowerShell using the × in its top-right corner, or the small × on its Terminal tab.
  2. Click the Windows search bar at the bottom of the screen. Type Windows PowerShell, then click the app named Windows PowerShell.
  3. Click Copy below. Click in the new PowerShell window, press Ctrl + V, then Enter.
PASTE INTO POWERSHELL
claude --version

A version number followed by “Claude Code” means the installation worked.

Continue to step 3 before starting a chat. That step connects the DeepSeek API key. The Claude Code installer does not create the DeepSeek shortcut.

Official reference: Claude Code installation

Connect DeepSeek Flash

One setup block creates the shortcut and saves the key.

The new command will be claude-deepseek flash. It starts Claude Code using DeepSeek Flash.

  1. Have a valid DeepSeek API key ready. If someone manages the API account, obtain the key from that account owner privately.
  2. Click Copy one-time setup below. There is nothing to edit in the copied code.
  3. Click the open PowerShell window, press Ctrl + V, then Enter. If Windows asks about multiple lines, click Paste anyway for this setup block.
  4. Wait for PowerShell to say Paste the DeepSeek API key…. It is now waiting for the key.
  5. Go to the place where the key was provided. Select just the key and press Ctrl + C. Click back in PowerShell, press Ctrl + V, and then Enter.
  6. Wait for the green message Setup complete! Next: step 4 in the guide.

The key is hidden while you enter it. You may see stars or nothing at all. Paste it once, then press Enter.

Leave this PowerShell window open for step 4.

The key is saved encrypted for the current Windows sign-in. Enter it only at the PowerShell key prompt. Do not put it in an AI chat or on this webpage.

View the one-time setup code

This code creates the shortcut and adds it to Windows’ command search path. It stops if it finds a different existing DeepSeek shortcut. A saved encrypted key works only with the Windows account that saved it.

& {
    $ErrorActionPreference = 'Stop'
    try {
        if (-not (Get-Command node.exe -ErrorAction SilentlyContinue)) {
            throw 'Install Node.js in step 1, then close and reopen PowerShell.'
        }
        $claudePath = Join-Path $env:USERPROFILE '.local\bin\claude.exe'
        if (-not (Test-Path -LiteralPath $claudePath)) {
            throw 'Install Claude Code with the command in step 2, then try again.'
        }

        $setupFolder = Join-Path $env:LOCALAPPDATA 'ClaudeDeepSeekGuide'
        $binFolder = Join-Path $env:USERPROFILE '.local\bin'
        $shortcutPath = Join-Path $binFolder 'claude-deepseek.cmd'
        $marker = 'ClaudeDeepSeekGuide shortcut v1'
        $existing = Get-Command claude-deepseek -ErrorAction SilentlyContinue
        if ($existing -and $existing.Source -ne $shortcutPath) {
            throw 'A different claude-deepseek command already exists. Nothing was replaced. Check the existing installation before continuing.'
        }
        if (Test-Path -LiteralPath (Join-Path $binFolder 'claude-deepseek.ps1')) {
            throw 'An existing DeepSeek PowerShell shortcut was found. Nothing was replaced. Check the existing installation before continuing.'
        }
        if ((Test-Path -LiteralPath $shortcutPath) -and
            -not ((Get-Content -LiteralPath $shortcutPath -Raw).Contains($marker))) {
            throw 'An existing DeepSeek shortcut was found. Nothing was replaced. Check the existing installation before continuing.'
        }
        if ((Test-Path -LiteralPath $setupFolder) -and
            -not (Test-Path -LiteralPath (Join-Path $setupFolder 'guide-install.txt'))) {
            throw 'The setup folder already exists and belongs to another setup. Check the existing installation before continuing.'
        }

        New-Item -ItemType Directory -Path $setupFolder -Force | Out-Null
        New-Item -ItemType Directory -Path $binFolder -Force | Out-Null
        $marker | Set-Content -LiteralPath (Join-Path $setupFolder 'guide-install.txt') -Encoding ASCII
        $launcher = @'
import { spawn, spawnSync, execFileSync } from 'node:child_process';
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import { homedir } from 'node:os';
import { fileURLToPath } from 'node:url';

const directory = fileURLToPath(new URL('.', import.meta.url));
const credentialFile = join(directory, 'credential.dpapi');
const powershell = join(process.env.SystemRoot || 'C:/Windows', 'System32/WindowsPowerShell/v1.0/powershell.exe');
const routes = new Map([
  ['flash', 'deepseek-flash[1m]'],
  ['flash-1m', 'deepseek-flash[1m]'],
  ['deepseek-flash', 'deepseek-flash[1m]'],
  ['deepseek-flash[1m]', 'deepseek-flash[1m]']
]);

function main() {
  const [choice = 'flash', ...extra] = process.argv.slice(2);
  if (['--help', '-h', '--list'].includes(choice)) {
    console.log('Start: claude-deepseek flash\nModel: DeepSeek Flash\nReplace your saved key: claude-deepseek --set-key\nProvider: https://api.deepseek.com/anthropic');
    return;
  }

  if (choice === '--set-key') {
    const saveKey = "$ErrorActionPreference='Stop'; $key=Read-Host 'Paste the DeepSeek API key then press Enter (hidden)' -AsSecureString; try { if ($key.Length -eq 0) { throw 'No key entered. Your previous key has not been changed.' }; $key | ConvertFrom-SecureString | Set-Content -LiteralPath $env:DEEPSEEK_GUIDE_CREDENTIAL_FILE -Encoding ASCII -NoNewline; Write-Host 'Key saved for this Windows account.' -ForegroundColor Green } finally { $key.Dispose() }";
    const result = spawnSync(powershell, ['-NoLogo', '-NoProfile', '-Command', saveKey], {
      env: { ...process.env, DEEPSEEK_GUIDE_CREDENTIAL_FILE: credentialFile },
      stdio: 'inherit'
    });
    if (result.error) throw new Error('Could not open Windows PowerShell to save your key.');
    process.exitCode = result.status ?? 1;
    return;
  }

  const model = routes.get(choice);
  if (!model) throw new Error('This shortcut uses Flash. Start with: claude-deepseek flash');
  if (extra.some(arg => /^--(?:model|fallback-model|settings|setting-sources|agent|agents)(?:=|$)/i.test(arg))) {
    throw new Error('This shortcut keeps the Flash setup fixed. Start with: claude-deepseek flash');
  }
  const claude = join(process.env.USERPROFILE || homedir(), '.local/bin/claude.exe');
  if (!existsSync(claude)) throw new Error('Claude Code was not found. Complete step 2 of the guide first.');
  if (!existsSync(credentialFile)) throw new Error('Save your key first: claude-deepseek --set-key');

  let key;
  try {
    const readKey = "$ErrorActionPreference='Stop'; $s=(Get-Content -LiteralPath $env:DEEPSEEK_GUIDE_CREDENTIAL_FILE -Raw).Trim() | ConvertTo-SecureString; $p=[Runtime.InteropServices.Marshal]::SecureStringToBSTR($s); try { [Console]::Out.Write([Runtime.InteropServices.Marshal]::PtrToStringBSTR($p)) } finally { [Runtime.InteropServices.Marshal]::ZeroFreeBSTR($p); $s.Dispose() }";
    key = execFileSync(powershell, ['-NoLogo', '-NoProfile', '-NonInteractive', '-Command', readKey], {
      env: { ...process.env, DEEPSEEK_GUIDE_CREDENTIAL_FILE: credentialFile },
      encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true, timeout: 15000
    }).trim();
  } catch {
    throw new Error('Windows could not read your saved key. On this Windows account, run: claude-deepseek --set-key');
  }
  if (!key) throw new Error('Your saved key is empty. Run: claude-deepseek --set-key');

  // Settings apply only to this child process, so other terminals keep their settings.
  const env = { ...process.env };
  for (const name of Object.keys(env)) {
    if (/^(ANTHROPIC_|CLAUDE_|CLAUDECODE$|OPENAI_|CODEX_|METATOOLS_|DEEPSEEK_)/i.test(name)) delete env[name];
  }
  Object.assign(env, {
    ANTHROPIC_BASE_URL: 'https://api.deepseek.com/anthropic',
    ANTHROPIC_AUTH_TOKEN: key,
    ANTHROPIC_API_KEY: '',
    ANTHROPIC_MODEL: model,
    ANTHROPIC_DEFAULT_OPUS_MODEL: model,
    ANTHROPIC_DEFAULT_SONNET_MODEL: model,
    ANTHROPIC_DEFAULT_HAIKU_MODEL: model,
    ANTHROPIC_DEFAULT_FABLE_MODEL: model,
    CLAUDE_CODE_SUBAGENT_MODEL: model,
    CLAUDE_CODE_AUTO_COMPACT_WINDOW: '786432',
    CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1',
    CLAUDE_CODE_ATTRIBUTION_HEADER: '0',
    CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: '1'
  });
  console.log(`Starting Claude Code with ${model} at api.deepseek.com`);
  const child = spawn(claude, ['--model', model, '--settings', join(directory, 'claude-settings.json'), ...extra], {
    env, stdio: 'inherit'
  });
  child.on('error', () => {
    console.error('Claude Code could not start. Recheck step 2 of the guide.');
    process.exitCode = 1;
  });
  child.on('exit', code => { process.exitCode = code ?? 1; });
}

try { main(); } catch (error) { console.error(error.message); process.exitCode = 1; }
'@
        $pickerSettings = @'
{
  "availableModels": [
    "deepseek-flash",
    "deepseek-flash[1m]"
  ],
  "modelPicker": {
    "replaceBuiltInOptions": true,
    "options": [
      {
        "model": "deepseek-flash[1m]",
        "label": "DeepSeek Flash",
        "description": "The DeepSeek Flash connection for this setup.",
        "behavesAs": "claude-opus-5"
      }
    ]
  }
}
'@
        $shortcut = @'
@echo off
rem ClaudeDeepSeekGuide shortcut v1
node.exe "%LOCALAPPDATA%\ClaudeDeepSeekGuide\launch.mjs" %*
'@
        $launchPath = Join-Path $setupFolder 'launch.mjs'
        $utf8 = New-Object System.Text.UTF8Encoding($false)
        [IO.File]::WriteAllText($launchPath, $launcher, $utf8)
        [IO.File]::WriteAllText((Join-Path $setupFolder 'claude-settings.json'), $pickerSettings, $utf8)
        Set-Content -LiteralPath $shortcutPath -Value $shortcut -Encoding ASCII

        Write-Host 'Now save the DeepSeek API key. It will not appear on screen.' -ForegroundColor Cyan
        & node.exe $launchPath --set-key
        if ($LASTEXITCODE -ne 0) { throw 'The key was not saved. Run this setup again when you have the key.' }

        $userPath = [Environment]::GetEnvironmentVariable('Path', 'User')
        $pathEntries = @($userPath -split ';' | Where-Object { $_ })
        if ($pathEntries -notcontains $binFolder) {
            $updatedPath = (@($binFolder) + $pathEntries) -join ';'
            [Environment]::SetEnvironmentVariable('Path', $updatedPath, 'User')
        }
        if (($env:Path -split ';') -notcontains $binFolder) {
            $env:Path = $binFolder + ';' + $env:Path
        }
        Write-Host ''
        Write-Host 'Setup complete! Next: step 4 in the guide.' -ForegroundColor Green
        Write-Host 'Your everyday command is: claude-deepseek flash'
    } catch {
        Write-Host ('Setup stopped: ' + $_.Exception.Message) -ForegroundColor Red
        Write-Host 'Save the error text when asking for help. Keep your API key private.'
    }
}

Connection settings: DeepSeek’s Claude Code guide.

Create a sample project

The commands below make a folder and open the coding assistant.

  1. Click Copy on the next box.
  2. Click the same PowerShell window, press Ctrl + V, then Enter.
  3. Wait for Claude Code to appear. The folder AIStarterProject is created automatically inside the Windows user folder; you do not have to make it yourself.
PASTE INTO POWERSHELL
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\AIStarterProject" | Out-Null
Set-Location -LiteralPath "$env:USERPROFILE\AIStarterProject"
claude-deepseek flash

If asked to choose a theme, use the up/down arrow keys to highlight one and press Enter. If asked to trust the folder, check that it ends in AIStarterProject, choose the option to trust that folder, and press Enter.

You are now inside Claude Code. From here until you type exit, messages go to the coding assistant. The command boxes below tell you which window to use.

A. Check the connection

  1. Click Copy below.
  2. Click near the message-entry line at the bottom of Claude Code. Paste with Ctrl + V, then press Enter.
PASTE INSIDE CLAUDE CODE
/status

Look for DeepSeek Flash or deepseek-flash[1m] as the model. If a provider address appears, it should contain api.deepseek.com. The app’s title can still say “Claude Code”. Press Esc once to leave the status view if necessary.

Copy this short message, paste it into Claude Code’s message-entry line, and press Enter:

PASTE INSIDE CLAUDE CODE
Reply with just: Ready.

A “Ready” reply confirms the key can make a request. This uses a small amount of API credit.

B. Ask for a small webpage

Click Copy, then paste this into Claude Code’s message-entry line and press Enter:

PASTE INSIDE CLAUDE CODE
Create a simple demo webpage in this folder.
Use one file named index.html, with a welcome heading
and a short sample paragraph.
Explain each step in plain English.
Tell me when index.html is ready to open.

When it asks permission to create or edit a file, read the request. Use the arrow keys to select the approval option for the project you asked it to create, then press Enter. Wait until it says index.html is ready.

C. Find and open the finished webpage

  1. Hold the Windows key and tap E. This opens File Explorer, the Windows app for viewing folders.
  2. Click Copy folder address below.
  3. Click inside the File Explorer window. Hold Ctrl and tap L to select the address bar across the top. Paste with Ctrl + V, then press Enter. Use the address bar, not the smaller search box on the right.
  4. The AIStarterProject folder opens. Find index.html. Windows may display it as just index with a browser icon.
  5. Double-click that file: click it twice quickly. The webpage should open in a browser. If Windows asks which app to use, choose Microsoft Edge or Google Chrome.
PASTE INTO FILE EXPLORER'S ADDRESS BAR
%USERPROFILE%\AIStarterProject
File Explorer · example layout
Paste the folder address here ←Search folder

Pressing Ctrl + L selects the address field automatically.

To make a change, click the Claude Code window on the taskbar and send a request such as “make the heading bigger”. After it finishes, click the webpage’s browser tab and press F5 to refresh it.

D. Finish the session

Click Claude Code’s message-entry line, type exit, and press Enter. The normal PowerShell line starting with PS returns. You can then close that window with its ×.

Official references: Claude Code controls · Checking the model

Keep this bit handy

Next time, just do this.

  1. Click the Windows search bar at the bottom of the screen, type Windows PowerShell, and click that app.
  2. Click Copy below. Click in PowerShell, paste with Ctrl + V, and press Enter.
  3. Wait for Claude Code, then type a request into its message-entry line and press Enter.

PASTE INTO POWERSHELL
Set-Location -LiteralPath "$env:USERPROFILE\AIStarterProject"
claude-deepseek flash

To work in a different existing folder, press Windows + E to open File Explorer. Double-click folders until you reach the project. Press Ctrl + L, type powershell, and press Enter. In the PowerShell window that opens, type claude-deepseek flash and press Enter.

A few useful controls
What you wantWhat to do
Start a new chatIn PowerShell: claude-deepseek flash
Continue your latest chatIn the same project’s PowerShell: claude-deepseek flash --continue
Stop the current responsePress Esc inside Claude Code.
Leave Claude CodeType exit and press Enter.
Get helpType /help inside Claude Code.

Something stuck? Start here.

Find the message you see. If you still need help, copy the error text when asking for help, with any API key hidden.

“node” or “npm” is not recognized

Close all PowerShell and Terminal windows, then click Windows Search, type Windows PowerShell, and click that app. Run the step 1 checks again. If they still fail, rerun the Node.js LTS installer with its default options. Restart Windows if the new installation still isn’t picked up.

“npm.ps1 cannot be loaded” or scripts are disabled

Use npm.cmd wherever a command says npm. For example, use npm.cmd --version or npm.cmd install. This guide’s shortcut is a .cmd file too. No permanent PowerShell security-setting change is needed.

“claude” is not recognized after installing

Close PowerShell with its ×. Click Windows Search, type Windows PowerShell, and click that app to open a fresh window. If it still fails, check Claude using its full location:

POWERSHELL
& "$env:USERPROFILE\.local\bin\claude.exe" --version

If that prints the version, proceed to step 3: the setup adds that folder to Windows’ command search path. If it also fails, run the step 2 installer again.

“claude-deepseek” is not recognized

Step 3 must finish with “Setup complete”. If it did, close every PowerShell and Terminal window, then click Windows Search, type Windows PowerShell, and click that app. If Windows still hasn’t picked up the shortcut, use its full location:

POWERSHELL, FROM YOUR PROJECT FOLDER
& "$env:USERPROFILE\.local\bin\claude-deepseek.cmd" flash

If that file is missing, copy and run step 3 again.

It wants a Claude login, subscription, or Anthropic key

Type exit inside Claude Code and press Enter. Close that window with its ×, click Windows Search, type Windows PowerShell, and click that app. In your project folder, start with claude-deepseek flash. Typing only claude does not use this shortcut’s saved DeepSeek connection. If the shortcut still asks you to sign in, check the DeepSeek shortcut setup before signing up or buying anything.

“401”, “invalid API key”, or “authentication failed”

Confirm with the API account owner that the key is active. To replace the saved key, type exit in Claude Code and press Enter. When the line starting with PS returns, copy and paste this command there and press Enter. Paste the correct key only when the hidden prompt appears:

POWERSHELL
claude-deepseek --set-key

Then start claude-deepseek flash again. An expired, revoked, or mistyped key needs to be replaced.

“402” or “insufficient balance”

The DeepSeek account needs more API credit. The API account owner can check the balance and add credit. Reinstalling the tools will not fix this.

“429”, “503”, or the service is temporarily busy

Pause for a minute, then try again. These messages can mean too many requests or a busy DeepSeek service. If it keeps happening, save the error text and check the service status.

It can’t find Git Bash

Current Claude Code can use PowerShell without Git. If your installation specifically asks for Git Bash, install Git for Windows, keep the installer’s defaults, then close PowerShell with its ×, search for Windows PowerShell using the Windows search bar, and click that app again. You do not need to make a GitHub account.

The setup says a DeepSeek shortcut already exists

The setup stopped to preserve the existing shortcut. Check the existing shortcut before changing it. This guide’s installer can be rerun over its own installation; it does not replace a different one.

PowerShell shows “>>” and seems to be waiting

It may have received only part of a command block. Press Ctrl + C to cancel it, then use the guide’s Copy button and paste the complete block again. Paste into the normal PowerShell prompt, which starts with PS.

The Copy button doesn’t work

Select the text in the command box yourself and press Ctrl + C. For step 3, expand “View the one-time setup code” and select the whole block, from & { through its final }. Try opening this HTML file in Edge or Chrome if your preview app blocks copying.

Official troubleshooting references: Claude Code on Windows · DeepSeek error codes

Screenshot · press Esc or Close to return