Skip to content
Code Guide

Module 01: Installation & Setup

Time: 15 minutes | Complexity: ⭐ Beginner

Get Claude Code installed and running on your system. Verify it works with your first command.


  • Install Claude Code for your platform (macOS / Linux / Windows)
  • Understand the basic prompt → response loop
  • Run your first command
  • Access the help system

Terminal window
brew install anthropic/tap/claude-code

Verify:

Terminal window
claude --version
Terminal window
curl -sSL https://dl.claudecode.com/install.sh | bash

Verify:

Terminal window
claude --version

Download the installer from https://dl.claudecode.com/windows or use:

Terminal window
iex ((New-Object System.Net.WebClient).DownloadString('https://dl.claudecode.com/install.ps1'))
Terminal window
docker run -it anthropic/claude-code:latest

Navigate to any project directory and start Claude:

Terminal window
cd ~/my-project
claude

You’ll see:

Claude Code v2.x.x ready
Project: ~/my-project (git: main)
Context: 0% · Tokens available: 200,000
Type /help for commands or ask me anything
>

CommandPurpose
/helpShow all available commands
/statusCheck context usage and session state
/clearStart fresh (clears conversation history)
Ctrl+CCancel the current operation
/exitClose Claude Code

Terminal window
/help

Review the command list. Notice:

  • Workflow: /plan, /rewind, /think
  • Navigation: /goto, /read
  • Memory: memory loading at startup
  • Advanced: /model, /mode
Terminal window
/status

You’ll see:

  • Context usage percentage
  • Available tokens
  • Current project
  • Git branch
What files are in my project?

Claude will read the project structure and respond. This is the core loop:

Your prompt → Claude reads files → Claude suggests changes → You review → Apply

If Claude suggests code changes, you’ll see:

  1. A description of the change
  2. A diff view (what’s being added/removed)
  3. A prompt to accept or reject

Rule: Always review diffs before accepting. This protects you from unexpected changes.


Every interaction follows this pattern:

┌─────────────┐
│ You ask │
└──────┬──────┘
┌─────────────┐
│ Claude │
│ reads files │
└──────┬──────┘
┌─────────────┐
│ Claude │
│ suggests │
│ changes │
└──────┬──────┘
┌──────────────────┐
│ You review diff │
│ and approve │
└──────┬───────────┘
┌──────────────────┐
│ Changes applied │
│ to your files │
└──────────────────┘

Each time you run claude, you start a new session. A session is a conversation with Claude that persists while you’re using Claude Code.

  • Sessions are not saved by default (they end when you exit)
  • Sessions are scoped to one project at a time
  • Your context grows as you ask more questions (max ~200K tokens)

Context is how much of the conversation Claude remembers. It’s shown as a percentage (0-100%).

  • 0-50%: Plenty of room, work freely
  • 50-70%: Be selective, /compact optional
  • 70%+: Run /compact to free space
  • 90%+: You’ll be forced to clean up

Claude Code is git-aware. It:

  • Detects your current branch
  • Shows uncommitted changes
  • Helps with commits and reviews
  • Prevents accidental breaking changes

✓ You can run claude --version and see your installed version ✓ You can start Claude in a project with claude ✓ You understand the prompt → response loop ✓ You can see /status and understand what it shows ✓ You’ve reviewed at least one diff from Claude


Once you’re comfortable with this module, move to Module 02: Core Loop to understand:

  • How Claude reads your project
  • How context works in depth
  • How to structure requests for better results
  • Planning mode and thinking modes

Time to next module: Ready immediately (no prerequisites beyond running Claude once)


Your installation didn’t complete. Try:

Make sure you’re in a directory with a package.json, .git, or other project file. Claude Code works best in projects.

Try:

Terminal window
chmod +x /usr/local/bin/claude


Completed Module 01? → Ready for Module 02: Core Loop