Claude Code: From Zero to Productive in 20 Minutes
Claude Code is Anthropicโs official CLI for AI-assisted development. It runs in your terminal, reads your repo, and can edit files + run commands.
Install
npm install -g @anthropic-ai/claude-code
# Or: brew install claude-code
# Authenticate
claude login
Core concepts
| Concept | What it does |
|---|---|
claude (no args) | Interactive REPL |
claude -p "..." | One-shot prompt (non-interactive) |
claude "fix the bug in auth.ts" | Repo-aware task |
/command | Slash commands inside REPL |
Your first session
cd ~/projects/my-app
claude
> /help
> read package.json and explain what this app does
> find all TODO comments in src/
> refactor the validateEmail function to use zod
The CLAUDE.md pattern
Drop a CLAUDE.md in your project root:
# Project: MyApp
- Stack: Next.js 15 + Postgres + Clerk auth
- Conventions:
- Use Server Actions, not API routes
- All forms use react-hook-form
- Never commit to main directly
- Test command: npm test
- Deploy: vercel --prod
Claude reads this on every session. This is the highest-leverage thing you can do.
Key shortcuts
claude --continueโ resume last sessionclaude --resumeโ pick from historyclaude "add tests for X"โ task with file context/clearโ reset context window
Key takeaways
- CLAUDE.md is your secret weapon
- Always run from project root (it indexes the repo)
- Use
--print(-p) for non-interactive scripting