awa config — configuration schema, precedence, and when to change it
On this page
Layer precedence
Configuration is layered, lowest precedence first:
product defaults
awa.toml optional shared project config, committable
.awa/config.toml optional local override, ignored/private
--config <path> optional explicit invocation override (above shared/local)
CLI flags highest
A later layer REPLACES a key, and for a list-valued key that means the whole
list, never a merge. A local .awa/config.toml that sets
[scope].extra_excludes discards the shared awa.toml list rather than
adding to it, and the same is true of include, env_allowlist,
default_scope, extra_effect_roots, hash_only_patterns, and the
[[run.validation]] policies and [[run.required_env]] declarations. To
keep a shared list and add to it, restate the shared entries in the
overriding layer. awa config effective shows the resolved list and the
layer it came from, which is the reliable way to catch a list you did not
mean to drop.
Each active layer that changes observation, hashing, diff, run cache identity, storage, or output policy is folded into the relevant config identity, so a reused run or checkpoint reflects the config it actually ran under. Invalid config in any active layer fails loudly and names the layer and path.
Shared vs local:
awa.toml— share scan/run policy with all contributors and agents..awa/config.toml— personal overrides that must not be committed..awaignore— committable native ignore patterns.--config <path>— one-off or CI invocation config.
Discover and manage config from the binary
awa config template annotated template (redirect to a file)
awa config init --shared write a committable awa.toml
awa config init --local write a private .awa/config.toml
awa config path show the shared and local paths and which exist
awa config show print a layer's raw contents
awa config effective the composed config plus each value's origin layer
Reference
Defaults are shown; an absent key keeps its default.
[scope] — Scan scope (history/checkpoint family and the shared base)
The common scan boundary shared by awa checkpoint/changes/diff and, through extra_excludes, the run input scan. Only additive user values live here; the product baseline and protected defaults are built in.
include(path list, default:["."])- Directories/files the scan includes; an explicit narrowed scope outranks every configurable and default exclude.
- When to change: Narrow to a subtree, or bring back a path a baseline/ignore rule would otherwise drop.
extra_excludes(pattern list, default:[])- Additive common exclude patterns applied to both the history family and the run input scan, on top of the built-in baseline. An enabled ignore file can re-include what they exclude.
- When to change: Exclude a project-specific directory from all scans.
use_gitignore(bool, default:false)- Whether .gitignore participates as an ignore source for the history family. Off by default: git ignores answer "what not to commit", not "what can affect a command".
- When to change: Turn on only if your .gitignore genuinely matches what should not be observed.
use_awaignore(bool, default:true)- Whether .awaignore participates for the history family. On by default; .awaignore is awa's committable native ignore file.
- When to change: Turn off to ignore .awaignore files entirely.
follow_symlinks(bool, default:false)- Whether the scanner follows symbolic links.
- When to change: Enable when scoped content lives behind symlinks you trust.
symlink_max_depth(int, default:16)- Maximum symlink chain depth followed when follow_symlinks is on.
- When to change: Raise or lower the guard against deep or cyclic link chains.
allow_symlink_root_escape(bool, default:false)- Whether a followed symlink may resolve outside the project root.
- When to change: Enable only when you deliberately depend on out-of-root linked content.
[history] — History-only excludes
Excludes that affect awa checkpoint/changes/diff but never the run input scan, so a generated artifact can stay out of local history while remaining a real command input. The history family inherits its ignore-source policy from [scope].
extra_excludes(pattern list, default:[])- Additive history-only exclude patterns, on top of the built-in history defaults (dist, build, coverage).
- When to change: Keep a generated directory out of checkpoints/diffs while runs still key it.
[hashing] — Content hashing and index trust
Local content identity is fixed: awa hashes worktree content with BLAKE3 and persists every local digest with the blake3: prefix followed by lowercase hex. The primitive is product behavior, not a setting — there is no key here to change it, and only the policy governing how it is applied is configurable. The SHA-256 you see in a release checksum file, an exported documentation manifest, or a site asset digest is a separate external integrity convention and takes no part in local evidence identity.
trust_mode(enum: normal | strict | fast, default:normal)- How aggressively the worktree index is trusted to skip rehashing unchanged files. fast compares size and mtime only, which can miss a same-size same-mtime rewrite, so a run observed under it is recorded but never published as reusable.
- When to change: Use strict for integrity-critical work; use fast only where losing run reuse entirely is an acceptable price for scan speed.
max_file_size(byte size (B/KiB/MiB/GiB/TiB), default:50MiB)- Threshold above which large_file_policy applies.
- When to change: Raise to store larger blobs, or lower to keep the store lean.
large_file_policy(enum: hash-only | store | skip, default:hash-only)- What awa does with files above max_file_size: hash-only keeps them in tree hashes without storing blobs.
- When to change: Use store to keep large blob content, or skip to leave them out of hashing entirely.
[checkpoint] — Checkpoint recording
store_file_contents(bool, default:true)- Whether checkpoint blobs are stored (affects checkpoint policy identity).
- When to change: Turn off to record checkpoint hashes without keeping content.
hash_only_patterns(pattern list, default:[".env", ".env.*", "*.env", "!.env.example", "!.env.sample", "!.env.template"])- Ordered patterns (see "Pattern semantics") selecting regular files a new checkpoint records hash-only: identity and metadata, no owned bytes, so no stored text diff or byte restore from that checkpoint. Selection, not exclusion: the file stays scanned, compared, and a run input. Negation removes only this list's selection; it never overrides store_file_contents = false, large_file_policy, or an exclude. Setting the key replaces the whole default list; [] selects nothing. Introduced in this release: older binaries reject the key as unknown, and before it nothing was selected.
- When to change: Add your own secret-bearing names (restate the env defaults to keep them), or set [] to keep env file bytes in checkpoints.
diff_context(int, default:3)- Default number of context lines in checkpoint diffs.
- When to change: Adjust the default hunk context.
rename_detection(bool, default:true)- Whether diffs detect renames.
- When to change: Turn off for pure add/delete diffs.
[run] — Cached command execution
The run cache. extra_excludes is additive run-only; the effective run input
excludes omit the history-only defaults so a build artifact stays a real
command input. extra_effect_roots watches generated-output directories a
command reads but does not produce (see "Effect roots vs excludes"). A wrapped
command never inherits the full ambient environment: it receives the built-in
baseline, whatever env_allowlist adds, and the fixed advisory marker
AWA_RUN=1, and every one of those participates in the cache key. Run awa config effective to see the resolved inherited names and injected facts.
default_scope(path list, default:["."])- The run input scan scope when --scope is not given.
- When to change: Narrow the default set of inputs a run keys on.
extra_excludes(pattern list, default:[])- Additive run-only exclude patterns, on top of the baseline. Excluding a path weakens what the run can observe, so do it intentionally.
- When to change: Exclude scratch or log output no command's result depends on; an exclude does not silence a watched effect root.
use_gitignore(bool, default:false)- Whether .gitignore participates as an ignore source for the run input scan (keyed into the run cache). Off by default.
- When to change: Turn on only if .gitignore matches what should not affect a command.
use_awaignore(bool, default:true)- Whether .awaignore participates for the run input scan. On by default.
- When to change: Turn off to ignore .awaignore for runs.
env_allowlist(name list, default:["CI", "NODE_ENV"])- Environment variable names, on top of the built-in baseline, folded into the run cache key and passed to the child. The baseline already covers execution (PATH, HOME, SHELL, TMPDIR, the Windows equivalents) and the caller's locale (LANG, LANGUAGE, LC_*), so listing one of those is rejected as redundant; AWA_RUN is reserved because awa injects it.
- When to change: Add a variable your commands depend on so it keys the cache.
ttl(duration (d/h/m/s), default:7d)- Freshness window a reusable run entry stays eligible for a hit.
- When to change: Shorten or lengthen how long a cached result is served.
max_stdout_size(byte size, default:100MiB)- Capture limit for stdout; output beyond it is truncated in stored evidence.
- When to change: Raise for commands with very large output.
max_stderr_size(byte size, default:100MiB)- Capture limit for stderr.
- When to change: Raise for commands with very large error output.
capture_output(bool, default:true)- Whether run output is captured and stored for replay/inspection.
- When to change: Turn off to run without recording output.
cache_failed_runs(bool, default:true)- Whether non-zero-exit runs are cached.
- When to change: Turn off to always re-run failed commands.
extra_effect_roots(name/path list, default:[])- Additive watched generated-output selectors on top of the built-ins. Each
is either a directory NAME matched wherever it appears ("bin") or an exact
project-relative PATH matched only there ("artifacts/bin"). Literal, never
globs. Additive only: this list cannot remove a built-in; a matched
[[run.validation]] policy can waive an exact directory for its one
invocation (see
awa help validation). - When to change: Watch a generated directory a command reads so later changes to it invalidate reuse.
- Additive watched generated-output selectors on top of the built-ins. Each
is either a directory NAME matched wherever it appears ("bin") or an exact
project-relative PATH matched only there ("artifacts/bin"). Literal, never
globs. Additive only: this list cannot remove a built-in; a matched
[[run.validation]] policy can waive an exact directory for its one
invocation (see
validation(array of tables: name, argv, cwd, unobserved_dirs, identity_probes, default:[])- Named validation policies ([[run.validation]]). A policy applies only to
the run whose complete argv equals argv element for element and whose
execution cwd is cwd; it leaves each unobserved_dirs entry (an exact path
below the project root, never a name matched at any depth) out of input
identity and effect observation, so a cache hit replays the recorded
result without recreating those directories. Declaring one asserts both
that their prior contents cannot change the result and that their files
are not needed after a replay. Two policies selecting one invocation are a
conflict. Optional identity_probes ([[run.validation.identity_probes]],
each a name and a literal argv, at most 8) are commands whose exact stdout
becomes part of the policy's reuse identity; they run only for a project
and probe context the operator approved with awa config probes allow, a
per-user grant no config file can set. See
awa help validation. - When to change: Let a check that writes a huge or changing build directory replay its recorded result.
- Named validation policies ([[run.validation]]). A policy applies only to
the run whose complete argv equals argv element for element and whose
execution cwd is cwd; it leaves each unobserved_dirs entry (an exact path
below the project root, never a name matched at any depth) out of input
identity and effect observation, so a cache hit replays the recorded
result without recreating those directories. Declaring one asserts both
that their prior contents cannot change the result and that their files
are not needed after a replay. Two policies selecting one invocation are a
conflict. Optional identity_probes ([[run.validation.identity_probes]],
each a name and a literal argv, at most 8) are commands whose exact stdout
becomes part of the policy's reuse identity; they run only for a project
and probe context the operator approved with awa config probes allow, a
per-user grant no config file can set. See
required_env(array of tables: argv, cwd, names, default:[])- Command environment requirements ([[run.required_env]]). A declaration
applies only to the run whose complete argv equals argv element for
element and whose execution cwd is cwd, exactly as a validation policy
selects; it is independent of [[run.validation]] and waives nothing. Each
name is passed from the caller to that command (no env_allowlist entry
needed) and must be set to a nonempty value: an unset or empty one makes
awa run refuse with exit 1 before any probe, observation, cache lookup,
replay, or execution, and run explain reports the refusal. Names only,
never values; AWA_RUN is reserved; two declarations selecting one
invocation are a conflict. Passing a variable does not prove the tool used
it. Introduced in this release: older binaries reject the key as unknown.
See
awa help privacy. - When to change: Make a command whose result depends on a caller variable refuse to run, or to replay, without it.
- Command environment requirements ([[run.required_env]]). A declaration
applies only to the run whose complete argv equals argv element for
element and whose execution cwd is cwd, exactly as a validation policy
selects; it is independent of [[run.validation]] and waives nothing. Each
name is passed from the caller to that command (no env_allowlist entry
needed) and must be set to a nonempty value: an unset or empty one makes
awa run refuse with exit 1 before any probe, observation, cache lookup,
replay, or execution, and run explain reports the refusal. Names only,
never values; AWA_RUN is reserved; two declarations selecting one
invocation are a conflict. Passing a variable does not prove the tool used
it. Introduced in this release: older binaries reject the key as unknown.
See
Example:
[[run.validation]]
name = "cargo-test"
argv = ["cargo", "test"]
cwd = "."
unobserved_dirs = ["target"]
[[run.validation.identity_probes]]
name = "rustc"
argv = ["rustc", "-vV"]
[[run.required_env]]
argv = ["dotnet", "restore"]
cwd = "."
names = ["NUGET_PACKAGES"]
[gc] — Garbage collection retention
keep_last_checkpoints(int, default:100)- How many recent checkpoints gc retains.
- When to change: Keep more or fewer checkpoints.
keep_runs_for(duration, default:14d)- How long run records are retained by gc.
- When to change: Extend or shorten run history retention.
keep_restores_for(duration, default:14d)- How long a restore's pre-restore recovery observation — the evidence an applied restore can be undone from — is retained by gc. Independent of keep_runs_for.
- When to change: Keep restore undo evidence longer (or shorter) than run history.
[diff] — Content diff rendering
algorithm(enum: histogram | myers, default:histogram)- Text diff engine; histogram anchors on rare lines and falls back to myers locally.
- When to change: Force myers for a stable, classic diff.
[locks] — Writer/collector lock acquisition
timeout(duration, default:5s)- How long any interlock wait may last before the command fails with the lock-timeout exit code — including gc waiting for the exclusive collector lease another gc holds. A writer's lock is the one case that is not a wait: gc does not wait writers out, it suppresses its whole destructive pass, reports the lock as a blocked candidate, deletes nothing, and exits 0. Zero means fail fast; negative is a config error.
- When to change: Raise on busy shared checkouts, or set 0 to never wait.
[doctor] — Doctor advisories
Diagnostic only: these settings change what doctor reports, never observation, reuse, retention, or evidence identity.
store_warning_size(byte size (B/KiB/MiB/GiB/TiB) or "off", default:1GiB)- Logical bytes of the regular files under .awa/ at which plain doctor reports a non-repairable store-capacity-threshold warning (exit 0). It is not disk usage or bytes gc would reclaim. "off" disables the advisory and its sizing walk; zero is rejected.
- When to change: Raise or lower to match how much local evidence this project expects to keep, or set "off" to skip sizing.
watched_root_warning_size(byte size (B/KiB/MiB/GiB/TiB) or "off", default:off)- Logical bytes at which one watched effect root measured by
awa doctor --capacityreports a non-repairable watched-root-capacity-threshold warning (exit 0). There is no default size: "off" reports sizes without warning, and never skips a requested audit. Plain doctor does not measure these roots; zero is rejected. - When to change: Set a size when this project's generated or dependency output should stay below it.
- Logical bytes at which one watched effect root measured by
[ui] — Human presentation
Human output only; JSON always uses machine timestamps and never carries relative prose.
time(enum: relative | local | utc, default:relative)- How human output renders timestamps (log, run history). A --time flag overrides per invocation.
- When to change: Prefer absolute local or utc timestamps over relative ages.
Effect roots vs excludes
The central run-cache decision for a generated or scratch directory:
- The command writes output you need afterwards, or has side effects
(deploy, migration, formatter, live probe) →
awa run --record. A replay recreates no files, so it could report success with the output missing. - One exact check rewrites a directory whose prior contents cannot change
its result and whose files are not needed after a replay → a
[[run.validation]]policy for result-only reuse (awa help validation). Both assertions must hold; awa checks neither. - The command only reads a generated directory the run input scan no longer
sees →
[run].extra_effect_roots, so later changes to it invalidate reuse. - The input scan still sees that directory → configure nothing; its contents already key the run.
- No command's result depends on the path, even if one writes it (scratch,
logs) →
[run].extra_excludesor.awaignore.
An effect-root selector is literal, never a glob: a name such as
extra_effect_roots = ["bin"] matches at any depth, for example across
monorepo packages; a path such as ["artifacts/bin"] matches only there, not
other/bin or other/artifacts/bin.
Rules:
- Writing to a watched root during the run makes the result non-reusable, unless a matched validation policy waives that exact directory.
- The watched set is the built-in effect roots plus
extra_effect_roots. An exclude neither silences a watched root nor is watched itself, so an excluded, unwatched directory is invisible to the cache for every command. - Never exclude a real dependency to get hits: a miss is cheaper than a false hit.
- awa will not auto-edit config to improve the cache hit rate.
Pattern semantics
.awaignore, an enabled .gitignore, the extra_excludes lists, and
[checkpoint].hash_only_patterns share one case-sensitive pattern language,
Git's own ignore pattern format:
- A name without a slash (
*.log,cache) matches at any depth. A leading or inner slash anchors the pattern to the directory that declares it:foo/barand/foo/barboth match only there, neverdeep/foo/bar. Config lists are declared at the project root; a nested ignore file declares at its own directory. *and?never match a slash and?matches exactly one character.**, character classes, and backslash escapes work as in Git. A trailing slash matches directories only. Blank lines and lines starting with#are ignored, as are trailing spaces not escaped with a backslash.- The last matching rule decides, and a leading
!reverses it. - Scanning prunes an excluded directory, so a
!rule for something inside it cannot bring that back; re-include the directory itself.hash_only_patternsnever prunes: it selects among files already scanned, a matching directory selects every file below it, and a later!rule un-selects one file or a whole directory (*.envthen!fixtures/). It is matched against the project-relative path a followed symlink is reached by, and never changes what is scanned. - A pattern Git would never match (an unclosed
[, a lone trailing backslash, a bare!or/) matches nothing. In an ignore file or anextra_excludeslist awa keeps running and warns on stderr with the file and line or the key and element index, from every command that scans.awa config validatewarns about the config lists;awa doctorreports those and the root ignore files (seeawa help doctor). Inhash_only_patternsit is a configuration error: a rule that silently selected nothing would store the bytes it was written to keep out. - Each config list element is one pattern. An element containing a line
feed is a configuration error in every list; write it as separate
elements. Trailing carriage returns of an
extra_excludeselement are dropped and one inside the pattern is literal;hash_only_patternsrefuses carriage returns too. Line endings of the TOML file do not matter. awa run --excludetakes such a pattern too, not a literal path. From the project root,--exclude namematchesnameat any depth and--exclude dir/nameonly at the root;*,?,[, and a leading#or!keep their meaning. Quote the pattern so the shell does not expand it.
Other lists are not patterns:
[run].extra_effect_roots— literal selectors, never globs, in one of two forms. A single segment is a directory NAME matched by basename wherever it appears:"target"watches everytarget/. A slash-separated project-relative PATH matches that one location only:"artifacts/bin"watchesartifacts/binand neitherother/binnorother/artifacts/bin. Matching is case-sensitive and/is the separator on every platform. A backslash, a volume spelling, and a./..component are rejected in either form; a path is also rejected when it begins or ends with a slash, holds an empty component, or names.gitor.awa.
Use awa config effective to see the resolved effective lists and the layer
each value came from.