AI Coding

Claude Code Tutorial for Beginners: Your First Project

Most people open Claude Code for the first time, type “build me an app,” and get a wall of files they don’t understand. That’s the wrong first project. This Claude Code tutorial for beginners walks you through one small, finished thing instead: a tip calculator web page, built from an empty folder, with a plan you approve before any code gets written.

Every command below comes from Anthropic’s own docs, checked on November 16, 2026. We also confirmed the flags on Claude Code 2.1.309 on a Windows PC with claude --help. We didn’t run the tip calculator build for this article, so what Claude writes for you will differ in the details.

Quick answer: Install Claude Code with one command (irm https://claude.ai/install.ps1 | iex on Windows PowerShell, curl -fsSL https://claude.ai/install.sh | bash on macOS or Linux), open a terminal in a project folder, type claude and sign in. You need a paid Claude plan (Pro from $20 a month) or a Console account. Ask for a plan first, then let it build.

  • The free Claude plan doesn’t include Claude Code. Pro, Max, Ultra, Team, Enterprise or Console does.
  • The native installer doesn’t need Node.js and updates itself in the background.
  • New versions start in auto mode, so actions can run without asking. Press Shift+Tab to change that.
  • Run git init before your first prompt. Checkpoints don’t undo everything.

What Claude Code is (in one minute)

Claude Code is Anthropic’s coding agent. You talk to it in plain English, and it reads your project, edits files and runs commands in your terminal. It isn’t a chat window you copy code out of. It works directly on the files in the folder where you start it.

The same agent also runs in VS Code, JetBrains IDEs, a desktop app and on the web, according to the official quickstart. This guide sticks to the terminal because that’s where the docs start, and everything you learn carries over to the other versions.

Trying to decide between Claude Code and its rivals first? Our Claude Code vs Codex vs GitHub Copilot comparison covers prices, limits and which one fits which kind of work.

What you need before you start

Three things: a terminal, a folder to work in, and an account that includes Claude Code. That last one trips people up. Anthropic’s setup page says it plainly: “The free claude.ai plan does not include Claude Code access.”

PlanPriceClaude Code?
Free$0No
Pro$20/month ($17/month billed yearly)Yes
Max$100/monthYes
Ultra$200/monthYes
Team$25/seat standard, $125/seat premium (monthly)Yes
Console (API)Prepaid credits, pay per tokenYes

Prices are from claude.com/pricing on November 16, 2026. For a first project, Pro is enough. Don’t buy Max until you’ve actually hit Pro’s limits, which you can watch with the /usage command once you’re inside a session.

System requirements are modest: macOS 13 or later, Windows 10 version 1809 or later, Ubuntu 20.04+, Debian 10+ or Alpine 3.19+, plus 4 GB of RAM and an internet connection.

Claude Code tutorial step by step: install, git init, start, plan, build, init, commit

Step 1: Install Claude Code

Pick the line for your system. On Windows, look at your prompt first: PS C:\ means PowerShell, plain C:\ means CMD. Using the wrong one is the most common install error.

macOS, Linux or WSL

curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell

irm https://claude.ai/install.ps1 | iex

Windows CMD

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

The installer shows no progress bar, so give it a minute. Then open a new terminal window and check it worked:

claude --version

You should see a version number followed by “(Claude Code)”. On our machine it printed 2.1.309 (Claude Code). If the shell says claude isn’t recognized, the install folder isn’t on your PATH yet, and the docs have a troubleshooting page for exactly that.

Claude Code install commands for macOS, Linux and Windows

Prefer a package manager? brew install --cask claude-code on a Mac or winget install Anthropic.ClaudeCode on Windows both work, but neither updates itself. You’ll have to run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode now and then. There’s an npm package too (it wants Node.js 22 or later), but the native installer is the one Anthropic recommends.

Windows users: installing Git for Windows is optional but worth it. With it, Claude Code uses Git Bash for shell commands. Without it, it falls back to PowerShell. You’ll want Git for the next step anyway.

Step 2: Make a folder and a safety net

Create an empty folder for the project and turn it into a Git repository before Claude touches anything:

mkdir tip-calculator
cd tip-calculator
git init

Why bother with Git on a ten-minute project? Because Claude Code’s built-in undo has gaps, and Git doesn’t. More on that in step 7.

One more tip from the docs. Don’t start Claude Code in your home directory. It asks whether you trust a folder the first time you open it there, and in the home directory that answer is never saved, so the prompt comes back every launch. A project folder remembers it.

Step 3: Start your first session

Inside the folder, type:

claude

The first time, it asks you to log in. Your browser opens, you sign in with your Claude account, and you’re sent back to the terminal. You only do this once. Then you’ll see the workspace trust dialog for the new folder. Say yes, since it’s your own empty project.

Above the prompt, Claude Code shows its version, the current model and your working directory. On Pro, Max, Ultra, Team and Console accounts, the default model is Claude Opus 5.5, per the model configuration docs. You can switch with /model, for example to Sonnet 5.5 for lighter work or Fable 5.2 for the hardest jobs (on Pro, the pricing page says Fable runs on usage credits). For a tip calculator, the default is fine. If the model names are new to you, every Claude model explained sorts them out.

Step 4: Ask for a plan first

This is the habit that separates a clean first project from a messy one. Plan mode makes Claude read, think and write a plan, with edits blocked until you approve it. Press Shift+Tab until the status bar shows “plan mode on,” or just start your message with /plan:

/plan Build a tip calculator as a single index.html file with inline CSS and JavaScript.
Inputs: bill amount, tip percentage (buttons for 10, 15, 20 and a custom field), number of people.
Show tip per person and total per person, updating as I type.
Reject negative numbers and empty fields with a short message. No frameworks, no build step.

Notice how specific that is. The docs’ first beginner tip is “be specific with your requests,” and it matters more than which model you pick. A vague prompt gets you a guess. A clear one gets you the thing you pictured.

Read the plan it gives back. Does it mention one file? Does it handle the empty-field case? If something’s off, say so and it’ll revise. When you’re happy, you get three choices: approve and use auto mode, approve and confirm each edit by hand, or keep planning. For your first project, pick the manual option. You’ll learn more by watching each change go in.

Step 5: Build it, then test it yourself

Once approved, Claude writes index.html. In manual mode it shows each edit and waits for a yes. Open the file in your browser (double-click works) and try to break it. Type a negative bill. Leave people at zero. Hit custom tip and type letters.

Found a problem? Describe what you saw, not how to fix it:

When people is 0 the page shows "Infinity" for the total per person.
It should show a message asking for at least 1 person instead.

That pattern (what you did, what happened, what you expected) works for bugs in much bigger projects too. Our guide on how to fix bugs with AI goes further with it.

Step 6: Save your rules with /init

Every session starts with a blank memory. A CLAUDE.md file fixes that: it’s a plain text file of project instructions Claude reads at the start of each session. Run:

/init

According to the memory docs, /init looks at your code and writes a starting CLAUDE.md with build commands, test steps and conventions it finds. On a one-file project it’ll be short, so add the rules it can’t guess, like “keep everything in one HTML file” or “no external libraries.” Anthropic suggests keeping each CLAUDE.md under 200 lines. Longer files eat context and get followed less reliably.

Step 7: Commit, or rewind

If the calculator works, ask Claude to save it:

commit my changes with a descriptive message

If something went badly wrong, press Esc twice with an empty prompt, or type /rewind. You can restore the code, the conversation or both to any earlier prompt. The checkpointing docs are honest about the limits, though. Files changed only by shell commands aren’t tracked, and edits made by subagents usually aren’t either. Anthropic’s own advice is to keep using Git. That’s why step 2 exists.

The thing most tutorials get wrong now: many guides still say Claude Code “asks before every change.” That was true in older versions. Since version 2.1.283, interactive terminal and VS Code sessions start in auto mode, where a separate classifier model approves or blocks actions instead of you, according to the permission modes page. It’s convenient, and the classifier does block risky actions. But as a beginner you won’t see much of what’s happening. Press Shift+Tab to cycle to manual mode (the status bar reads “manual mode on”), or start with claude --permission-mode manual. Switch back to auto once you know what normal looks like.

Claude Code commands cheat sheet

CommandWhereWhat it does
claudeTerminalStart a session in this folder
claude -cTerminalContinue the last conversation here
claude -p "query"TerminalAnswer once and exit
/planSessionEnter plan mode, edits blocked
/initSessionCreate a starting CLAUDE.md
/modelSessionSwitch model and effort level
/rewindSessionUndo code or conversation
/clearSessionStart a fresh conversation
/usageSessionCost and plan limits
Shift+TabSessionCycle permission modes

Type / on its own to see every command available to you. The full list lives in Anthropic’s commands reference.

Claude Code tutorial: common errors and fixes

  • “The token ‘&&’ is not a valid statement separator.” You pasted the CMD command into PowerShell. Use the irm line instead.
  • “‘irm’ is not recognized.” The opposite: you’re in CMD. Use the curl line for CMD.
  • claude not found after install. Close the terminal and open a new one. Still missing? It’s a PATH issue, covered in the troubleshooting docs.
  • Login works but nothing happens. Check your plan. A free account can sign in to Claude but can’t use Claude Code.
  • Answers get worse in a long session. The context is full of old back-and-forth. Run /clear for a new task, or /compact to summarize and keep going.
  • Something’s wrong and you’re not sure what. Run claude doctor in your shell. It checks the install and settings without starting a session.

Verdict: who should start with Claude Code

If you already pay for Claude Pro, start today. You’ve paid for it, the install takes a couple of minutes, and a tip calculator is a safe way to learn how plan mode, permissions and rewind fit together.

If you don’t pay for anything yet and only want to try AI coding, hold off on the $20. GitHub Copilot Free and Codex on ChatGPT Free cost nothing to test. Come back to Claude Code when you want an agent that works across a whole project from the terminal.

And if you’ve never used a terminal, that’s fine. Anthropic has a terminal guide for complete beginners, and the desktop app runs Claude Code without one.

Next: once your first project is done, read how Claude Code stacks up against Codex and GitHub Copilot to see whether it’s the agent you want to stick with.

FAQ

Can I use Claude Code for free?

Installing it is free, but using it isn’t. The free Claude plan doesn’t include Claude Code. You need Pro ($20 a month), Max, Ultra, Team, Enterprise, a Console account with prepaid credits, or access through Amazon Bedrock, Google Cloud or Microsoft Foundry.

Does Claude Code need Node.js?

Not with the native installer, Homebrew or WinGet. Only the npm install route needs Node.js 22 or later, and even then the installed binary doesn’t use Node when it runs.

Can I use Claude Code on Windows without WSL?

Yes. It runs natively on Windows 10 (1809+) from PowerShell or CMD, no administrator rights needed. WSL 2 is only required if you want sandboxed command execution.

How do I use Claude Code step by step on an existing project?

Same steps, different first prompt. Open a terminal in the project, run claude, and start with a question like “what does this project do?” before asking for changes. Let it explore first, then use plan mode for anything bigger than a one-line fix.

Leave a Comment