Environment variables
Flags are not the only way denver takes input. A handful of environment variables change where it puts things — and unlike the flags on the previous page, these are read from your shell rather than passed per run.
What denver reads
Variable |
What it does |
|---|---|
|
Fallback for |
|
Working directory for this environment’s files. |
|
Directory where tools can persistently store files, e.g. caches.. Defaults to |
What denver exports
Going the other way, denver also sets a handful of built-in variables in the
environment it builds, so your scripts, compose files and the final command
can read them as ordinary variables. They are also what ${...}
interpolation inside a denver.yml resolves against — see “Variable
interpolation” in Configuration.
Denver-owned identifiers always reflect the current run, even if a stale variable of the same name was already exported in the calling shell:
Variable |
Default |
What it holds |
|---|---|---|
|
the resolved |
This environment’s own directory — the one holding its |
|
that directory’s name |
e.g. |
|
|
denver’s own working area for this environment (e.g. venv, install trees, fingerprints, logs, …). Can be overridden by |
|
|
Directory where tools can persistently store files, e.g. caches. Can be overwritten by |
|
wherever denver’s own code is installed |
Rarely needed directly — mostly for a |
|
|
The marker text a shell’s prompt uses to show when it is running inside this environment, e.g. |
Where an environment’s state lives
By default, inside the environment’s own directory:
my-project/env/
├── denver.yml
└── .denver/ # denver's state, ignores itself via its own .gitignore
└── denver/ # one subdirectory per denver.*.<ext> config in this folder
├── .venv.host
├── .conan/
└── performance.jsonl
State belongs with the environment that owns it: deleting a checkout deletes
exactly its own state, two checkouts of one project can never share (or
destroy) each other’s, and a docker stage carries it into the container
for free, since the workspace is already bind-mounted there.
The <config file stem> level exists because one folder may hold several
variants (denver.debug.yml, denver.release.yml) — those are different
environments sharing a folder, and must not share a venv.
Wherever it ended up, denver run <env> --clean or denver clean <env>
removes it — see Remove an environment’s state.
[!NOTE] Next: Configuration — the complete config schema: every key, how imports merge, and the mechanisms behind everything you have used so far.