From Zero to Deploy · Module 1 · Lesson 1.4

1.4 Setting up Claude Code from scratch

Install Claude Code, talk to it for the first time, and see an AI-built app running in your browser.

⏱ 15 min

What you’ll do in this lesson

By the end of this lesson you’ll have Claude Code installed, you’ll have made your first request, and you’ll have an AI-built page running in your browser.

What Claude Code is (in 30 seconds)

Claude Code is a coding assistant that runs in your terminal. Unlike a regular chat, it can read the files in your project, create and edit code, and run commands, always asking your permission before it changes anything.

Think of it as a very fast programmer colleague: you explain what you want, it does the work, and you review it. You’re always the one who decides.

Before you start

You’ll need:

  • A computer running macOS, Windows, or Linux
  • Claude Code with a paid Claude plan (Pro or Max) or with Claude Console credits, or one of the other tools from the previous lesson
  • A terminal window

This lesson uses Claude Code. If you picked another tool, choose its tab in the steps below. The site remembers your choice in every lesson.

Step 1: Install

Copy the command for your system, paste it into the terminal, and press Enter. Your system’s tab is already selected.

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

The installer doesn't show progress while it downloads. Wait for it to finish.

Step 2: Check that it worked

Open a new terminal window (important!) and run:

claude --version

If you see a version number followed by (Claude Code), you’re set.

Step 3: Your first session

Create a folder for the project, go into it, and start Claude Code:

mkdir my-first-app
cd my-first-app
claude

What each line does:

  • mkdir my-first-app creates a new folder
  • cd my-first-app moves into that folder
  • claude starts Claude Code inside it

The first time, it asks you to log in. Follow the prompts: your browser opens, you sign in to your account, and you come back to the terminal. After that, you won’t need to log in again. If you’re using credits instead of a plan, choose the Console account at the login screen.

Step 4: Your first request

With Claude Code open (or your tool), copy and send this request:

Create an index.html file with a page that says "Hello, world!" and a button that changes the background color on every click. Use simple HTML, CSS, and JavaScript, with comments explaining the code.

Claude will show you what it plans to do and ask for permission. Read it before you approve. If it makes sense, choose Yes.

To open the page in your browser, ask Claude itself (“open index.html in the browser”) or run this in another terminal in the same folder:

open index.html      # macOS
start index.html     # Windows

Understanding what the AI built

The code Claude wrote should look something like the code below. It won’t be identical: the AI almost never writes exactly the same thing twice. Edit it freely, and the result updates instantly:

Try it

Your first page

Result

Three quick challenges:

  1. Change “Hello, world!” to your name (HTML tab).
  2. Add another color to the colors list (JavaScript tab). Tip: colors are written like this: '#ffb4a2'.
  3. Change the button color (CSS tab, look for background).

If you break something, click Start over. Mistakes cost nothing here.

You’re in charge

Claude Code asks permission before editing files or running commands. At first, approve one step at a time and read what it’s about to do. If something doesn’t make sense, ask before approving: “what does this command do?”.

Useful commands to keep handy:

Command Where What it does
claude Terminal Starts Claude Code in the current folder
claude -c Terminal Continues the last conversation in that folder
/help Inside Claude Shows the available commands
/clear Inside Claude Clears the conversation and starts fresh
/exit Inside Claude Exits Claude Code
Task

Now on your machine

0 of 6 done

Checkpoint

Check what you learned

  1. What can Claude Code do that a regular chat can't?

  2. You installed it and the terminal says "command not found: claude". What do you try first?

  3. Claude showed you a change you don't understand. What do you do?

Finished the lesson?

Mark it complete to track your progress.