Skip to content

Open-source data lockfile tool

Can you prove which exact files went into this report?

Six months from now, someone asks which files your model or spreadsheet used. Lock pins every file's SHA-256 hash, size, and tool versions into one self-hashed JSON lockfile so any edit to a file or the lockfile breaks verification immediately. Your files stay on your device.

Try the lockfile check ->InstallUse in a Claude Artifact
Step 1 of 4Pin a delivery

All 3 files match their pinned SHA-256 hashes and the lockfile self-hash verified.

Every delivery file is hashed with SHA-256 and recorded alongside tool versions inside delivery.lock.json. Downstream tools (shape, rvl, verify) can check --lock before reading a single row.

lock_hash: sha256:c323ae44a6074d05334644cfefd527bc34daf2f80ab5d768f9cd266e6043c08e
FileStatusPinned SHA-256Disk SHA-256
cmbs_tape_oct.csvOKsha256:3349c6be0b9e...b6ef1csha256:3349c6be0b9e...b6ef1c
cmbs_tape_sep.csvOKsha256:c59ec909d541...cf436dsha256:c59ec909d541...cf436d
covenants.yamlOKsha256:433b6371ede1...42c1a1sha256:433b6371ede1...42c1a1

Real SHA-256 on your device · Zero uploads (works with Wi-Fi off)

Inspect delivery.lock.json (lock.v0), verify report & CLI commands
{
  "version": "lock.v0",
  "dataset_id": "cmbs-2026-10",
  "as_of": "2026-10-31",
  "created": "2026-10-31T12:00:00Z",
  "lock_hash": "sha256:c323ae44a6074d05334644cfefd527bc34daf2f80ab5d768f9cd266e6043c08e",
  "lock_hash_scheme": "exact-decimal.v1",
  "member_count": 3,
  "members": [
    {
      "path": "cmbs_tape_oct.csv",
      "size": 158,
      "bytes_hash": "sha256:3349c6be0b9e5014648899c47aa047138d744a9fdceaf39d5ff25372ebb6ef1c",
      "fingerprint": null
    },
    {
      "path": "cmbs_tape_sep.csv",
      "size": 168,
      "bytes_hash": "sha256:c59ec909d541d34a91c01a08311b331643d73a9c855185175b6988c1eacf436d",
      "fingerprint": null
    },
    {
      "path": "covenants.yaml",
      "size": 69,
      "bytes_hash": "sha256:433b6371ede167ac99415b6daa8abdcb0847064d282b3a1af84541347042c1a1",
      "fingerprint": null
    }
  ],
  "skipped": [],
  "skipped_count": 0,
  "tool_versions": {
    "vacuum": "0.6.1",
    "hash": "0.6.0",
    "lock": "0.7.1"
  },
  "note": null,
  "profiles": []
}

Pin a delivery directory

vacuum /data/oct | hashbytes | lock --dataset-id "cmbs-2026-10" > delivery.lock.json

Verify lockfile and files on disk

lock verify delivery.lock.json --root /data/oct --json

Running locally in browser memory (lock.v0 + real SHA-256): Computes real SHA-256 member hashes and canonical self-hash (lock_hash over sorted JSON with lock_hash="") in browser memory with zero uploads and swaps onto @cmdrvl/web Rust WASM automatically.

Claude Artifacts · @cmdrvl/web

Like this lockfile check? Put it in your own Claude Artifact.

Paste this prompt into Claude.ai to spin up a zero-upload data lockfile creator and offline disk-drift verifier for recurring spreadsheets or filings.

@cmdrvl/web on GitHub ->
Build an interactive React Claude Artifact called "CMD+RVL Data Lockfile Pinning & Verifier (lock)" that hashes local files with SHA-256 and pins them into a self-hashed lock.v0 JSON snapshot completely in browser memory with zero server uploads.

