I had to install nodejs :D
sudo apt update
sudo apt install nodejs npm -y
Everything works fine now, you can also install GitHub, it is optional tho.
Answer from Don Feto on Stack OverflowStep 1: Open cmd
Open cmd as administrator
Step 2: Set NPM configuration, telling npm to ignore executing scripts in packages during installation (e.g., preinstall, postinstall, etc.)
setx NPM_CONFIG_IGNORE_SCRIPTS true
$env:NPM_CONFIG_IGNORE_SCRIPTS = “true”
Step 3: Configure the SHELL environment variable
setx SHELL "C:\Program Files\Git\bin\bash.exe"
Step 4: Install Claude Code
npm install -g @anthropic-ai/claude-code
Step 5: Add to Environment Variables
Add this line to your environment variables:
C:\Users\y.xie\.npm-global
Step 6: Restart the development environment
Restart CMD or your IDE (e.g., VS Code, IntelliJ IDEA), then log in to your Claude Code account or configure the API directly within the application to start using it.
Supplementary Notes
Ensure Git for Windows is installed, with the path being
C:\Program Files\Git\bin\bash.exe.If the Git installation path is different, please adjust the SHELL environment variable path accordingly.
The path
C:\Users\y.xie\.npm-globalshould also be added based on your actual path.It is recommended to set these variables permanently to avoid having to reconfigure after each restart.
Later, if you want to uninstall and revert the changes from Step Two and Step Three, just execute
setx NPM_CONFIG_IGNORE_SCRIPTS falseandsetx SHELL "".
Videos
Just shipped win-claude-code - a wrapper that lets you run Anthropic's Claude Code directly on Windows without WSL.
npm install -g anthropic-ai/claude-code --ignore-scripts npx win-claude-code@latest
That's it. Works with PowerShell, CMD, Windows Terminal - whatever you prefer.
Built this because I got tired of WSL setup just to use Claude Code. Figured other Windows devs might find it useful too.
GitHub: https://github.com/somersby10ml/win-claude-code
Would love feedback if anyone tries it out! 🚀
Hello,
I was struggling to get Claude Code working on Windows with my .NET projects while maintaining proper IDE support. The core problem is that Claude Code requires WSL to run on Windows. If you copy your project files into a WSL folder, you lose crucial IDE integration.
Here's the correct way to do it without copying your code into a WSL folder (if you weren't already aware, like me!):
Open your favorite IDE and your project.
Open the terminal within your IDE.
Navigate to your project directory (e.g.,
C:\MyProject).Type the following command:
wsl claude
Enjoy!
Hey
I just read the latest patch notes and was surprised that claude code cli now supports Windows.
But I can't find any further documentation about the full functionality. For example, does it really fully support claude code cli?