Install & First Hello
Install the CLI, authenticate, and pair on a real task in five steps.
Install the CLI
Claude Code installs as a single binary via npm. On macOS or Linux, run the install command in your terminal. On Windows, use WSL — the agent expects a POSIX shell.
npm install -g @anthropic-ai/claude-codeVerifyclaude --version prints a version like 2.x.xAuthenticate
Start the agent in any project directory. It opens a browser, you sign in to Anthropic, and the token is written to ~/.config/claude. You only do this once per machine.
claudeVerifyThe agent prompt appears with `>` ready for input.Ask it to read
Start with a read-only task. Reading is safe, free, and forces you to watch the loop without worrying about edits.
Read the package.json and tell me what scripts are defined.VerifyThe agent calls Read on package.json and lists the scripts.Ask it to change one thing
Pick a tiny edit you'd make yourself in 30 seconds — a typo, a renamed variable. Watch the agent's diff before approving.
Rename the variable `foo` to `count` in src/lib/example.ts. Only this file.VerifyThe agent shows a unified diff. You approve or reject.Stop, read, decide
Don't immediately ask for the next thing. Look at the diff. Did it edit only what you asked? Is the change correct? This is the habit the rest of the course rests on.
VerifyYou can answer 'yes I would merge this' or 'no, here's the one sentence to fix it.'