Vibe Coding: build real apps with AI · Episode 3. Every command and output below was really run on 6 November 2026 on Ubuntu Linux (bash), as user ravi with a fresh Git configuration: Node 22.23.4, npm 10.9.9, Python 3.13.18, pip 26.2.1, Git 2.43.0. VS Code was not installed on that machine, so code really was "not found". AI replies come from Claude Code 2.1.318. On Windows or Mac some outputs look slightly different; the ideas are the same.
The problem: "command not found"
Ravi wants an AI agent (Episode 2) on his own laptop. A friend says: open a terminal, go to your project, type code . to open VS Code.
ravi@laptop:~/projects/flat-app$ code .
bash: code: command not found
ravi@laptop:~/projects/flat-app$ which code
ravi@laptop:~/projects/flat-app$
- bash is the program running inside the terminal window that reads your commands.
- command not found: it looked for a program called
codeand found none. Either it isn't installed, or it's installed somewhere the terminal doesn't look. - which shows where a program lives. For
codeit prints nothing: nowhere.
Terminal basics
A terminal is a window where you control the computer by typing commands instead of clicking. A directory is another word for a folder.
| Giving directions | Command | Meaning |
|---|---|---|
| "Where am I?" | pwd |
print working directory |
| "What's around me?" | ls |
list files and folders here |
| "Walk into that lane" | cd <folder> |
change directory |
| "Build a new room" | mkdir <name> |
make directory |
On Windows, PowerShell understands ls, cd and mkdir too.
Real session:
ravi@laptop:~$ pwd
/home/ravi
ravi@laptop:~$ ls
split
weather
ravi@laptop:~$ cd projects
bash: cd: projects: No such file or directory
ravi@laptop:~$ mkdir projects
ravi@laptop:~$ ls
projects
split
weather
ravi@laptop:~$ cd projects && pwd
/home/ravi/projects
ravi@laptop:~/projects$ mkdir flat-app
ravi@laptop:~/projects$ cd flat-app && pwd
/home/ravi/projects/flat-app
- The text before
$is the prompt: userravi, onlaptop, in~(tilde = your home folder). cd projectsfailed because the folder didn't exist yet. Make it first.mkdirprints nothing when it works: in the terminal, no news is good news.&&runs the second command only if the first one worked.- One folder per project. AI agents work best when started inside the right project folder.
VS Code, the editor
An editor is an app made for writing code (colours, line numbers, extensions). VS Code is free, from code.visualstudio.com.
- Windows (VS Code docs): download the User setup and run it. "Setup adds Visual Studio Code to your
%PATH%environment variable." Restart your console, then runcode .in a folder. - Mac (VS Code docs): open VS Code, open the Command Palette (Cmd+Shift+P), search "shell command" and run Shell Command: Install 'code' ... in PATH. Restart the terminal.
code .opens the current folder:.means "this folder".- Still "command not found"? The terminal was opened before the install. Open a new one.
PATH: how the terminal finds programs
| A delivery person | Your terminal |
|---|---|
| "Deliver to Sharma ji": just a name | you type just a program name, code |
| checks his areas in order: sector 1, 2, 3... | PATH: a list of folders searched in order |
| not in any area: "address not found" | not in any PATH folder: "command not found" |
ravi@laptop:~/projects/flat-app$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/node22/bin
ravi@laptop:~/projects/flat-app$ which python3 node git
/usr/local/bin/python3
/usr/local/bin/node
/usr/bin/git
echoprints text;$PATHis the value of the PATH variable. Folders are separated by:(;on Windows).bin= binaries = programs.- PATH is an environment variable, like
OWM_API_KEYin Episode 2. - Fix for "command not found": install the program, or add its folder to PATH. Then open a new terminal, because a terminal reads PATH when it starts.
Node.js and npm
| A kitchen | JavaScript on your computer |
|---|---|
| the stove | Node.js: runs JavaScript outside the browser |
| the ration shop | npm (Node package manager): downloads ready-made packages |
| ingredients you don't grow yourself | package: code someone else wrote and shared (a library) |
Install from nodejs.org, the LTS version. LTS = long-term support: a version that gets fixes for a long time. On 6 Nov 2026, nodejs.org marks v26.13.0 as the latest LTS; v22.23.4 (used below) is also an LTS release.
ravi@laptop:~/projects/flat-app$ node --version
v22.23.4
ravi@laptop:~/projects/flat-app$ npm --version
10.9.9
ravi@laptop:~/projects/flat-app$ node -e 'console.log("Node works:", 1000 / 3)'
Node works: 333.3333333333333
- A version number like 22.23.4 is major.minor.patch; the first number changes for big changes.
node -eruns a small piece of JavaScript;console.logprints.
Python and pip
Install from python.org (on 6 Nov 2026 it offers Python 3.15.2; any recent 3.x works for this course).
ravi@laptop:~/projects/flat-app$ python3 --version
Python 3.13.18
ravi@laptop:~/projects/flat-app$ pip --version
pip 26.2.1 from /usr/local/lib/python3.13/site-packages/pip (python 3.13)
ravi@laptop:~/projects/flat-app$ python3 -c 'print("Python works:", 1000 // 3)'
Python works: 333
ravi@laptop:~/projects/flat-app$ python3 hello.py
python3: can't open file '/home/ravi/projects/flat-app/hello.py': [Errno 2] No such file or directory
- pip is Python's package installer (the npm of Python).
- On Windows the command is often
pythonorpyinstead ofpython3. python3 -cruns a small piece of Python;//is whole-number division.- "can't open file": Python looks in the folder you're in. Check
pwdandls.
Asking an AI to help you install
A vague prompt (real):
claude -p "How do I install Node.js on my laptop? Answer in at most 6 short lines."
1. Go to **nodejs.org** and download the LTS installer for your OS (Windows/macOS), then run it.
2. Linux (Debian/Ubuntu): `sudo apt install nodejs npm`, or use **nvm** for newer versions:
3. `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash`, then restart the terminal and run `nvm install --lts`
4. macOS with Homebrew: `brew install node`
5. Verify with `node -v` and `npm -v`.
It doesn't know which laptop Ravi has (missing context), so it covers every system. Line 3 (curl ... | bash) downloads a script from the internet and runs it immediately. Common, but you're running someone else's code unread: only do it if you trust the source and understand it.
With context (real):
claude -p "I'm on Windows 11 and I've never used a terminal. How do I install Node.js and check it worked? Answer in at most 8 short lines."
1. Go to **nodejs.org** in your browser and click the **LTS** download button.
2. Open the downloaded `.msi` file and click Next through the installer (keep the defaults).
3. Press the **Windows key**, type **Command Prompt**, and press Enter. That opens the terminal.
4. Type `node -v` and press Enter.
5. Type `npm -v` and press Enter.
6. If each shows a version number (like `v22.11.0` and `10.9.0`), it worked.
7. If you see "not recognized", close the window and open a new Command Prompt. If it still fails, restart your PC.
Catch the mistake: the example version v22.11.0 is out of date; nodejs.org says the latest LTS is v26 today. An AI learned from text up to some date, so version numbers and prices can be stale. For anything that changes, trust the official site.
An agent checks your setup (real, only version commands and which allowed):
| Tool | Status | Version |
|---|---|---|
| node | Installed | v22.23.4 |
| npm | Installed | 10.9.9 |
| python3 | Installed | 3.13.18 |
| pip | Installed | 26.2.1 (Python 3.13) |
| git | Installed | 2.43.0 |
| code (VS Code) | Not found | `code` isn't on the PATH |
VS Code may be installed without its shell command on the PATH. In VS Code, open the Command Palette and run "Shell Command: Install 'code' command in PATH". If you don't have VS Code at all, install it.
Correct table, but the tip is the Mac instruction from VS Code's docs; on Windows the installer adds code to PATH. Right for one computer, wrong for another: give context, check the docs.
Git and GitHub
| A video game | Git |
|---|---|
| a save point before the boss fight | commit: a saved version of your whole project |
| load the save and try again | go back when an AI change breaks things |
| cloud save, play on any device | GitHub: a website that stores Git projects online |
A folder Git tracks is a repository (repo). Get Git from git-scm.com. Make a free account at github.com (we connect it in Episode 26).
Real session:
ravi@laptop:~/projects/flat-app$ git --version
git version 2.43.0
ravi@laptop:~/projects/flat-app$ git init
Initialized empty Git repository in /home/ravi/projects/flat-app/.git/
(plus a hint about the default branch name)
ravi@laptop:~/projects/flat-app$ echo "# Flat app" > README.md
ravi@laptop:~/projects/flat-app$ git add README.md
ravi@laptop:~/projects/flat-app$ git commit -m "First commit"
Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@vm.(none)')
git initstarts tracking the folder (creates the hidden.gitfolder).>writes text into a file. A README explains a project.git addchooses what goes into the next save;git commit -m "..."saves it with a message.- Git refused: every commit records who made it (Pro Git: first-time setup).
The fix:
ravi@laptop:~/projects/flat-app$ git config --global user.name "Ravi Kumar"
ravi@laptop:~/projects/flat-app$ git config --global user.email "ravi@example.com"
ravi@laptop:~/projects/flat-app$ git config --global --list
user.name=Ravi Kumar
user.email=ravi@example.com
ravi@laptop:~/projects/flat-app$ git commit -m "First commit"
[master (root-commit) 834e377] First commit
1 file changed, 1 insertion(+)
create mode 100644 README.md
ravi@laptop:~/projects/flat-app$ git log --oneline
834e377 First commit
--global= for every project on this computer, so you do it once. Use the email you'll use on GitHub (ravi@example.comis an example).834e377is the commit's ID, its unique name. Yours will be different.
The no-install option
Only a browser or a phone? The SyntaxPilot online compiler runs Python, JavaScript and more with nothing to install:
# No install needed: this runs in your browser
bill = 1000 * 100 # paise
base, extra = divmod(bill, 3)
print("Python works:", base, "paise each, leftover", extra)
Python works: 33333 paise each, leftover 1
// Same idea in JavaScript (Node.js)
const bill = 1000 * 100; // paise
const base = Math.floor(bill / 3);
const extra = bill % 3;
console.log("JavaScript works:", base, "paise each, leftover", extra);
JavaScript works: 33333 paise each, leftover 1
Math.floor rounds down; % gives the remainder. Projects with many files, servers and agents need a real computer.
Setup checklist
- [ ] VS Code installed;
code .opens a folder - [ ]
node --versionandnpm --versionprint versions - [ ]
python3 --version(orpy/pythonon Windows) andpip --version - [ ]
git --version;git config --global user.nameanduser.emailset - [ ] a free GitHub account
- [ ] a
projectsfolder, one folder per app - Stuck? Give the AI the exact error plus your operating system.
Common mistakes (real messages)
| Command | What you see | Why | Fix |
|---|---|---|---|
code . |
bash: code: command not found |
not installed, or its folder isn't on PATH | install / add to PATH, then open a NEW terminal |
cd projects |
bash: cd: projects: No such file or directory |
the folder doesn't exist yet | mkdir projects first; check with ls |
python3 hello.py |
can't open file '.../hello.py': [Errno 2] No such file or directory |
you're in a different folder | pwd, ls, then cd to the right one |
git commit -m "First commit" |
Author identity unknown |
Git needs a name and email | git config --global user.name / user.email |
Windows: node -v |
'node' is not recognized ... |
the terminal was open before the install | close it and open a new one |
Mini project: your flat-app folder
- Make
projects/flat-appin your home folder. - Run all the version commands and save the output in a file:
node --version > versions.txtthennpm --version >> versions.txt(>>adds to the end). - Make a README and your first commit.
Solution (Mac/Linux; on Windows use PowerShell)
cd ~
mkdir -p projects/flat-app
cd projects/flat-app
node --version > versions.txt
npm --version >> versions.txt
python3 --version >> versions.txt
git --version >> versions.txt
echo "# Flat app" > README.md
git init
git add README.md versions.txt
git commit -m "First commit"
git log --oneline
mkdir -p makes the parent folders too. Your commit ID will be different.
Practice questions
- What's the difference between
pwdandls?
Answer
pwd shows where you are; ls shows what's in that folder.
- You installed Python, but
python3says "command not found". Name two possible causes.
Answer
The terminal was opened before the install (open a new one), or Python's folder isn't on PATH (on Windows, try py).
- Why does
git commitneed your name and email?
Answer
Every commit records who made it, permanently.
- Rewrite this vague prompt with context: "How do I install Git?"
Sample answer
"I'm on macOS 15 with Homebrew installed, and I'm new to the terminal. How do I install Git and check it worked? Short steps, please."
Quiz
You just installed Node, but the terminal says bash: node: command not found. Most likely fix?
A) Reinstall Windows · B) Close the terminal and open a new one · C) Type it in capital letters · D) Run git init
Answer
B. A terminal reads PATH when it starts; one opened before the install doesn't know Node's folder yet.
Interview questions
- What is PATH? An environment variable listing the folders the shell searches, in order, for a command you type.
- What is the difference between Node.js and npm? Node runs JavaScript outside the browser; npm installs packages (shared libraries) for Node projects.
- What does
git commitdo, and why commit before a big AI change? It saves a snapshot of the project; if the AI breaks something, you can go back to it. - Why prefer an LTS version? It gets fixes for a long time, so it's stable for real projects.
Glossary
| Term | Meaning (plain words) | Example |
|---|---|---|
| Terminal | a window where you control the computer by typing commands | the window running bash |
| Shell / bash | the program inside the terminal that reads your commands | bash: code: command not found |
| Command | a word (plus options) you type to run a program | pwd |
| Prompt (terminal) | the text before $ showing user, computer and folder |
ravi@laptop:~$ |
| Directory | another word for folder | projects |
Home folder (~) |
your personal folder | /home/ravi |
| pwd | print working directory: where am I? | /home/ravi |
| ls | list what's in this folder | split weather |
| cd | change directory: move into a folder | cd projects |
| mkdir | make directory: create a folder | mkdir flat-app |
&& |
run the next command only if the first worked | cd projects && pwd |
| Editor | an app made for writing code | VS Code |
| VS Code | a free code editor from Microsoft | code . |
| Command Palette | VS Code's search box for commands (Ctrl/Cmd+Shift+P) | "Shell Command" |
| PATH | the list of folders the terminal searches for programs | /usr/local/bin:/usr/bin:... |
| Environment variable | a named value kept outside the code, in the computer's settings | PATH, OWM_API_KEY |
| which | shows where a program lives | which git → /usr/bin/git |
| echo | prints text | echo $PATH |
| Node.js | runs JavaScript outside the browser | node --version |
| npm | Node package manager: downloads packages | npm --version |
| Package | shared, ready-made code (a library) | anything npm or pip installs |
| LTS | long-term support: a version that gets fixes for a long time | Node 26 LTS |
| Version number | major.minor.patch | 22.23.4 |
| Python | a programming language for scripts, automations and backends | python3 --version |
| pip | Python's package installer | pip --version |
curl ... \| bash |
download a script and run it immediately; only from trusted sources | the nvm install line |
| Git | a tool that saves versions (commits) of your project | git commit |
| Repository (repo) | a folder Git tracks | flat-app |
| Commit | a saved version of the project, with a message and an author | 834e377 First commit |
| git config | Git settings, such as your name and email | --global user.name |
| README | the file that explains a project | README.md |
| GitHub | a website that stores Git projects online | github.com |
Summary
- The terminal runs typed commands:
pwd,ls,cd,mkdir. - "command not found" = not installed, or not on PATH (the folders the terminal searches). After installing, open a new terminal.
- VS Code is the editor;
code .opens the current folder. - Node runs JavaScript and npm fetches packages; Python runs scripts and pip fetches packages. Prefer LTS / recent versions from the official sites.
- AI install help needs context (your OS), and its version numbers can be stale.
- Git saves commits; set
user.nameanduser.emailonce. Make a free GitHub account. - No computer? The SyntaxPilot compiler runs Python and JavaScript in the browser.
Next episode: Prompting 101 for code: goals, constraints, inputs and outputs, examples, and a bad prompt vs a good one.