Installation
| System | Command |
|---|---|
| macOS, Linux, WSL | curl -fsSL https://claude.ai/install.sh | bash |
| Windows (PowerShell) | irm https://claude.ai/install.ps1 | iex |
| Via npm (Node.js 18+) | npm install -g @anthropic-ai/claude-code |
Check with claude --version. If the command isn’t found, restart the terminal so PATH updates.
Sign-in
On first run claude opens a browser to sign in. Two options:
- A Claude account with a Pro or Max plan. Fixed price, usage limits reset on a schedule.
- An API key from the Anthropic Console. Pay per token, convenient for teams and automation.
First run in a project
cd ~/projects/my-app claude
Run the agent at the repository root. It sees everything in that folder and below, and doesn’t go outside without permission.
/init: your first CLAUDE.md
The /init command asks the agent to explore the project and create a CLAUDE.md with the structure, build and test commands and code style. The agent reads this file at the start of every session. Review it and fix what the agent got wrong. More in lesson 4.
Useful in-session commands
| Command | What it does |
|---|---|
/help | list commands |
/clear | start with a clean context |
/compact | compress the conversation history |
/model | choose a model |
/resume | return to a previous session |
/permissions | view and change permissions |
To reference a file, start with @: "look at @src/api/orders.ts". The agent then doesn’t spend steps searching.
Your first task
Start with a small task the agent can verify on its own:
Find why test_order_total fails, fix it and run the tests again.
Watch which files the agent reads, which commands it proposes and how it explains changes. It is the fastest way to understand how it thinks.
Common first-session problems
- Wrong folder. The agent doesn’t see the project or sees too much, like your entire home directory.
- A first task that is too big. "Rewrite the backend in Go" without a plan ends in chaos.
- No way to verify. Without tests or a run command, the agent can’t know whether things actually work.
Today's task
Install Claude Code, run it in a real project, run /init and give it one small task with a test. Note what surprised you.