Follow CMD+RVL's lock.v0 contract (https://github.com/cmdrvl/web):
1. Include 3 presets (Clean 3-file delivery pinned and verified, Disk drift where one digit changes in a CSV triggering MEMBER_HASH_MISMATCH, and E_MISSING_HASH refusal when records lack bytes_hash) plus a drop zone to pin and tamper-test local files offline.
2. Compute real client-side SHA-256 digests for every file and compute lock_hash as SHA-256 over canonical sorted JSON with lock_hash set to "".
3. Lead with a concrete plain-English verdict headline, lock_hash pill, and per-file pinned vs. disk SHA-256 table; tuck --dataset-id, delivery.lock.json, and lock verify JSON inside an expandable inspector drawer.
4. Keep the hashing boundary ready to swap onto @cmdrvl/web compiled Rust WASM (sha256_hex / blake3_hex).

Works inside Claude.ai Artifacts today with real client-side SHA-256 (test it with Wi-Fi off). Compiled sha256_hex and blake3_hex Rust WASM already ship in github.com/cmdrvl/web.

Run it locally

Pipe vacuum and hashbytes into lock, then verify anytime.

lock consumes hashed JSONL records from stdin (vacuum | hashbytes | lock) and writes a single self-hashed lockfile. Pass that lockfile to downstream tools with --lock or verify it later with lock verify --root.

Recommended entry pointView cmdrvl/lock on GitHub ->

lock CLI (v0.7.1)

Pins sorted member hashes, sizes, fingerprints, skipped records, and upstream tool versions into one tamper-evident lock.v0 file and verifies self-hash + on-disk files with lock verify.

1. Install via Homebrew

brew install cmdrvl/tap/lock

2. Run locally

vacuum /data/oct | hashbytes | lock --dataset-id "cmbs-oct" > delivery.lock.json
Self-hashed format
lock.v0 canonical JSON with exact-decimal.v1 SHA-256 lock_hash
Two-level verify
Checks lockfile self-hash plus optional --root on-disk files
Runs locally
On your device · Works offline with zero uploads
Downstream --lock
Verified directly by shape, rvl, verify, coverage, and pack
For scripts and CI: standalone lock binary, exit codes, and refusal codes

Verify lockfiles and pass --lock downstream

View cmdrvl/cmdrvl on GitHub ->

Verify lockfile integrity and on-disk bytes in CI with lock verify --root, or pass --lock into shape, rvl, verify, and cmdrvl ground so downstream runs refuse immediately on E_INPUT_DRIFT.

Install standalone binary

curl -fsSL https://raw.githubusercontent.com/cmdrvl/lock/main/scripts/install.sh | bash

Invoke directly

lock verify delivery.lock.json --root /data/oct --json

Exit codes & verdicts

LOCK_CREATED

Exit 0

Every input record was pinned into members with zero skipped records, and lock_hash was computed over canonical JSON.

LOCK_PARTIAL

Exit 1

A valid self-hashed lockfile was created, but one or more upstream records carried _skipped: true and were recorded explicitly in skipped[] so automation handles partial deliveries.

REFUSAL

Exit 2

Input could not be pinned (for example E_MISSING_HASH when records were not hashed with hashbytes first, malformed JSONL, or unreadable lockfile during verify).

Common refusal & finding codes

CodeWhen it firesRemediation
E_MISSING_HASHInput JSONL records lack bytes_hashRun hashbytes upstream: vacuum <DIR> | hashbytes | lock
E_BAD_INPUTInput stream is not valid JSONL or misses required fieldsGenerate manifest records with vacuum | hashbytes
SELF_HASH_MISMATCHLockfile bytes were altered after lock_hash was computedTreat lockfile as tampered and inspect upstream provenance
MEMBER_HASH_MISMATCHA pinned file on disk no longer hashes to bytes_hash under --rootInvestigate silent file drift before running downstream checks
MEMBER_MISSINGA pinned member file no longer exists under --rootRestore the pinned artifact or cut a new versioned delivery lock

Learning progression

Inputs pinned? Compare them next or seal the full pack.

Once lock pins your incoming files into delivery.lock.json, pass --lock into shape, rvl, and verify so downstream runs refuse if source bytes drift, then seal everything with pack.

  1. 01rvlSee what moved
  2. 02shapeCheck compatibility
  3. 03profileScope columns
  4. 04verifyEnforce rules
  5. 05packSeal proof
  6. 06veilGuard privacy

Upstream · hashbytes

Compute streaming SHA-256 or BLAKE3 byte hashes first.

