Claude Code: Beginner
Claude Code is Anthropic’s agentic coding assistant that runs in your terminal. It reads and edits files in your project, runs commands, and works through multi-step tasks, all from a chat prompt. This guide gets you from zero to a productive first session.
What you need
Section titled “What you need”- A terminal (macOS Terminal, iTerm, Windows Terminal, or any Linux shell)
- A Claude account (Pro/Max subscription or an Anthropic API key)
- Node.js 22+ only if you install via npm (
node --versionto check); the native installer needs nothing
Install
Section titled “Install”-
Install the CLI:
Terminal window curl -fsSL https://claude.ai/install.sh | bashTerminal window npm install -g @anthropic-ai/claude-codeTerminal window brew install --cask claude-codeThese commands are current as of mid-2026; if one fails, check the official setup guide rather than fighting it.
-
Go to a project you want to work on and start it:
Terminal window cd my-projectclaude -
On first run, follow the login prompt to authenticate with your Claude account.
Your first session
Section titled “Your first session”Once Claude Code is running, just talk to it in plain English. A few good first prompts:
What does this project do? Give me a short overview.Find where the homepage title is set and change it to "Hello".Claude will explore the files, show you what it plans to change, and ask for approval before editing or running commands. That explore-propose-approve loop is the agentic loop (see How AI coding tools work).
The commands you’ll actually use
Section titled “The commands you’ll actually use”| Command | What it does |
|---|---|
/help | List all available commands |
/clear | Start a fresh conversation (clears the context window) |
/rewind (or Esc twice) | Roll back to a checkpoint: code, conversation, or both |
Esc | Stop Claude mid-action |
!<command> | Run a shell command yourself, output goes into the chat |
Three habits that make it work
Section titled “Three habits that make it work”- Be specific. “Fix the bug” is weak. “The login form doesn’t show errors when the password is wrong. Fix it.” gives Claude something to work with.
- Work in small steps. Ask for one change, check it, then continue. Don’t request a whole feature in one prompt yet.
- Use
/clearbetween unrelated tasks. A focused conversation produces better results than one giant thread.
You’re done when…
Section titled “You’re done when…”- ✅ You can start Claude Code in a project
- ✅ You’ve made and approved at least one file change
- ✅ You know how to rewind a change and how to clear context
Next step
Section titled “Next step”Ready for real workflows: context files, planning, and iterating on bigger changes?