Claude Code is an AI coding agent that lives in your terminal. You tell it what you want in plain English, and it reads your project, proposes changes and, with your permission, makes them. This guide takes you from nothing installed to your first real edit.
You don't need to be a developer. If you can copy and paste commands and read what comes back, you can follow along.
Before you start
You need three things:
- A computer running macOS 13+, Windows 10 (1809+) or a recent Linux such as Ubuntu 20.04+. Anthropic's setup page also asks for at least 4 GB of RAM and an internet connection.
- A way to pay for Claude Code. It requires a Claude Pro, Max, Ultra, Team or Enterprise plan, or a Claude Console account (API access with pre-paid credits). Anthropic's docs are explicit that the free claude.ai plan does not include Claude Code. Check Anthropic's pricing page for current prices.
- A project folder to practise in. Any folder will do. If you don't have one, we'll make a throwaway one below.
What's a terminal? It's a window where you type commands instead of clicking. On macOS it's the Terminal app. On Windows, use PowerShell. On Linux, it's usually called Terminal too. Everything in this guide that looks like this is something you type, followed by Enter.
Step 1: Install Claude Code
Anthropic recommends the native installer. Pick the line for your system.
macOS, Linux or Windows Subsystem for Linux (WSL):
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
The native installer keeps itself up to date in the background.
Prefer a package manager? These also work:
# macOS (Homebrew) brew install --cask claude-code # Windows (WinGet) winget install Anthropic.ClaudeCode # Any system with Node.js 22 or later npm install -g @anthropic-ai/claude-code
Homebrew and WinGet installs don't auto-update, so you'll need to upgrade them yourself now and then. If you use npm, don't prefix the command with sudo.
On native Windows, Anthropic recommends also installing Git for Windows so Claude Code's shell tool works properly.
Check it worked
Close and reopen your terminal, then run:
claude --version
If you see a version number, you're set. If you get "command not found", try claude doctor once the install finishes, or open a fresh terminal window so your computer picks up the new command.
Step 2: Make a practice project
Let's create a safe sandbox so nothing important is at risk.
mkdir claude-practice cd claude-practice
mkdir makes a folder, and cd moves you into it. Now add a tiny file for Claude to work with:
echo "<h1>Hello</h1>" > index.html
You now have a folder with one very small web page in it.
Step 3: Start Claude Code and sign in
From inside your project folder, run:
claude
The first time you start it, Claude Code asks you to log in. Follow the prompts. It opens your browser so you can sign in with your Claude account (or choose the Console option if you're using API credits). Once you're signed in, return to the terminal.
You'll see a prompt where you can type messages. This is a conversation: you ask, Claude answers or acts.
Claude Code reads and edits files in the folder you launched it from. That's why we
cdinto the project first. Always start it from the folder you want it to work in.
Step 4: Ask it a question first
Before changing anything, ask something harmless so you can see how it behaves:
What files are in this project, and what does index.html do?
Claude will look at the folder and answer in plain English. Notice that it read the file to answer. For read-only requests like this, it typically doesn't need to ask you anything.
Step 5: Make your first change
Now ask for a small edit:
Make index.html a proper web page: add a title, a short paragraph about my favourite hobby, and some simple styling. Keep it in one file.
Claude will work out a plan and then propose to edit index.html. When it wants to change a file or run a command, it asks permission and shows you what it plans to do. Read what it's proposing, then approve it.
Open index.html in your browser (double-click the file) and see what it made. Then ask for tweaks in the same conversation:
Make the heading blue and centre everything on the page.
This back-and-forth is the core of working with Claude Code. Start small, check the result, and refine.
Step 6: Learn the handful of commands that matter
Inside Claude Code, anything starting with / is a command. These are the ones to know first:
| Command | What it does |
|---|---|
/help | Lists available commands |
/clear | Clears the conversation history so you can start a fresh task |
/memory | Shows and lets you edit the files Claude uses to remember your project |
/mcp | Shows connected MCP servers and handles sign-in for them |
/init | Creates a CLAUDE.md file describing your project (see our CLAUDE.md guide) |
You can also press Shift+Tab to cycle through permission modes, which control how much Claude can do before it asks you. Stay on the default while you're learning.
To leave Claude Code, press Ctrl+C twice, or type /exit.
Step 7: Use it on a real project
Once you're comfortable, move to a real project:
cd path/to/your/project claude
Good first requests on a real project:
- "Explain how this project is organised and how I run it."
- "Find where the contact form is handled and tell me how it works."
- "Add a footer link to the privacy page."
Notice that the first two only read. That's a gentle way to learn a codebase you didn't write.
Habits that keep you safe
- Use version control. If your project uses Git, commit before you ask for big changes so you can always undo. Our guide to the git safety net shows how.
- Read before you approve. The permission prompts are there for a reason, especially for commands that delete or install things.
- Ask for one thing at a time. Small requests are easier to check and undo than one huge one.
- Be specific. "Make the header sticky on scroll and keep the logo on the left" beats "fix the header".
- Never paste secrets like passwords or API keys into the chat.
Troubleshooting
"command not found: claude". Open a new terminal window. If that fails, run the install command again, then claude doctor.
Login loop or browser doesn't open. Copy the sign-in link from the terminal and paste it into your browser manually.
"Claude Code requires a paid plan". The free claude.ai plan doesn't include Claude Code. You need Pro, Max, Ultra, Team, Enterprise or a Console account.
It made a change you didn't want. If you're using Git, run git status to see what changed and git restore <file> to undo it. Without Git, ask Claude to revert the change it made.
Where to go next
- Teach Claude about your project with a CLAUDE.md file.
- Package a repeatable task as a skill.
- Plug in outside tools with MCP servers.
You've now installed an AI agent, signed in, and had it edit a real file. That's the whole loop. Everything else is variations on it.