Quick answer (recommended in 2026): To install Claude Code in 2026, run the official native installer for your platform. On macOS, Linux or WSL: curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell: irm https://claude.ai/install.ps1 | iex. The installer drops a signed binary on PATH and auto-updates in the background, so no Node.js install is required. Once it finishes, open any project folder, run claude, and sign in. c-ai.chat is an independent guide — not Anthropic — and we keep these commands aligned with the official Claude Code setup docs.
Verified May 12, 2026 against the official Claude Code setup documentation.
Native installer (recommended)
The native installer is Anthropic’s official, recommended path on Mac, Windows, Linux. It does not depend on Node.js, npm, or any other runtime. Run:
curl -fsSL https://claude.ai/install.sh | bash # macOS / Linux / WSL irm https://claude.ai/install.ps1 | iex # Windows PowerShell
After the installer finishes, restart your shell (or open a new terminal window), then run claude from any project folder. The first run will prompt you to sign in with your Anthropic account. The binary auto-updates in the background, so you stay on the latest stable release without ever re-running an install command.
What the installer does
- Downloads a signed platform binary for
claude. - Places it at
~/.local/bin/claude(or%LOCALAPPDATA%on Windows). - Adds the install directory to your user PATH.
- Registers an auto-update channel so the binary refreshes in the background.
- Does not require root, sudo, Node.js, or npm.
Install with a package manager
If you prefer your OS package manager:
- macOS (Homebrew):
brew install --cask claude-code - Windows (WinGet):
winget install Anthropic.ClaudeCode - Windows (Scoop, community bucket):
scoop install claude-code
Package managers wrap the same binary as the native installer, so behavior and updates work identically.
Verify the install
After installation, open a new terminal session and check the version:
claude --version claude /doctor
claude --version should print a release tag such as claude-code 2.x.x. claude /doctor runs Anthropic’s built-in diagnostic which checks PATH, auth, network reachability, and configuration. See our walkthrough of the /doctor command for what to expect.
First run and sign-in
cd into any project directory and run claude. The first invocation opens your default browser to claude.ai and asks you to authorise the CLI against your Anthropic account. After consent, the CLI stores a refresh token locally so future runs are silent. If you use a Claude Pro, Max, Team, or Enterprise plan, your subscription is honoured automatically. If you only have API access, see Claude Code login & authentication.
Troubleshooting
“command not found: claude”
The installer added ~/.local/bin to your PATH, but you opened a shell that was already running before the install finished. Restart your terminal (or run source ~/.zshrc / source ~/.bashrc). On Windows, open a new PowerShell window so the updated user PATH is loaded.
Permission or PATH issue
If claude still cannot be found, print your PATH and verify the install directory is present:
echo $PATH ls -l ~/.local/bin/claude
If the binary exists but is not executable, run chmod +x ~/.local/bin/claude. If the directory is missing from PATH, add this line to your shell rc file: export PATH="$HOME/.local/bin:$PATH".
Check the installed version & update
The native installer auto-updates, but you can force a refresh with claude update. To see your current version run claude --version. To re-install at the latest stable release, re-run the install command from the top of this article; it is idempotent.
Uninstall
Remove the binary and config: rm ~/.local/bin/claude and rm -rf ~/.config/claude. On Windows: winget uninstall Anthropic.ClaudeCode, or delete %LOCALAPPDATA%\Programs\claude-code.
Legacy / alternate method: npm
Before the native installer existed, Claude Code shipped exclusively as an npm package. That path still works for users who already have a recent Node.js (18+) and a writable global npm prefix, but Anthropic no longer recommends it for new installs:
npm install -g @anthropic-ai/claude-code
- npm installs are not auto-updated — you have to re-run
npm install -g @anthropic-ai/claude-codemanually. - The npm version is the same CLI but starts a Node process to bootstrap, which is measurably slower on cold start.
- EACCES permission errors on global npm installs are common; you may need to configure an npm prefix or use
sudo. - If you are already on the npm version and want to switch, uninstall first:
npm uninstall -g @anthropic-ai/claude-code, then run the native installer.
FAQ
Do I need Node.js to install Claude Code?
No — the recommended native installer does not require Node.js or npm. Node is only required if you choose the legacy npm path.
Do I need a Claude Pro or Max plan?
Claude Code is available to Claude Pro, Max, Team, and Enterprise subscribers, and is also usable with API credit if you authenticate against the API. The CLI itself is free; usage costs are billed by your Anthropic plan. See Claude pricing and Claude Code pricing 2026.
How do I update Claude Code?
The native install auto-updates in the background. To force a refresh, run claude update. On the legacy npm path, run npm install -g @anthropic-ai/claude-code again. With Homebrew, brew upgrade --cask claude-code. With WinGet, winget upgrade Anthropic.ClaudeCode.
Where does the installer put files?
On Mac and Linux the binary lives at ~/.local/bin/claude and config at ~/.config/claude/. On Windows the binary lives under %LOCALAPPDATA%\Programs\claude-code and config under %APPDATA%\claude.
