Getting started
From install to your first real task in under fifteen minutes. This page walks through the whole thing.
1. Install it
Claude Code is a command-line tool installed via npm or Homebrew. Pick whichever you already have.
You need Node.js 18 or later for the npm install. If you do not have Node, install it first from nodejs.org.
2. Authenticate
The first time you run claude, it will ask you to log in. This links Claude Code to your Anthropic account (the same account you use for claude.ai).
Claude reads the current directory on startup and gives you a quick orientation. If you are in a git repo, it knows. If there is a package.json, a requirements.txt, or a Cargo.toml, it reads them.
3. Your first real task
Do not start with something theoretical. Start with something you were actually going to do today. Here is a full worked example: adding a simple health check endpoint to an Express app.
Notice three things. First, Claude read the existing code before writing anything, to match your patterns. Second, it asked for permission before each file change (the [Y/n/explain] prompts). Third, it ran the tests after making changes and confirmed they passed. This is the shape of a healthy Claude Code interaction.
4. Understanding the permission prompts
Every time Claude wants to do something that changes your system (editing a file, creating a file, running a command), it asks for permission. You have four options at each prompt:
Yes. Allow this specific action. The default. Press Enter or type Y.
No. Block this action. Claude will try a different approach or ask you what to do instead.
Explain. Claude explains what it is about to do and why, without doing it. Useful when you are not sure whether to allow.
Change mode. Press Shift+Tab to cycle through permission modes: default, acceptEdits, plan, and auto. Each mode changes what gets auto-approved.
Start in the default mode (reads auto-approved, everything else asks). Once you are comfortable with the interaction, switch to acceptEdits mode, which auto-approves file changes. See the workflow page for when to use each mode.
5. Create your first CLAUDE.md
A CLAUDE.md file gives Claude persistent instructions about your project. Without it, Claude guesses your conventions anew every session. With it, Claude starts every session already knowing your stack, your style, and your preferences.
A starter CLAUDE.md to copy
Create this file at the root of your project. Tweak it to match your actual setup.
Keep it short. Under 200 lines is the target. If you find yourself repeating an instruction in conversations, add it to CLAUDE.md and you will never type it again. The configuration page goes much deeper on this.
The five-minute first-session checklist
Navigate to your project directory in the terminal. Claude Code works in whichever folder you launch it from.
Run claude and let it read the project. Watch the orientation message to confirm it understands the stack.
Start with a real task, not a test. Something you were going to do anyway. A bug fix, a small feature, a file rename. Real work builds intuition faster than experiments.
Read every permission prompt. For your first few sessions, approve each one individually. Understand what Claude is doing before you trust it to do it faster.
Create a CLAUDE.md after the session. Write down the two or three things you had to tell Claude that it should have already known. Save it at the project root. Next session starts with that context loaded.
Common first-session stumbles
Claude makes a change you did not expect
Press Esc to stop it mid-action. Type /rewind to undo the last step. Type /clear to reset the conversation and start again with a clearer prompt. Git is your safety net: if the working tree is clean before you start, you can always git checkout . to revert everything Claude did.
Claude suggests running a command you don't recognise
Type e (explain) at the permission prompt. Claude will explain what the command does and why it wants to run it. If you are still not sure, type n to block it and ask Claude to try a different approach.
Claude doesn't know about your project's conventions
This is normal on the first session without a CLAUDE.md. Tell Claude the convention in the chat ("we use 2-space indentation" or "tests go in __tests__ directories"), and then add it to CLAUDE.md afterwards so the next session starts knowing.
That is the whole first session. Install, authenticate, do one real task, read the permission prompts, create a CLAUDE.md. Everything after this is about getting faster and more confident.
Next: The workflow covers the Explore, Plan, Implement, Commit cycle that makes Claude Code sessions consistently productive. Or go back to the Claude Code overview.