Quick Start
Get Claude Code running in 10 easy steps
title: "Quick Start" description: "Get Claude Code running in 10 easy steps" section: "Getting Started" readTime: "11 min" badge: "NEW"
Quick Start: The Developer's Way
Most developers use Claude Code like ChatGPT. Here's the setup that actually works.
You need a Claude Pro, Max, Team, or Enterprise subscription, a Claude Console (API) account, or access through Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry. The free claude.ai plan does not include Claude Code.
Installation
Choose your method:
Native (Recommended) - macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell
irm https://claude.ai/install.ps1 | iexWindows CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdHomebrew / WinGet
brew install --cask claude-code # stable channel; use claude-code@latest for the latest channel
winget install Anthropic.ClaudeCodenpm Alternative (requires Node.js 22+)
npm install -g @anthropic-ai/claude-codeNative installs auto-update in the background. Homebrew, WinGet, and npm installs don't, so upgrade them with your package manager (or run claude update). Never use sudo npm install -g.
On native Windows, install Git for Windows so Claude Code can use Git Bash for its Bash tool. Without it, Claude Code runs shell commands through PowerShell instead.
Step 1: Verify Installation
claude --versionYou should see a version number followed by (Claude Code), for example 2.1.211 (Claude Code).
For a fuller health check (install, settings validation, auto-update status), run:
claude doctorStep 2: Authenticate
Start Claude Code in your project. It prompts you to log in on first use:
cd my-project
claudeFollow the browser prompt to authenticate. You can also sign in from the shell with claude auth login (add --console to bill against an Anthropic Console API account instead of a subscription), check status with claude auth status, or switch accounts inside a session with /login.
Step 3: Initialize Your Project
Inside the running session, run:
/initClaude analyzes your codebase and generates a starting CLAUDE.md with build commands, test instructions, and conventions it discovers. If a CLAUDE.md already exists, /init suggests improvements instead of overwriting it.
There is no claude init shell command. /init is a slash command you run inside a session. Project settings live in .claude/settings.json, which you create when you need it (for example via /permissions, /hooks, or /config).
Step 4: Create Your CLAUDE.md
This is your agent's constitution. Keep it under 200 lines - longer files consume more context and reduce adherence. Move instructions that only matter for part of the codebase into path-scoped rules in .claude/rules/.
## Tech Stack
- Node.js 20+
- TypeScript
- Next.js 15
- Tailwind CSS v4
## Conventions
- Use kebab-case for file names
- Use camelCase for variables/functions
- ESLint runs on pre-commit
## Architecture
- /src/app - Next.js App Router
- /src/components - React components
- /src/lib - Utilities and helpers
## Security
- Never commit .env files
- API keys in environment onlyPut private, per-project preferences in CLAUDE.local.md (and add it to .gitignore). Claude also keeps its own notes across sessions with auto memory - manage both with /memory.
Step 5: Your First Session
claude "Add a login form to the homepage with validation"This starts an interactive session with that prompt as the first message. Claude Code will:
- Read your CLAUDE.md and the files it needs (you don't have to add context manually)
- Ask for permission before actions your current permission mode doesn't allow
- Write the code, and run tests if you ask it to
Claude doesn't commit on its own - ask it to ("commit my changes with a descriptive message") when you're happy with the result.
Step 6: Review the Changes
Check what was changed:
git diffOr run /diff inside the session to review the working-tree changes, including Claude's edits.
Use Shift+Tab to cycle permission modes. The default cycle is Manual (default) → acceptEdits → plan → auto. bypassPermissions only joins the cycle if you start with --dangerously-skip-permissions, --allow-dangerously-skip-permissions, or --permission-mode bypassPermissions. Recent versions start interactive sessions in auto mode by default.
Step 7: Use Plan Mode for Complex Work
Start a session in plan mode:
claude --permission-mode plan "Refactor the authentication module for OAuth2 support"Or, inside a session, press Shift+Tab until the status bar shows plan mode on, or prefix a single prompt with /plan:
/plan refactor the authentication module for OAuth2 supportClaude Code researches and shows its plan first, lets you review, then executes once you approve.
-p is not plan mode. -p / --print runs a single non-interactive query and exits (see Step 10).
Step 8: Parallel Work with /batch
Inside a session, describe one large change:
/batch migrate src/ from JavaScript to TypeScript/batch is a bundled skill. It researches the codebase, splits the work into 5 to 30 independent units, and shows you a plan. Once approved, it spawns one background subagent per unit in an isolated git worktree; each implements its unit, runs tests, and publishes its change. It needs a git repository.
For long-lived collaborating sessions, see Agent Teams.
Step 9: Manage Checkpoints
Claude Code automatically creates a checkpoint before every prompt you send. To go back, press Esc twice (with an empty prompt) or run:
/rewindPick a prompt from the list, then choose Restore code and conversation, Restore conversation, Restore code, Summarize from here, or Summarize up to here. /checkpoint and /undo are aliases of /rewind.
Checkpoints are not git snapshots. They only track edits made by Claude's file-editing tools - changes made by Bash commands (rm, mv, cp), most subagents, or you outside the session are not restored. Keep committing to git for real version history.
Step 10: Advanced: Headless Mode
For CI/CD pipelines and scripts, use print mode (-p), which runs one query and exits:
claude -p "Run the tests and summarize failures" \
--allowedTools "Bash(npm test *)" "Read" \
--output-format json 2>&1 | tee log.txtUseful flags for automation:
| Flag | Purpose |
|---|---|
--allowedTools | Pre-approve specific tools so the run doesn't stop for permission |
--permission-mode dontAsk | Deny anything not pre-approved instead of prompting |
--output-format text|json|stream-json | Machine-readable output |
--max-turns / --max-budget-usd | Cap turns or estimated spend |
--bare | Skip auto-discovery of hooks, skills, plugins, MCP servers, and CLAUDE.md for faster starts |
Only use --dangerously-skip-permissions (equivalent to --permission-mode bypassPermissions) in isolated containers or VMs.
Essential Shortcuts
| Key / Command | What it does |
|---|---|
/ | Show available commands and skills |
Shift+Tab | Cycle permission modes |
Esc Esc | Open the rewind menu (empty prompt) |
↑ | Prompt history |
claude -c | Continue the most recent conversation in this directory |
claude -r | Resume a previous conversation (picker, ID, or name) |
/clear | Start a fresh conversation |
/exit or Ctrl+D twice | Exit Claude Code |
Pre-Session Checklist
Next Steps
- Read Agent Development Kit to unlock advanced features
- Browse Cheatsheet for the commands that matter most
- Check Security for production setup