Module 01: Installation & setup
Last updated:
Time: 15 minutes | Complexity: β Beginner
Get Claude Code installed and running on your system. Verify it works with your first command.
What youβll learn
Section titled βWhat youβll learnβ- Install Claude Code for your platform (macOS / Linux / Windows)
- Understand the basic prompt β response loop
- Run your first command
- Access the help system
Installation
Section titled βInstallationβmacOS (recommended)
Section titled βmacOS (recommended)βbrew install anthropic/tap/claude-codeVerify:
claude --versioncurl -sSL https://dl.claudecode.com/install.sh | bashVerify:
claude --versionWindows
Section titled βWindowsβDownload the installer from https://dl.claudecode.com/windows or use:
iex ((New-Object System.Net.WebClient).DownloadString('https://dl.claudecode.com/install.ps1'))Docker (any platform)
Section titled βDocker (any platform)βdocker run -it anthropic/claude-code:latestFirst run
Section titled βFirst runβNavigate to any project directory and start Claude:
cd ~/my-projectclaudeYouβll see:
Claude Code v2.x.x readyProject: ~/my-project (git: main)Context: 0% Β· Tokens available: 200,000
Type /help for commands or ask me anything>Essential commands
Section titled βEssential commandsβ| Command | Purpose |
|---|---|
/help | Show all available commands |
/status | Check context usage and session state |
/clear | Start fresh (clears conversation history) |
Ctrl+C | Cancel the current operation |
/exit | Close Claude Code |
Your first 5 minutes
Section titled βYour first 5 minutesβExercise 1: View available commands
Section titled βExercise 1: View available commandsβ/helpReview the command list. Notice:
- Workflow:
/plan,/rewind,/think - Navigation:
/goto,/read - Memory: memory loading at startup
- Advanced:
/model,/mode
Exercise 2: Check session state
Section titled βExercise 2: Check session stateβ/statusYouβll see:
- Context usage percentage
- Available tokens
- Current project
- Git branch
Exercise 3: Ask Claude something
Section titled βExercise 3: Ask Claude somethingβ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 β ApplyExercise 4: Review a suggested change
Section titled βExercise 4: Review a suggested changeβIf Claude suggests code changes, youβll see:
- A description of the change
- A
diffview (whatβs being added/removed) - A prompt to accept or reject
Rule: Always review diffs before accepting. This protects you from unexpected changes.
The core concept: The loop
Section titled βThe core concept: The loopβEvery interaction follows this pattern:
ββββββββββββββββ You ask βββββββββ¬βββββββ β βΌββββββββββββββββ Claude ββ reads files βββββββββ¬βββββββ β βΌββββββββββββββββ Claude ββ suggests ββ changes βββββββββ¬βββββββ β βΌβββββββββββββββββββββ You review diff ββ and approve βββββββββ¬ββββββββββββ β βΌβββββββββββββββββββββ Changes applied ββ to your files βββββββββββββββββββββKey concepts
Section titled βKey conceptsβSessions
Section titled βSessionsβ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
Section titled βContextβ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,
/compactoptional - 70%+: Run
/compactto free space - 90%+: Youβll be forced to clean up
Git awareness
Section titled βGit awarenessβClaude Code is git-aware. It:
- Detects your current branch
- Shows uncommitted changes
- Helps with commits and reviews
- Prevents accidental breaking changes
Validation: Youβre ready ifβ¦
Section titled βValidation: Youβre ready ifβ¦ββ 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
Whatβs next?
Section titled βWhatβs next?β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)
Troubleshooting
Section titled βTroubleshootingββclaude: command not foundβ
Section titled ββclaude: command not foundββYour installation didnβt complete. Try:
- macOS:
brew install anthropic/tap/claude-codeagain - Linux: Re-run the install script
- Windows: Download the installer from https://dl.claudecode.com/windows
βProject not foundβ
Section titled ββProject not foundββMake sure youβre in a directory with a package.json, .git, or other project file. Claude Code works best in projects.
βPermission deniedβ (macOS)
Section titled ββPermission deniedβ (macOS)βTry:
chmod +x /usr/local/bin/claudeResources
Section titled βResourcesβ- Official Docs: https://code.claude.com/docs
- FAQ: See
guide/ultimate-guide.mdAppendix B - Examples:
examples/directory in this guide
Completed Module 01? β Ready for Module 02: Core Loop