Chapter 1: The machine

A process also inherits settings it never asked for.

Environment variable

Also called Env var, export

A named setting a process carries with it, such as TZ=Europe/London for its time zone. A program can read it without it being in the code, and passes a copy to any program it starts. A child can't change its parent's copy.

This is how the same code uses a practice database on your laptop and the real one in production, the live copy that real users rely on. It is also where secrets such as passwords belong. And it is a trap for agents: "I set it" may mean it was set in a shell that has already ended.

Say it to your agent

“Read the key from process.env.PAYMENT_API_KEY and fail at startup with a clear message if it is missing. Add the name to .env.example with no value, and never print it in a log.”

The workshop

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