Getting Started with Claude Code
Install the CLI, write a CLAUDE.md that actually helps, and learn the small-steps working pattern that keeps an AI agent productive and safe.
Quick answer
Install with npm install -g @anthropic-ai/claude-code, run claude inside your project, and create a CLAUDE.md file so the agent knows your stack and rules. Work in small reviewed steps and let it run your tests after each change.
Claude Code is a coding agent that runs in your terminal. You describe a task in plain language, it reads your codebase, plans, edits files and runs commands, asking for permission along the way. This guide takes you from install to a productive first session.
Install and sign in
You need Node.js 18 or newer. Install the CLI globally, then start it inside a project directory:
npm install -g @anthropic-ai/claude-code
cd your-project
claude
On first run you sign in with a Claude account. A paid plan or API billing is required; check the current options on the official pricing page rather than a blog post, because plans change.
Give it project memory with CLAUDE.md
At session start, Claude Code reads a file called CLAUDE.md from your repository root. This is where you put the stack, the build commands and your house rules. Run /init in a session and it will draft one for you by scanning the project. A good memory file is the single highest-leverage setup step: it saves you from repeating the same context every session. You can generate a structured one with our CLAUDE.md generator, or start from the annotated template.
Work in small, reviewable steps
Treat the agent like a fast pair programmer, not a vending machine. The pattern that works:
- Describe one task, with file names if you know them. "Add rate limiting to POST /api/subscribe, 6 requests per minute" beats "improve security".
- Review the plan. For bigger changes, press Shift+Tab to enter plan mode, where Claude proposes an approach before touching files.
- Let it verify. Ask it to run the test suite after the change. Agents that check their own work produce far fewer regressions.
- Commit often. Small commits make it trivial to roll back a step that went sideways.
Permissions are your safety rail
By default Claude Code asks before editing files or running commands. Resist the urge to auto-approve everything on day one. Approve categories gradually as you build trust, and keep destructive commands (migrations against real data, force pushes) on manual approval permanently.
Connect your tools with MCP
Model Context Protocol servers let the agent talk to things outside the repo: databases, issue trackers, browsers. Start without any, then add servers when you feel the friction. Configuration lives in your project so the whole team shares it.
Where it fits next to an AI editor
Claude Code shines at multi-file tasks, refactors and anything you can express as an outcome. Editor-based tools shine at line-level autocomplete while you type. Many developers run both; our Claude Code vs Cursor comparison breaks down which tool earns which job. When you are ready to build something real with it, pick a project from the AI SaaS starter blueprint and follow the idea-to-production workflow.
FAQ
Do I need an API key to use Claude Code?
What should go into CLAUDE.md first?
Is it safe to let the agent run commands?
Sources
- Claude Code overview, Anthropic
- Claude Code quickstart, Anthropic
- Model Context Protocol documentation, MCP project