How-To Guide

How to Install Claude Code

Step-by-step guide to installing Claude Code on macOS, Linux, or Windows WSL. Covers Node.js setup, npm install, and authentication.

How to Install Claude Code

1

Install Node.js 18+

Claude Code requires Node.js 18 or later. Download from nodejs.org or use nvm: `nvm install 18 && nvm use 18`. Verify with `node --version`.

2

Install Claude Code via npm

Run `npm install -g @anthropic-ai/claude-code` in your terminal. This installs Claude Code globally so you can use it from any directory.

3

Authenticate with your Anthropic account

Run `claude` in your terminal. On first launch, it opens a browser window for OAuth authentication. Sign in with your Anthropic account (Max or API plan).

4

Verify the installation

Navigate to any project directory and run `claude`. You should see the Claude Code interface ready for commands.

Pro tips

  • *

    Use nvm (Node Version Manager) to manage multiple Node.js versions without conflicts

  • *

    If you're behind a firewall, you may need to set npm proxy: `npm config set proxy http://proxy:port`

  • *

    Claude Code also works in Windows via WSL (Windows Subsystem for Linux)

More Claude Code guides

Explore more