ADR-0015: Load secrets from a git-ignored .env file
Accepted
Status: accepted ยท 2026-10-24
Contextโ
The judge needs GEMINI_API_KEY (ADR-0002). The owner keeps it in .env at the repository root, and the CLI read only the shell environment, so the key had to be exported by hand before every coach judge.
Decisionโ
npm run coachstarts the CLI with Node's built-in--env-file-if-exists=.env, so variables in.envreach the process; a missing file is not an error.- Variables already set in the shell win over
.env, as Node applies them. .envand.env.*stay git-ignored, and no secret goes intocoach.config.json, which is git-ignored too but holds settings, not secrets.- No dotenv library is added.
Consequencesโ
coach judgeworks with the key in.envand nothing exported.- Running
node packages/cli/dist/main.jsdirectly does not load.env; usenpm run coachor pass the flag.