Configuration
.undomap.json
Optional, at the root you map (or pass --config file). It tells undomap what it can't detect.
{
"permanent": ["build/atlas/", ".cache/models/", "vendor/patched/"],
"regenerable": ["generated/", "*.parquet", "data/cache/**"],
"backedUp": ["media/", "Rushes/"]
}
permanent: paths that can't be rebuilt even though they look like they can: a hand-tuned folder underbuild/ordist/, model weights in.cache/models/, a vendored patch, a prebuilt binary with no source. They're graded Zone VE with the reason "looks regenerable (…) but .undomap.json marks it permanent", and the JSON finding carries"forcedBy": "<pattern>". A permanent folder inside a regenerable one is carved out as its own place, so.cache/stays Zone AE and.cache/models/shows up in Zone VE with its own bytes.regenerable: paths your scripts rebuild. They're graded Zone AE.backedUp: paths you back up some other way (restic, borg, rsync to a NAS, a versioned bucket). They're graded Zone AE with the reason "backed up per .undomap.json".
Precedence
When rules disagree, the first one that applies wins:
- What git knows. Clean tracked files are Zone X and uncommitted edits or unpushed commits are Zone AE, whatever the config says.
permanentcan't make git forget a commit. - Real coverage.
backedUp, a snapshot that covers the path, and cloud version history undomap could verify move it to Zone AE, even if it's alsopermanent: a copy really exists somewhere else. The reason says both ("marked permanent, but backed up per .undomap.json"). permanentbeats every "regenerable" guess: built-in folder names (dist,.cache,vendor…), content markers (pyvenv.cfg,CACHEDIR.TAG, ELF/Mach-O/PE headers) and your ownregenerablelist. If a path is on both of your lists,permanentwins.- Regenerable (built-in or yours): Zone AE.
- Everything else git doesn't hold: Zone VE.
Pattern rules: dir/ matches that directory at any depth, or anchored if it contains another slash (a/dir/). *.ext matches a basename. a/**/b matches across directories. Unknown keys are an error, so a typo can't silently grade your data as safe.
Flags
| Flag | Default | |
|---|---|---|
--fix | off | fix under every Zone VE place (otherwise only the biggest) |
--json / --markdown | text | output format |
--all | top 12 | list every Zone VE place |
--max-permanent <size> | 0 | permanent bytes allowed before exit 1: 512KB, 10MB, 1.5GB |
--config <file> | <path>/.undomap.json | config file |
--reach | off | add the credential reach section: live credentials + network + writes outside the tree. Names and paths only, never values. Doesn't change the exit code |
--no-probe | probe | skip snapshot and cloud-sync probes (UNDOMAP_CLOUD=off skips only the cloud one) |
--no-color | auto | also NO_COLOR=1. FORCE_COLOR=1 forces color in pipes |
Exit codes
0 | nothing in Zone VE (or under --max-permanent) |
1 | something in Zone VE |
2 | usage error, unreadable root, invalid config |
Next sheet: Reference