KahWee - Web Development, AI Tools & Tech Trends

Expert takes on AI tools like Claude and Sora, modern web development with React and Vite, and tech trends. By KahWee.

Claude Code Goes Native: Install the Official CLI

Claude Code, Anthropic's official CLI for coding assistance, now has native installers for macOS, Linux, Windows, and WSL. If you've been using the npm version, it's time to upgrade to the native build for better performance and reliability.

Why Switch to Native?

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

If you currently have Claude Code installed via npm, remove it first:

npm uninstall -g @anthropic-ai/claude-code

Install the Native Version

Pick the method that matches your operating system.

macOS

Using Homebrew is the simplest option:

brew install --cask claude-code

Linux

Run the installation script:

curl -fsSL https://claude.ai/install.sh | bash

WSL (Windows Subsystem for Linux)

Use the same Linux installation method:

curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell

Run the Windows installation script:

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

Verify Installation

After installing, confirm Claude Code is working:

claude --version

To see if anything went wrong:

claude /doctor

You should see the version number displayed. You're now ready to use the official native CLI.

What's Next?

Claude Code lets you ask questions about your codebase, run commands, and work on coding tasks all from the command line. Check out the documentation to learn what you can do with it.