CLI Installation Methods in AI
From the Claude Code cheat sheet · Installation & Setup · verified Jul 2026
CLI Installation Methods
Install the terminal client with the recommended native installer or a package manager.
bash
# Native install (recommended): macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
# Native install (recommended): Windows PowerShell
irm https://claude.ai/install.ps1 | iex
# Homebrew stable channel
brew install --cask claude-code
# WinGet
winget install Anthropic.ClaudeCode
# Verify installation
claude --version🟢 The native installer is the recommended CLI installation
⚡ Native installations update automatically
📌 The npm alternative requires Node.js 22 or later
⚠️ Never install the npm package with sudo
installationclinativenpm
Continue with Claude Code
Save the full cheat sheet or work through every related task.