Skip to content

Env files ​

Beside the machine's secrets file, the conductor looks for one env file per level, from general to specific. Every file that exists is loaded; a later file overrides an earlier one per variable. A missing file is no error.

LevelFileKey
Machine~/.bakers/.bakers.envthe secrets file
Project~/.bakers/envs/project/.bakers-<project>.envproject.name in project.config.js, e.g. .bakers-bakers.env
Runtime~/.bakers/envs/runtime/.bakers-<runtime>.envthe run's runtime alias, e.g. .bakers-system.env
Agent addon~/.bakers/envs/agent/.bakers-<harness>.envthe harness id, e.g. .bakers-claude.env
Agent alias~/.bakers/envs/agent/.bakers-<alias>.envthe agent alias, e.g. .bakers-opus.env

There are no combined files. An alias equal to its harness id is the same file and loads once. A key that is empty or contains / or \ has no file. BAKERS_HOME moves all of them.

  • Rules: format, bad line, permissions (chmod 600), redaction and restart on change are those of the secrets file, for every file. The conductor loads every file under ~/.bakers/envs/ at start, so a bad file of any project stops the start. It creates the three folders and restarts when a .bakers-*.env file in them is written or created; a file written while the conductor starts counts only on its next write.
  • Hand-out: a variable the agent addon declares reaches the run from the most specific file that sets it. A variable in a project, runtime or agent file reaches the run even when undeclared; one only in the machine file does not. A non-empty value exported in the conductor's shell wins over every file, and a host run keeps the shell's own value. A variable the conductor sets for the run itself, such as HOME or a BAKERS_* value, is never overridden.
  • Addons: an agent or runtime addon reads only the values the conductor hands it, never an env file or the conductor's environment.