This is pretty common to have different options to install binaries and I assume part of the reason why they do have the second option is to gear towards to non-developers or those unfamiliar with nodejs. Most developers familiar with nodejs would use option 1, `npm install` is as easy as it gets. Usually with nodejs, developers work in many different projects with many nodejs versions. So it's common to manage multiple nodejs environments (with something like nvm or asdf). This is how we avoid installing packages in system folders (which requires sudo). I encourage you to ask Claude honestly, you'll get some pretty good answers. Everything is done in good intentions. Answer from sirneb on reddit.com
🌐
Claude
code.claude.com › docs › en › setup
Set up Claude Code - Claude Code Docs
macOS: Signed by “Anthropic PBC” and notarized by Apple ... Do NOT use sudo npm install -g as this can lead to permission issues and security risks.
🌐
GitHub
github.com › anthropics › claude-code › issues › 3172
Bug: claude command not found after npm install -g on macOS with Homebrew due to incorrect symlink · Issue #3172 · anthropics/claude-code
July 8, 2025 - The installation creates an incorrect ... install Node.js: brew install node. Install the Claude Code CLI globally: npm install -g @anthropic-ai/claude-code....
Published   Jul 08, 2025
🌐
Reddit
reddit.com › r/claudeai › new to claude code - why are there 3 different ways to install this thing?
r/ClaudeAI on Reddit: New to Claude Code - why are there 3 different ways to install this thing?
August 27, 2025 -

Hey everyone, I'm new to Claude Code and just spent an hour in installation hell. I'm on a Mac

So apparently, there are THREE ways to install this:

  1. npm install: npm install -g u/anthropic-ai/claude-code

    • Docs say this is "standard installation"

    • Gets a permission denied error

    • Docs then warn "DO NOT use sudo"

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

    • Called "beta" but actually works

    • Buried in a random troubleshooting article

    • Installs to ~/.local/bin (need to fix PATH)

  3. sudo npm: sudo npm install -g u/anthropic-ai/claude-code

    • What actually makes npm work

    • But docs specifically say DON'T do this

    • "Security risks" apparently

How did you all install this?
Also, why do they recommend npm when they literally have a note saying "Claude Code has a native installation that doesn't depend on npm" - THEN MAKE THAT THE DEFAULT??

I'm not even mad, this is hilarious. Just want to know if I'm missing something obvious here

🌐
ClaudeLog
claudelog.com › home › install
Install Claude Code | ClaudeLog
Claude Code supports the following operating systems: ... Note: The native installer does not require Node.js. Only the legacy npm installation method requires Node.js 18.0+.
🌐
Bind AI IDE
blog.getbind.co › 2025 › 08 › 26 › how-to-install-claude-code-cli
How to Install Claude Code CLI – Bind AI IDE
August 27, 2025 - The CLI supports macOS (10.15+), Linux (Ubuntu 20.04+/Debian 10+, Alpine for native builds), and Windows 10+ (via WSL or Git Bash). A minimum of 4GB RAM is recommended, alongside an active internet connection.
🌐
npm
npmjs.com › package › @anthropic-ai › claude-code
@anthropic-ai/claude-code - npm
Install Claude Code: npm install -g @anthropic-ai/claude-code · Navigate to your project directory and run claude. We welcome your feedback. Use the /bug command to report issues directly within Claude Code, or file a GitHub issue.
      » npm install @anthropic-ai/claude-code
    
Published   Dec 22, 2025
Version   2.0.76
Author   Anthropic
🌐
Micro
novistopheles.micro.blog › 2025 › 10 › 21 › installing-claude-codeedited.html
Installing Claude Code | Novistopheles
If you need to install Node.js on your Mac, you might use Homebrew or download from nodejs.org. For example, type the following in your Terminal: ... You want Node ≥ 20. ... On first run, you’ll be prompted to login/authenticate with your ...
Find elsewhere
🌐
GitHub
github.com › Rtolber345 › claude-code-m-mac-install
GitHub - Rtolber345/claude-code-m-mac-install: Step-by-step guide to install Claude Code CLI on Apple Silicon Macs
Before showing what works, here's what we tried that failed: ❌ npm install -g @anthropic-ai/claude-cli (package doesn't exist) ❌ brew install anthropic-ai/claude/claude (GitHub ...
Author   Rtolber345
🌐
Claudecode
claudecode.pro › docs › getting-started
Getting Started - Claude Code
# Install Claude Code CLI globally · npm install -g @anthropic/claude-code · # Verify installation · claude --version · # Add Anthropic tap · brew tap anthropic/claude · # Install Claude Code · brew install claude-code · 2 · Visit Anthropic ...
🌐
Mike Murphy Co
mikemurphy.co › home › how to install claude code on mac
How To Install Claude Code On Mac - Mike Murphy Co
August 20, 2025 - System Requirements: MacOS 10.15 or later Node.js installed on Mac · Download & Install Node.js: https://nodejs.org · Install Claude Code Snippet: npm install -g @anthropic-ai/claude-code · How To Install Claude Code (knowledge base article): ...
🌐
Medium
medium.com › @lvalics_37568 › setting-up-claude-code-on-windows-macos-449eed161e10
Setting up Claude Code on Windows & macOS | by Valics Lehel | Medium
June 20, 2025 - Tip: keep Windows-side Git for GUI apps like GitHub Desktop, but run Claude Code inside WSL so paths and permissions stay Linux-friendly. ... brew install nvm # or use the curl script above mkdir ~/.nvm && echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc source ~/.zshrc nvm install --lts ... Auth loop in WSL — If the browser fails to open, copy the URL from the CLI and paste it manually.
🌐
Eesel AI
eesel.ai › blog › npm-install-claude-code
A guide to `npm install claude-code`: Features, limitations, and alternatives - eesel AI
Learn how `npm install claude-code` works and explore its powerful features. We'll also cover the hidden costs and limitations of agentic coding tools and suggest a more integrated approach.
🌐
Z
docs.z.ai › devpack › tool › claude
Claude Code - Overview - Z.AI DEVELOPER DOCUMENT
# Install Claude Code npm install -g @anthropic-ai/claude-code # Navigate to your project cd your-awesome-project # Complete claude
🌐
GitHub
github.com › anthropics › claude-code
GitHub - anthropics/claude-code: Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Homebrew (MacOS): brew install --cask claude-code · Windows: irm https://claude.ai/install.ps1 | iex · NPM: npm install -g @anthropic-ai/claude-code · NOTE: If installing with NPM, you also need to install Node.js 18+ Navigate to your project ...
Starred by 48.2K users
Forked by 3.4K users
Languages   Shell 46.4% | Python 33.8% | TypeScript 12.9% | PowerShell 4.7% | Dockerfile 2.2%
🌐
Substack
designwithai.substack.com › p › how-to-install-claude-code
How to install Claude Code - Design with AI
October 2, 2025 - Guide to installing Claude Code: Simple steps, troubleshooting tips, and solutions if you run into errors.