🌿 fileintegrity v1.0.0 · MIT

A hash-baseline drift guard for critical files — know the moment a file that must not change silently, changed silently.

Why this exists

Identity documents, configs, scripts, contracts: any set of files that must not change silently deserves the same treatment databases get. fileintegrity records a manifest of hashes once (init), then verifies at any time (check) that the watched files are unchanged — reporting changed, missing, and optionally newly added files under the watched roots.

The manifest is plain JSON ({version, algo, roots, files}) — commit it next to what it protects.

Install (pip, v1.0+)

pip install fileintegrity @ git+https://mandrilly.com/git/fileintegrity.git

Zero runtime dependencies — Python ≥ 3.9, standard library only.

Quick start

fileintegrity init core/*.md docs/*.md --manifest core.sha256
fileintegrity check --manifest core.sha256   # 0 intact · 1 drift · 2 input error
fileintegrity update --manifest core.sha256  # re-sign after legitimate edits
fileintegrity check --json                   # machine-readable (cron-friendly)

Directories can be watched with --recurse; the hash algorithm defaults to sha256 (--algo to change).

Source

git clone https://mandrilly.com/git/fileintegrity.git

8 unit tests cover init/check/update round-trips, changed/missing/added detection, recursive watching, missing-manifest error path, and CLI smoke. End-to-end proof: fresh venv → pip install from this URL → intact + drift runs verified.