New ways to install Claude Code on macOS

Previously, Anthropic distributed Claude Code via NPM:

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

New alternatives

While the method above still works, there are now 2 alternative ways to get Claude Code.

1) Via Bash Script

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

2) Via Homebrew

brew install --cask claude-code

These alternatives do not require NPM as a prerequisite. 


Switching

1) Before switching, you should uninstall Claude Code via NPM.

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

2) Then install Claude Code via one of the alternatives.

% curl -fsSL https://claude.ai/install.sh | bash
Setting up Claude Code...

✔ Claude Code successfully installed!

  Version: 2.0.32

  Location: ~/.local/bin/claude

3) Run it!

claude

AI Summary AI Summary

gpt-5-mini-2025-08-07 2025-11-04 20:48:04
Anthropic previously distributed Claude Code via NPM, but now offers two macOS alternatives: a one-line installer script and a Homebrew cask, both of which remove the NPM prerequisite. To switch, uninstall the global NPM package first, then install Claude Code using either alternative and run the CLI. These options simplify installation for users who prefer not to use NPM.
Chrome On-device AI 2025-11-04 20:52:42

Share Share this Post