DEV Community

Sangmin Lee
Sangmin Lee

Posted on • Originally published at claudeguide.io

How to Install Claude Code — Complete Setup Guide 2026

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
Enter fullscreen mode Exit fullscreen mode

Step 1: Install Claude Code

npm install -g @anthropic-ai/claude-code
Enter fullscreen mode Exit fullscreen mode

Verify the install:

claude --version
# claude-code/x.x.x linux-x64 node-v20.x.x
Enter fullscreen mode Exit fullscreen mode

Top comments (0)