Phase 1: install + auth (Max plan vs API key)
Installation is one line: `npm install -g @anthropic-ai/claude-code` or via Homebrew (`brew install claude-code`). After install, `claude --version` confirms the binary is on your path.
**Auth decision: Max plan vs API key.** The Claude Max plan ($100/mo for ~5x Pro limits, $200/mo for ~20x) bundles Claude Code usage into your subscription — no per-token billing, no surprise invoice. The API-key path bills per-token at standard rates ($3/$15 per 1M for Sonnet, $15/$75 for Opus) directly to your Anthropic console account.
**When Max wins:** heavy daily users. The crossover is around $30-50/mo of equivalent API spend — anything above that, Max's flat fee comes out ahead. Most production Claude Code users land at $200/mo Max equivalent in API spend within 30-60 days of adoption.
**When API key wins:** very light users (a few hours per week of Claude Code), users who want exact per-task cost visibility, teams that need to chargeback usage to specific projects (API spend can be tagged per request).
**Auth flow.** For Max plan: `claude` (without args), follow the OAuth flow in browser, you're authenticated. For API key: `export ANTHROPIC_API_KEY=sk-ant-...` in your shell rc; Claude Code picks it up automatically.
**Workspace setup.** Claude Code respects your working directory — `cd` to your project, run `claude`, the session starts scoped to that directory. Claude Code reads CLAUDE.md / AGENTS.md from the working directory on session start (more on this in Phase 2). For multi-repo work, run `claude` from a parent directory that contains all the repos.
**Pre-flight sanity check:** in a project, type `claude` then ask 'list the top-level directories.' Claude should run `ls` and report. If it doesn't (or asks for permission you can't grant), check shell permissions and `claude doctor` for diagnostics.