Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Environment variables and where secrets live
card 1 of 6
The script wants a key you don't have
builds on: Terminal basics: where you are and running things
You download a small weather script. Its README says: *Set `WEATHER_API_KEY` before running.* You sign up on the weather site, get a long key that starts `wk_live_9f2a`, and run `python weather.py`. It prints `Error: WEATHER_API_KEY is not set`.
Where is the key supposed to go? And why didn't the author just paste their own key into the code?
Terms on this card
- README
- A text file at the top of a project explaining what it is and how to set it up and run it.
- script
- A small program, usually one file, that you run to do a task, like `report.py`.
Lesson goal: Explain how API keys and passwords usually reach a program: environment variables, `.env` files and config files. Explain why these files must stay out of git and out of anything you share. ·
the whole lesson