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.
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 | bashThe installer doesn't show progress while it downloads. Wait for it to finish.
Codex needs ChatGPT Plus or a higher plan (or an OpenAI API key). Copy the command for your system, paste it into the terminal, and press Enter.
curl -fsSL https://chatgpt.com/codex/install.sh | shCopilot CLI works with the free Copilot plan. You need a GitHub account: create one at github.com if you don’t have it yet. Then copy the command for your system, paste it into the terminal, and press Enter.
curl -fsSL https://gh.io/copilot-install | bashCursor is an editor, so you install it like any app: download it from cursor.com, install it with the default options, and open it. It’s based on VS Code, so it will look familiar if you’ve seen VS Code before.
Step 2: Check that it worked
Open a new terminal window (important!) and run:
claude --versionIf you see a version number followed by (Claude Code), you’re set.
Open a new terminal window (important!) and run:
codex --versionIf you see a version number, you’re set.
Open a new terminal window (important!) and run:
copilot helpIf you see the list of options, you’re set.
If Cursor opened, you’re set. It asks a few questions the first time (theme, keyboard shortcuts): the defaults are fine.
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
claudeWhat each line does:
mkdir my-first-appcreates a new foldercd my-first-appmoves into that folderclaudestarts 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.
Create a folder for the project, go into it, and start Codex:
mkdir my-first-app
cd my-first-app
codexThe first time, choose Sign in with ChatGPT: your browser opens, you sign in, and you come back to the terminal.
Create a folder for the project, go into it, and start Copilot CLI:
mkdir my-first-app
cd my-first-app
copilotThe first time, if it says you’re not logged in, type /login and follow the steps: you sign in to GitHub in the browser and come back to the terminal.
In the terminal, create a folder for the project:
mkdir my-first-appIn Cursor, choose File > Open Folder and open my-first-app. Then open the agent panel with Cmd+I (Mac) or Ctrl+I (Windows and Linux). Sign in when Cursor asks.
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:
Three quick challenges:
- Change “Hello, world!” to your name (HTML tab).
- Add another color to the
colorslist (JavaScript tab). Tip: colors are written like this:'#ffb4a2'. - 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 |
| Command | Where | What it does |
|---|---|---|
codex |
Terminal | Starts Codex in the current folder |
codex resume |
Terminal | Reopens a saved conversation |
/new |
Inside Codex | Starts a new conversation |
/status |
Inside Codex | Shows the model, permissions, and usage |
/quit |
Inside Codex | Exits Codex |
| Command | Where | What it does |
|---|---|---|
copilot |
Terminal | Starts Copilot CLI in the current folder |
copilot --continue |
Terminal | Continues the last conversation |
? |
Inside Copilot | Shows help |
/clear |
Inside Copilot | Starts a new conversation |
/usage |
Inside Copilot | Shows how much you’ve used |
In Cursor, everything happens in the agent panel (Cmd+I or Ctrl+I). When you change topics, start a new chat there instead of continuing an old one.
Mark it complete to track your progress.