1. Install Claude Code 5 min
Lesson notes
Most developers install Claude Code, open it in their largest repo, and ask it to "clean things up." The session produces a 400-line diff they can't evaluate and they close the tab. The install is not the hard part. Knowing what to look at while Claude runs is.
Two install paths
The CLI and the IDE extension are separate packages. The CLI is the right starting point because every tool call is visible in the terminal. You see what Claude reads, what it proposes to change, and what it executes. That visibility is what makes the first session useful rather than alarming.
npm install -g @anthropic-ai/claude-code
claude --version
# → claude-code/1.x.x darwin-arm64 node-v20.x.x
If claude --version prints nothing, your npm global bin directory is not on PATH. Run npm bin -g to find it, then add that path to your shell profile.
Authenticating
On first run, claude opens a browser window for Anthropic account authentication. Complete the OAuth flow, return to the terminal, and you will see a confirmation line. The token is stored in ~/.config/claude/ — you do not need to handle it manually.
claude
# → Authenticated as yourname@example.com
# → Working directory: /your/project
# → >
Adding the IDE extension
The VS Code extension wraps the same CLI binary. Install it from the Extensions panel by searching "Claude Code," sign in with the same Anthropic account, and the Claude panel appears in the sidebar. The extension adds inline diff previews and a keyboard shortcut for asking Claude about selected code. Install it after you have run one CLI session — you will have context for what the extension is showing you.
Which to use day-to-day
Use the CLI when you want to see every tool call in sequence. Use the extension when you are inside a file and want to ask a quick question about a function without switching windows. They share the same session state.
If you get stuck
npm install -gfails with permissions error: do not usesudo. Instead, configurenpmto use a user-writable global directory.npm config set prefix ~/.npm-globaland add~/.npm-global/bintoPATH.- The browser auth window does not open: run
claude auth loginexplicitly. It prints a URL you can paste manually. claude --versionprints an old version after reinstall: close all terminal tabs and reopen. Shell sessions cache the old binary location.
Deliverable
claude --version prints a version number in your terminal.
Try these prompts
- Write the exact shell command to install Claude Code globally and verify the install.
- My npm global bin directory is not on PATH. Write the commands to find it and add it to my zsh profile.
- Write the Claude CLI command that explicitly opens the browser authentication flow.