Claude Code Goes Native: Install the Official CLI
Claude Code now ships native installers for macOS, Linux, Windows, and WSL. The npm version was always temporary, so you should switch to the native build.
Why Switch?
The native Claude Code binary is faster, more reliable, and maintained as the official distribution. The npm version was a temporary solution while the native version was being developed.
Uninstall the npm Version
Warning
If you currently have Claude Code installed via npm, remove it first to avoid conflicts.
npm uninstall -g @anthropic-ai/claude-code
Install the Native Version
Pick the method that matches your operating system.
macOS
Homebrew:
brew install --cask claude-code
Linux
Installation script:
curl -fsSL https://claude.ai/install.sh | bash
WSL (Windows Subsystem for Linux)
Same as Linux:
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell
PowerShell script:
irm https://claude.ai/install.ps1 | iex
Note
On macOS, the Homebrew cask handles updates automatically via brew upgrade. On Linux and WSL, re-run the install script to update.
Verify Installation
Confirm it works:
claude --version
Tip
To diagnose any issues, run claude /doctor:
claude /doctor
You should see the version number, which confirms you are running the native CLI.
What's Next?
Claude Code handles codebase questions, command execution, and coding tasks from the terminal. See the documentation for the full feature set.