Install Claude Code on your machine

getting started

// what it does

The recommended path is the native installer, which drops a self-contained binary at ~/.local/bin/claude and auto-updates in the background. The npm package installs that same native binary and needs Node.js 22 or later; Homebrew ships it as a cask. All three give you the single claude command — pick whichever fits how you manage tools.

// shell

$ curl -fsSL https://claude.ai/install.sh | bash
$ npm install -g @anthropic-ai/claude-code
$ brew install --cask claude-code

// gotcha

Never run sudo npm install -g @anthropic-ai/claude-code — it causes permission and security problems, and the docs warn against it. Homebrew and WinGet installs do not auto-update; you must run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode yourself.

// resources