Pipe vacuum directly into hashbytes to attach deterministic bytes_hash fields before lock pins the snapshot.

Back to hash & live hasher ->

Next step · 05 pack

Seal your lockfile and reports into an immutable pack.

Combine delivery.lock.json with shape, rvl, and verify reports into one closed-set SHA-256 bundle verifiable offline.

Continue to pack & tamper test ->

What lock handles

  • Pins sorted artifact paths, byte sizes, SHA-256/BLAKE3 hashes, fingerprints, and upstream tool versions in one lock.v0 JSON file
  • Self-hashes canonical JSON (exact-decimal.v1) into lock_hash so any edit to the lockfile invalidates verification
  • Verifies both lockfile integrity and on-disk member files in one command (lock verify --root)
  • Tracks skipped upstream records explicitly in skipped[] and exits 1 (LOCK_PARTIAL) so omissions never hide silently
  • Integrates via --lock with shape, rvl, verify, coverage, and pack seal
  • Supports --describe, --schema, capabilities --json, and doctor triage --json for AI coding agents

Explicit boundaries & limits

  • Pinning inputs proves byte identity and integrity; it does not prove that the values inside a file are factually accurate.
  • lock consumes pipeline JSONL from stdin rather than bare file paths (use pack seal to bundle standalone artifacts directly).
  • lock_hash is tamper-evident via self-hashing rather than asymmetric signing (pair with pack or airlock signing when identity attestation is required).
  • Lock-to-lock diffing is outside scope in v0 (use pack diff to compare sealed bundles).
Cairn roles
Software factory
Evidence roles
Source, Later verification
Contribution
Pin artifacts, fingerprints and tool versions in a snapshot whose integrity can be checked.
Limit
Pinning inputs preserves their identity; it does not prove they are correct.
Questions this tool can support
  • Can I keep the records behind this comparison?

    Pin selected artifacts and tool versions before handing off an analysis. A pinned snapshot preserves identity, not correctness.

    Potential use, not demonstrated here

Open-source starter -> Paid lineage stack

Start free on local files. License the paid stack for warehouse-wide lineage.

Open-source Rust CLIs and @cmdrvl/web browser engines cut document token spend 10x to 100x locally and work alongside any AI assistant or hosted workspace (Rogo, Hebbia, Harvey, Claude, ChatGPT, or Codex). When your firm needs end-to-end lineage across Snowflake or your cloud warehouse (Reveal catalog, paid MCP servers, Evidence MCP receipts, x402 APIs, and offline twinning and evals), license the paid stack or start with a $500 half-day founder workshop.

Complete open-source CLI suite (17 interactive offline demos)

Explore every deterministic tool in the spine.

Full /tools/ directory ->github.com/cmdrvl ->

Intake & identity

  • vacuumInventory folders
  • hashSHA-256 / BLAKE3
  • fingerprintClassify files
  • lockcurrent
  • canonResolve entities

Common questions

How is lock different from pack?
lock sits at the end of the intake stream (vacuum | hashbytes | lock) and pins your input dataset into one self-hashed JSON lockfile. pack seal bundles that lockfile together with downstream reports (shape, rvl, verify) into a closed-set directory with one pack_id.
What happens if someone edits one byte of a file after locking?
Running lock verify delivery.lock.json --root /data/ (or passing --lock to shape, rvl, or verify) recomputes the file's hash, detects MEMBER_HASH_MISMATCH / E_INPUT_DRIFT immediately, and stops before bad data enters downstream reports.
Why does lock exit 1 on LOCK_PARTIAL?
If an upstream step could not read a file and marked it _skipped: true, lock records it explicitly in skipped[] instead of silently dropping it and exits 1 so scripts handle incomplete deliveries deliberately.
Does the browser lockfile demo upload my files?
No. Both SHA-256 file hashing and canonical lock_hash computation run locally in browser memory. Turn off your Wi-Fi before Step 4 and every check still works.

Related tools & reading

vacuum: Inventory files read-onlyhash: Streaming SHA-256 & BLAKE3 hashingpack: Seal tamper-evident evidence packsshape: Check if two spreadsheets still line upAll open-source CLIs & paid stack