Lesson 2: Set Up Your Tools
| Course home | Previous: Lesson 1 | Next: Lesson 3 |
Time: about 60 minutes, mostly waiting for downloads.
Install commands were checked against official pages in December 2026. If a command fails, use the vendor link next to it; vendors change installers more often than tutorials get updated.
Goals
By the end of this lesson you will have:
- A code editor installed (VS Code is used in examples).
- A terminal you can open, move around in and close without fear.
- Node.js, Git and (usually already present) Python installed and checked.
- One AI coding agent installed and signed in.
- A
tiny-habitsproject folder with a first Git commit. - Run a first, read-only agent session.
Concepts
The four tools and what each is for
| Tool | What it does | Why you need it |
|---|---|---|
| Code editor (VS Code) | Opens and edits text files, shows diffs, has a built-in terminal | To read what the AI wrote |
| Terminal | Lets you type commands | To run the agent, tests and a local server |
| Node.js | Runs JavaScript outside the browser | To run automated tests in Lesson 9 (some agents also install via npm) |
| Git | Records versions of your project | Your undo button and save points |
| AI coding agent | Reads and edits your project, runs commands | The thing doing most of the typing |
Terminal survival kit
You only need a handful of commands. Type them, press Enter, read the output.
| Command (macOS, Linux, Git Bash) | Windows PowerShell | What it does |
|---|---|---|
pwd |
pwd |
Show which folder you are in |
ls |
ls or dir |
List files in this folder |
cd tiny-habits |
cd tiny-habits |
Go into a folder |
cd .. |
cd .. |
Go up one folder |
mkdir tiny-habits |
mkdir tiny-habits |
Make a new folder |
code . |
code . |
Open this folder in VS Code (if the code command is installed) |
| Ctrl+C | Ctrl+C | Stop whatever is running |
| Up arrow | Up arrow | Bring back the last command |
If the terminal is new to you, read the Claude Code terminal guide or MDN’s command line crash course. Both are useful whichever agent you choose.
Where the agent can reach
An agent works in the folder you start it from. That folder and everything below it is its workspace. This is why you will always:
cdinto your project folder first.- Then start the agent.
Never start an agent in your home folder or your Desktop with broad permissions. Give it a project folder that contains only the project.
Walkthrough
Step 1: Install a code editor
Download VS Code from code.visualstudio.com and install it like any other app. Open it once.
On macOS, open the Command Palette (Cmd+Shift+P), type “shell command”, and choose “Install ‘code’ command in PATH” so code . works in the terminal. On Windows the installer offers this as a checkbox.
Step 2: Open a terminal
- macOS: press Cmd+Space, type “Terminal”, press Enter. Or use VS Code’s built-in terminal: View, Terminal.
- Windows: open “Windows PowerShell” from the Start menu, or VS Code’s terminal.
- Linux: your distribution’s Terminal app.
Type pwd and press Enter. You should see a path like /Users/yourname or C:\Users\yourname.
Step 3: Install Node.js
Download the LTS (long-term support) version from nodejs.org and install it. Then close and reopen the terminal and check:
node --version
npm --version
You want Node.js 22 or later (the tests in this course use the built-in test runner, and several agent CLIs need 22+).
Step 4: Install Git
- macOS: run
git --version. If Git is missing, macOS offers to install the Command Line Tools. Accept. - Windows: install Git for Windows from git-scm.com/downloads. It also gives you Git Bash, which some agents use to run commands.
- Linux: install with your package manager, for example
sudo apt install giton Ubuntu.
Then tell Git who you are (use any name and the email you will use on GitHub):
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Step 5: Check Python (for the local web server)
python3 --version
macOS and most Linux systems include Python 3. On Windows, try py --version; if missing, install Python from the Microsoft Store or python.org. You only use it to run python3 -m http.server, a one-line local web server.
Step 6: Install one AI coding agent
Pick one from the comparison table. Copy install commands only from the vendor’s own page.
Claude Code (paid Claude plan or Console account required), from the official setup page:
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
Check with claude --version, then run claude and follow the browser sign-in.
OpenAI Codex CLI (sign in with a ChatGPT account), from the official repository:
npm install -g @openai/codex
# or on macOS
brew install --cask codex
Run codex and choose “Sign in with ChatGPT”.
GitHub Copilot (Free plan available): in VS Code, open the Extensions panel, install GitHub Copilot, and sign in with GitHub. For the terminal version, see the Copilot CLI install guide:
npm install -g @github/copilot
Google Antigravity CLI, from the getting started page:
# macOS, Linux
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Windows PowerShell
irm https://antigravity.google/cli/install.ps1 | iex
Check with agy --version.
If you see command not found right after installing, close the terminal and open a new one. If it still fails, follow the troubleshooting link on the vendor page.
Step 7: Create your project folder and first commit
cd ~ # Windows PowerShell: cd $HOME
mkdir tiny-habits
cd tiny-habits
git init
Create a file named README.md in VS Code (code . opens the folder) with one line:
# Tiny Habits
Save it, then:
git add README.md
git commit -m "Start Tiny Habits project"
git log --oneline
You should see one commit. Congratulations: you have a save point.
Step 8: First agent session, read-only
From inside tiny-habits, start your agent (claude, codex, agy or copilot, or open Copilot Chat in VS Code). Paste:
Hi. I'm a complete beginner. Without changing any files or running any
commands, tell me:
1. Which folder you are working in.
2. Which files you can see.
3. What you would need from me before building a small web app here.
Keep the answer under 10 lines.
A good answer names the tiny-habits folder, lists README.md, and asks you about what the app should do, the technology you want, and maybe whether you want it in Git (it already is).
Now try one permission prompt on purpose:
Create a file called notes.txt containing the words "hello agent".
The agent should ask permission before creating the file (unless you configured otherwise). Approve it. Check the file exists in VS Code. Then:
git status
Git reports notes.txt as a new, untracked file. Delete it (rm notes.txt on macOS/Linux, del notes.txt in PowerShell) since we do not need it. You have just seen the full loop: you ask, it asks permission, it acts, you verify.
Step 9: Learn your agent’s controls
Find out (from its help command, usually /help) how to:
- Stop the agent mid-task (often Esc or Ctrl+C).
- Start a fresh conversation.
- See or change its permission mode.
- Exit.
Write these four down next to your ground rules from Lesson 1.
What good output looks like
node --versionprints v22 or higher.git --versionprints a version.- Your agent’s version command prints a version and you are signed in.
git log --onelineintiny-habitsshows exactly one commit.- The agent asked permission before creating a file.
Checklist
- VS Code installed; I can open a folder in it.
- I can open a terminal, use
pwd,lsandcd, and stop a command with Ctrl+C. - Node.js 22+ and Git installed.
- Git name and email configured.
- One AI agent installed and signed in.
tiny-habitsfolder exists, is a Git repo and has one commit.- I ran a read-only session and saw one permission prompt.
- I know how to stop, reset and exit my agent.
Mini-quiz
- Why should you
cdinto your project folder before starting the agent? - What does
git commitdo, in one sentence? - A command you copied fails with
command not foundright after installing. What is the first thing to try? - Why copy install commands only from the vendor’s own site?
- What keyboard shortcut usually stops a running command in the terminal?
Answers
1. The agent's workspace is the folder it starts in. Starting in the project folder keeps it focused on your project and away from unrelated files. 2. It saves a snapshot of the staged changes in your project's history with a message, so you can return to it later. 3. Close the terminal and open a new one, so it picks up the updated PATH. Then check the vendor's troubleshooting page. 4. Install commands run code on your computer. A modified command on a random page could install something malicious. 5. Ctrl+C.Assignment
- In
tiny-habits, ask your agent to explain whatgit status,git add,git commitandgit logdo, with an example of each. Do not let it run them; just explain. - Run each one yourself and compare with the explanation.
- Add a line to your
README.mddescribing the app in one sentence, and commit it with a clear message.