Originally published at claudeguide.io/how-to-install-claude-code
Installing Claude Code takes under 5 minutes: run npm install -g @anthropic-ai/claude-code, set your API key, and type claude in any project directory. This guide covers every platform and the most common install errors.
Prerequisites
| Requirement | Version | Check |
|---|---|---|
| Node.js | 18.0+ | node --version |
| npm | 8.0+ | npm --version |
| Anthropic API key | — | console.anthropic.com |
If you don't have Node.js yet, install it first:
# macOS (Homebrew)
brew install node
# Windows
winget install OpenJS.NodeJS
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
Step 1: Install Claude Code
npm install -g @anthropic-ai/claude-code
Verify the install:
claude --version
# claude-code/x.x.x linux-x64 node-v20.x.x
Top comments (0)