Commit your repo’s stable version policy to a zerv.toml once instead of repeating the same
flags on every zerv invocation.
Discovery
zerv walks up from the current directory to the nearest VCS repository root (Git’s .git
today) and reads zerv.toml there, or the hidden .zerv.toml fallback. Config is
repo-scoped: one policy per repo, no subdirectory shadowing, so a version never depends
on which directory you run from.
Precedence
Top wins:
--config-file <path> reads that file instead of discovering zerv.toml; the
discovered file is never read. Pass the null device to disable config entirely: the empty
file yields no overrides, restoring builtin behavior. There is no --no-config flag; the
null device is the escape hatch (/dev/null on Unix and macOS, NUL on Windows).
File structure
Stable fields live at the shared top (apply to both subcommands); [version] and [flow]
sections override per-subcommand:
output_prefix and output_template conflict: they cannot both be set. Put the prefix
directly in the template ("v{{ major }}..."), or use output_prefix with output_format
and no template.
Ephemeral per-build fields (--dirty, --bump-minor, --major, …) are not allowed in
the file: a typo’d or stale key fails loud at parse (deny_unknown_fields) rather than
shipping silently on the next CI run.