Claude Code for Beginners: Build Your First Project

A beginner's Claude Code tutorial: install it on Mac or Windows, sign in, build a simple web page step by step, and learn the commands and habits that matter.

Close-up of colorful Python code on a dark laptop screen
Photo: Chris Ried on Unsplash · Unsplash License

Claude Code is Anthropic’s AI coding agent. Instead of copying code back and forth from a chat window, you run it inside a project folder and describe what you want. It reads your files, writes and edits code, and runs commands, asking your permission as it goes.

This tutorial takes you from nothing installed to a working web page in about 20 minutes. Every command comes from Anthropic’s official Claude Code documentation.

Not sure Claude Code is the right tool? Compare it with Codex and Antigravity CLI in our AI coding agents comparison.

What you need

  • A paid Claude plan (Pro, Max, Team or Enterprise), or a Claude Console account with API credits. Claude Code isn’t included on the Free plan. Pro costs $20 a month, or $17 a month billed annually.
  • A Mac, Windows or Linux computer. Anthropic’s guide says Claude Code needs macOS 13.0 or later, or Windows 10 version 1809 or later.
  • About 20 minutes. No coding experience required.

Prefer to avoid the terminal? The Claude desktop app includes Claude Code in its Code tab, so you can skip Steps 1 and 2. Our guide to installing Claude Desktop covers setup.

Step 1: Open a terminal

  • Mac: press Cmd + Space, type Terminal and press Enter.
  • Windows: press Win + X and choose Windows PowerShell or Terminal. Check the line starts with PS C:\; that means you’re in PowerShell, not CMD.

On Windows, Anthropic recommends installing Git for Windows first (accept the default options), so Claude Code can use the Bash tool. Without it, Claude Code uses PowerShell instead.

Step 2: Install Claude Code

Paste the command for your system and press Enter.

Mac, Linux or WSL:

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

Windows PowerShell:

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

The installer shows no progress while it downloads, so wait until you see “Claude Code successfully installed!” Then open a new terminal window and check it worked:

claude --version

You should see a version number followed by “(Claude Code)”. Homebrew users can run brew install --cask claude-code instead, and Windows users can use winget install Anthropic.ClaudeCode.

If you see “command not found: claude” (or “‘claude’ is not recognized” on Windows), the install folder isn’t on your PATH yet. The installer prints the exact fix at the end under “Setup notes”; run it, then open a new terminal.

Step 3: Create a project folder and sign in

Make a folder for your first project and start Claude Code inside it:

mkdir my-first-site
cd my-first-site
claude

The first time, Claude Code asks you to log in. A browser window opens for you to sign in with your Claude account. Your login is saved, so you won’t need to do this again.

Step 4: Build your first project

Type this and press Enter:

Make me a simple one-page website about my favorite hobby, [your hobby]. Use one HTML file and one CSS file. Make it look clean on a phone. Explain what each file does when you're finished.

Claude Code plans the work and shows you each file it wants to create. When it asks for permission, press Enter to choose Yes. When it’s done, open the folder and double-click the HTML file to see your page in a browser.

Now improve it with follow-up requests:

Add a section with three photos as placeholders and a short caption under each.
Add a dark mode that matches my computer's setting.
Explain the CSS you just wrote as if I'm new to web design.

That last kind of prompt is how you actually learn. Our guide to AI coding for beginners has more prompts that teach rather than just do.

Step 5: Save your work with git

Git keeps a history of your changes so you can undo mistakes. You don’t need to learn the commands; ask Claude:

Set up git for this project and commit my changes with a descriptive message.

Later you can ask “what files have I changed?” or “show me the last 5 commits.” If Claude ever makes a change you don’t like, ask it to go back to the last commit.

Commands every beginner should know

WhereCommand or keyWhat it does
TerminalclaudeStart Claude Code in the current folder
Terminalclaude -cContinue your most recent conversation in this folder
Inside Claude Code/helpShow available commands
Inside Claude Code/clearClear the conversation and start fresh
Inside Claude Code/exit or Ctrl + D twiceLeave Claude Code
Inside Claude CodeEscStop Claude while it’s working
Inside Claude CodeShift + TabSwitch permission mode
Inside Claude CodeType /See the commands and skills you can use

Habits that save you trouble

  • Be specific. Anthropic’s own tip: instead of “fix the bug,” say “fix the login bug where users see a blank screen after entering wrong credentials.”
  • Let it explore first. In an existing project, start with “what does this project do?” before asking for changes.
  • Break big jobs into steps. Ask for one feature at a time and check it works before moving on.
  • Keep permission prompts on until you understand what Claude is doing. Shift + Tab changes the mode, but asking first is safer while you learn.
  • Never paste passwords or API keys into the chat. Keep them in files Claude doesn’t need to read.
  • Add skills later. Skills teach Claude repeat tasks your way. Browse them in our Claude Skill Finder.

What to try next

Once your first page works, try a slightly bigger project: a to-do list that saves items in the browser, a simple budget calculator, or a page that shows your favorite recipes from a list. Ask Claude to plan it first, then build it in steps.

When you’re ready to learn more, Anthropic offers free self-paced courses, including Claude Code 101, on Claude Academy.

Key takeaways

  • Claude Code needs a paid Claude plan or Console API credits; Pro starts at $20 a month.
  • Install it with one command, then run claude inside a project folder and sign in.
  • Describe what you want in plain English, approve each change, and ask it to explain its work.
  • Use git from day one so you can undo any change.

Sources: Claude Code quickstart · Claude Code terminal guide for new users · Claude Code overview · Claude plans and pricing

Frequently asked questions

Do I need to know how to code to use Claude Code?

No. Anthropic's terminal guide says you can use Claude Code even if you've never used a terminal, and that you can describe what you want in plain English. You'll learn faster, and catch mistakes sooner, if you ask Claude to explain each change it makes.

Is Claude Code free?

No. Claude Code needs a paid Claude plan (Pro, Max, Team or Enterprise), a Claude Console account with API credits, or access through a supported cloud provider. Pro costs $20 a month, or $17 a month billed annually.

How do I install Claude Code?

On macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash in a terminal. On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. You can also install with Homebrew or WinGet. Then run claude --version to check it worked.

  • #Claude Code
  • #AI coding
  • #beginner
  • #tutorial
  • #Anthropic
  • #coding agents