Setting up Claude code on Windows

The iOS app is more or less done, so now it’s time to start on Android.

For Android, of course you’ll use Android Studio. In the past, I always used WSL for development on Windows, but this is my first time using Claude Code in pure Windows, and I found there’s no environment set up.

So I tinkered a bit to get things working.

Solution for Windows PowerShell Prompt: “claude is not recognized”

After installing Claude Code with the official script:

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

If running claude --version gives you the “claude is not recognized” error, it’s usually because the installation directory isn’t in your PATH.

1. Check Git

Claude Code on Windows requires Git Bash:

git --version

If it’s not installed:

winget install Git.Git --source winget

After installing, reopen PowerShell.

2. Confirm Claude Code Is Installed

Test-Path "$env:USERPROFILE\.local\bin\claude.exe"

If it returns True, the installation file exists.

3. Add to PATH

Permanently add the folder to the current user’s PATH:

[Environment]::SetEnvironmentVariable(
  "PATH",
  "$env:PATH;$env:USERPROFILE\.local\bin",
  [EnvironmentVariableTarget]::User
)

To apply this immediately in the current PowerShell window:

$env:PATH = "$env:PATH;$env:USERPROFILE\.local\bin"

4. Verify

claude --version

If it still doesn’t work, completely close and reopen PowerShell; restart Windows if necessary.

5. Launch and Log In

claude

A browser window will open to the Anthropic login page. Complete authorization there.

Common Troubleshooting Commands

See which Claude is actually being invoked:

Get-Command claude | Format-List

Check if multiple versions are installed:

Get-Command claude -All

Run the self-diagnosis tool:

claude doctor

If you have both the Winget version and the official script version installed, you can uninstall the Winget version to avoid the older version taking precedence:

winget uninstall Anthropic.ClaudeCode

The core solution: add %USERPROFILE%\.local\bin to the user PATH.

5 Likes

Come learn with us too.