Lesson completed!
-

Installation and Configuration

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-code

Or with your preferred package manager:

# Yarn
yarn global add @anthropic-ai/claude-code
 
# pnpm
pnpm add -g @anthropic-ai/claude-code

Authentication

Claude Code offers multiple authentication methods:

export ANTHROPIC_API_KEY=your-api-key

Get 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 flow

3. 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
claude

Claude will automatically:

  1. Index your project structure
  2. Read any existing CLAUDE.md file
  3. Start an interactive session

Verify Installation

Test that everything works:

claude --version

Try 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.