Chapter 0: Getting Started
Installing Claude Code
Installing Claude Code
Let's get Claude Code installed on your machine.
Prerequisites
You'll need:
- Node.js 18+ installed
- A terminal (Terminal.app, iTerm2, Warp, VS Code terminal, etc.)
- An Anthropic API key or Claude Pro/Max subscription
Claude Code requires Node.js 18 or later. Run node --version to check yours.
Install via npm
That's it! Claude Code is now available as the claude command in your terminal.
Verify the installation
You should see the version number printed. If you get "command not found", close your terminal completely, open a new one, and try again. If it still doesn't work, use this alternative:
This runs Claude Code without a global install. You can use npx @anthropic-ai/claude-code anywhere this course says claude.
Authentication
The first time you run Claude Code, it will ask you to authenticate:
- Claude Code opens your browser to authenticate
- Sign in with your Anthropic account
- Approve the connection
- Return to your terminal — you're ready to go!
What account do you need? Claude Code works with either a Claude Pro/Max subscription ($20+/month at claude.ai) or an Anthropic API key with credits. If you have a free Claude account, you'll need to upgrade to Pro or add API credits. The authentication screen will guide you through the options.
Expected cost: Completing this entire course (Chapters 0-4) typically uses $5-$15 in API credits if you're using an API key, depending on how much you experiment. With a Claude Pro subscription ($20/month) or Max subscription ($100/month), usage is included. You can check your current usage at console.anthropic.com under the Usage tab.
If you have an Anthropic API key, you can set it as an environment variable instead: export ANTHROPIC_API_KEY=your-key-here
You're all set! In the next section, we'll have our first conversation with Claude Code.