Learn Claude Code
in 6 easy lessons

Never written a line of code? No problem. This guide will walk you through Claude Code — Anthropic's AI coding tool — one simple step at a time.

Lesson 1 of 6
1

What is Claude Code?

Understanding the tool before you use it

Claude Code is an AI assistant made by Anthropic that lives in your computer's terminal (a text-based window where you type commands). Instead of clicking buttons, you just talk to it in plain English and it writes, edits, or explains code for you.

💡 Think of it like this: Imagine having a super-smart coding friend sitting next to you. You say "build me a to-do list app" and they just… do it. That's Claude Code.

Here's what Claude Code can do for you:

  • Write entire programs from scratch based on your description
  • Fix bugs in existing code you paste to it
  • Explain what any piece of code does, in plain English
  • Read files on your computer and make changes to them
  • Run shell commands on your behalf
⚠️ Heads up: Claude Code runs in your terminal and can read and modify files. Always review what it plans to do before saying "yes."
2

Installing Claude Code

Getting it onto your computer — takes about 5 minutes

Before you can use Claude Code, you need to install two things: Node.js (a tool that lets your computer run JavaScript programs) and then Claude Code itself.

Step 1 — Install Node.js

Go to nodejs.org and download the version marked "LTS" (Long Term Support). Run the installer just like any other app.

Step 2 — Open your Terminal

  • Mac: Press ⌘ + Space, type "Terminal", hit Enter
  • Windows: Press the Windows key, type "PowerShell", hit Enter

Step 3 — Install Claude Code

Type this into your terminal and press Enter:

📋 Terminal — paste this exactly
$ npm install -g @anthropic-ai/claude-code
💡 What does this mean? npm is Node's package manager — it downloads and installs programs. install -g means "install globally" (so it works from anywhere). @anthropic-ai/claude-code is the name of the program.

Step 4 — Verify it worked

Type this and press Enter:

$ claude --version

If you see a version number (like 1.x.x), you're all set!

✅ You'll also need an Anthropic account. When you first run Claude Code, it will ask you to log in at claude.ai. Sign up there if you haven't already.
3

Starting Claude Code

How to open it and what you'll see

To start Claude Code, open your terminal, navigate to a folder you want to work in, and type:

$ claude

That's it! Just the word claude. You'll see a welcome screen and a prompt where you can start talking to it.

💡 Where you run it matters. Claude Code can see and edit files in whatever folder your terminal is currently in. To work on a project, navigate to that project's folder first.

Navigating to a folder

Use the cd command ("change directory") to move around:

$ cd Desktop          # go to your Desktop
$ cd my-project       # go into a folder called my-project
$ cd ..               # go back up one level
🎯 Try it

Open your terminal, type claude, and press Enter. Once you see the Claude Code prompt, type: "Hello! What can you help me with?" — just like a text message.

To exit Claude Code at any time, type /exit and press Enter, or press Ctrl + C.

4

Basic Commands to Know

The most useful things you can type

Inside Claude Code, you can do two kinds of things: chat naturally (just type what you want) or use slash commands (special shortcuts that start with /).

Slash Commands — Quick Reference

/help

Shows a list of all available commands. Great when you're stuck.

/clear

Clears the current conversation and starts fresh. Like a clean slate.

/exit

Closes Claude Code and returns you to the normal terminal.

/compact

Summarizes the conversation to free up memory during long sessions.

/status

Shows info about your current session — what model, usage, etc.

/vim

Switches to a vim-style editor mode for more advanced text editing.

You can also start Claude Code directly with a question using the -p flag, without entering the interactive mode:

$ claude -p "What does this error mean: Cannot read properties of undefined"
💡 Pro tip: The -p flag ("print") is great when you just have a quick question. Claude answers and you're back at the terminal immediately.
5

How to Ask Claude for Help

Getting better answers with better questions

Claude Code is smart, but the clearer you are, the better results you'll get. Here are the most important things to know:

✅ Be specific about what you want

❌ Too vague
Make a website
✅ Much better
Create a single HTML file for a personal portfolio page.
It should have my name at the top, a short bio section,
and a list of 3 projects with links. Keep it simple and clean.

✅ Tell it the language or tool if you know it

If you want Python, say "in Python." If you want it to use React, say so. If you don't know, just say "whatever's simplest."

✅ Ask follow-up questions

You don't have to get it right in one message. Say things like:

"Can you make the button blue instead?"
"Add a search bar to the top."
"Explain what that last piece of code does."
"That didn't work — here's the error: ..."
🎯 Try it

Start Claude Code and ask it: "Create a simple Python script that asks me for my name and then says hello to me." Watch it write the whole thing for you!

⚠️ Always review before confirming. When Claude wants to create or edit files, it will ask for your permission. Take a second to read what it plans to do before saying yes.
6

Your First Real Project

Build something from scratch with Claude Code

Let's put it all together. Follow these steps to build a real, working app with Claude Code — even if you've never written code before.

Step 1 — Create a project folder

$ mkdir my-first-app   # creates a new folder
$ cd my-first-app      # moves into that folder
$ claude               # starts Claude Code

Step 2 — Ask Claude to build something

Try one of these beginner-friendly prompts:

"Build a simple to-do list app using HTML, CSS, and JavaScript.
It should let me type a task, press Enter to add it, and click
a task to mark it as done. Save everything in one file called index.html."

Step 3 — Review and approve

Claude will show you what it plans to create. Read through it and type yes (or press Enter) to let it proceed.

Step 4 — Open your app!

Once Claude is done, open the index.html file in your browser — just double-click it in Finder or File Explorer. You built an app!

🎉 You're a developer now. Seriously. The hard part isn't writing code anymore — it's knowing what to build and how to ask for it. You just did both.

What to try next:

  • Ask Claude to "add a way to delete tasks" to your to-do app
  • Ask "explain what each part of this code does"
  • Try building something of your own — describe any small tool you wish you had
  • Read the official docs at docs.claude.ai
🏆

You finished the course!

You now know how to install Claude Code, navigate the terminal, use basic commands, write good prompts, and build your first app. That's huge.

Quick reference — commands to remember:
claude — start Claude Code
claude -p "question" — quick one-off question
/help — see all commands
/clear — start fresh
/exit — quit