Installation and Configuration
Let's get Claude Code installed and configured on your machine.
Prerequisites
Before installing, make sure you have:
- Node.js 18+ - Claude Code requires Node.js
- A terminal - Works with any terminal (iTerm, Terminal, Windows Terminal, etc.)
- Git - For version control integration
Installation
Install Claude Code globally with npm:
npm install -g @anthropic-ai/claude-codeOr with your preferred package manager:
# Yarn
yarn global add @anthropic-ai/claude-code
# pnpm
pnpm add -g @anthropic-ai/claude-codeAuthentication
Claude Code offers multiple authentication methods:
1. Anthropic API Key (Recommended for individuals)
export ANTHROPIC_API_KEY=your-api-keyGet your API key from console.anthropic.com.
2. Claude Pro/Max Subscription
If you have a Claude Pro or Max subscription, you can authenticate through the browser:
claude
# Follow the browser authentication flow3. Enterprise (AWS Bedrock / Google Vertex)
For enterprise deployments, configure your cloud provider credentials.
Pricing
Claude Code uses the same pricing as the Claude API:
- Input tokens: $3 per million tokens
- Output tokens: $15 per million tokens
- With Claude Pro/Max: Included in subscription
Typical usage costs $5-20/month for active developers.
First Run
Navigate to a project and start Claude Code:
cd your-project
claudeClaude will automatically:
- Index your project structure
- Read any existing CLAUDE.md file
- Start an interactive session
Verify Installation
Test that everything works:
claude --versionTry a simple command:
> What files are in this project?
Next Steps
Congratulations! You now have Claude Code installed. In the next module, you'll learn about the 3 working modes and when to use each one.