Chapter 1: The machine

The PATH variable

Also called $PATH

An environment variable holding a list of folders. When you type a program's name, the shell looks through those folders in order and runs the first match. If none has it, you get command not found, even when the program is on the machine.

Command not found is what an agent often meets straight after installing something, and the usual cause is a folder missing from this list. It also explains a command running the wrong version: another copy sits earlier in the list.

Say it to your agent

“You got command not found for tsc. Don't install it globally. Run which tsc and echo $PATH, then use bunx tsc or a script in package.json, so that it runs this project's version.”

The workshop

Name a word, or describe what you mean in everyday language.