Install Claude Code
Now that Node.js is in place, getting Claude Code is a single command. By the end of this lesson the CLI will be installed, verified, and waiting for your first prompt.
Open Terminal/Command Prompt
On Mac
Press Command + Space, type "Terminal", and hit Enter
On Windows
Click Windows logo, type "Command Prompt", and hit Enter
Install Claude Code
The recommended way to install is the native installer: one command, and it keeps itself up to date automatically. Copy the line for your system, paste it, and press Enter:
curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iexThis takes 1-2 minutes. You'll see lots of text in the terminal. That's completely normal and means it's working! Already use Node.js and prefer npm? npm install -g @anthropic-ai/claude-code also works (Node.js 22+).
Verify Installation
Run this command to confirm Claude Code is installed:
claude --versionYou should see a version number. If you do, you're ready to sign in!
Sign In
Start Claude Code from your terminal with the claude command. What happens next depends on the sign-in method you picked in Lesson 1:
claude- **Claude subscription (Option A):** a browser window opens. Sign in with your Claude.ai account, then return to the terminal. Done.
- **API key (Option B):** if you've set your key as the ANTHROPIC_API_KEY environment variable, Claude Code asks you to approve it once instead of opening a browser.
Setup Complete!
- A Claude subscription or an Anthropic API key
- Node.js installed on your computer
- Claude Code installed, verified, and signed in
You're ready to start building! Let's move on to creating your first prototype.