Running Claude Code on Windows Without WSL

Got a Windows dev VM where you can't install WSL? Here's how to get Claude Code working with just Git Bash.

The Fix

Add these to your .bashrc:

export NPM_CONFIG_IGNORE_SCRIPTS=true
export SHELL=/c/Program\ Files/Git/bin/bash.exe

Then:

source ~/.bashrc
npm install -g @anthropic-ai/claude-code

Done.

Why It Works

Git Bash provides enough Unix-like environment for Claude Code. The SHELL export tells it where to find bash, and NPM_CONFIG_IGNORE_SCRIPTS prevents install script issues.

Caveats

This is a workaround, not official support. Works fine in my vm, let me know if it also works on your machine!

Tested on Windows Server 2022 with Git for Windows 2.50.0.windows.1

Comments

  1. Markdown is allowed. HTML tags allowed: <strong>, <em>, <blockquote>, <code>, <pre>, <a>.