Skip to main content

Snapshot a directory tree and diff what changed - no git required. Built for humans and agents.

Project description

tidemark

Snapshot a directory tree and diff exactly what changed - no git required.

A tidemark is the line a receding tide leaves behind, recording the level the water reached so you can see how things stood before. tidemark does the same for a directory: leave a mark, do anything, then see precisely what was added, modified, deleted, or renamed.

It scores 100/100 against The CLI Spec: structured output, schema introspection, clean stdout/stderr separation, non-interactive by default, idempotent operations, and bounded output. Excellent for humans at a terminal and for AI agents in a pipeline.

Why

"What did that command actually do to my files?" is a question without a good answer today. git needs a repo and pollutes the tree; fsdiff was archived; copy-based tools need two full copies. tidemark is a small, deterministic (BLAKE3) witness that answers it in one bounded call.

Install

cargo install tidemark
brew install rvben/tap/tidemark

Quick start

Human workflow with a labeled checkpoint:

tidemark snap before        # checkpoint the current tree
make install                # do the risky thing
tidemark diff before        # colored table of what changed

Agent / CI workflow with a portable manifest:

tidemark snap -o pre.tidemark        # write a manifest file (use - for stdout)
./run-some-tool
tidemark diff pre.tidemark @ --json  # bounded JSON delta in one call

Commands

Command Description
tidemark snap [LABEL] Snapshot the tree. LABEL stores it under .tidemark/; -o FILE writes a portable manifest (- = stdout).
tidemark diff [A] [B] Diff two refs. A ref is a label, a manifest file, or @ (current tree). tidemark diff before means before vs @.
tidemark list List stored snapshots. Also the default when no command is given.
tidemark show REF Print a manifest.
tidemark rm LABEL... --yes Delete stored snapshots.
tidemark init Create the .tidemark/ store in the current directory (idempotent).
tidemark schema Emit the clispec schema describing every command and output field.

Useful flags

  • snap: --path DIR, --ignore GLOB (repeatable), --hidden, --no-ignore, --no-content (smaller manifest, disables content diffs), --force (overwrite a label whose tree differs).
  • diff: --content (real unified line diffs for text files), --only added,modified,deleted,renamed, --exit-code.
  • Global (accepted on any command): --output json|table (defaults to JSON when piped, a table on a TTY), --json (shorthand for --output json), --quiet (suppress the stderr summary), --yes (confirm destructive ops), and the bounded-output flags --limit N, --offset N, --fields a,b for list and diff.

What counts as a change

Each entry records its BLAKE3 content hash, size, Unix mode, and symlink target. A file is modified when its content, mode, or symlink target changes. A rename is detected when a deletion and an addition share the same content hash and mode (and the pairing is unambiguous - duplicate-content files stay as plain add/delete). mtime is recorded for information but never triggers a change, so touch and rebuilds do not create false positives.

Small UTF-8 files (up to 256 KiB) also store their text inline so diff --content can show real before/after line diffs, even between two stored manifests. Pass --no-content to skip this.

Output

Snapshots of an unchanged tree produce an identical tree_digest - that is the idempotency signal. diff JSON is a flat object with summary counts and a bounded changes array; list uses the standard envelope:

{ "items": [ ... ], "total": 3, "limit": null, "offset": 0 }

Exit codes

  • Default: 0 success, 2 error.
  • With --exit-code (the diff(1) convention): 0 no changes, 1 changes found, 2 error.

Errors are written to stderr as {"error": {"kind": "...", "message": "...", "retryable": <bool>}}. Kinds: not_found, conflict, invalid_input, io (retryable), unsupported.

See AGENTS.md for the agent-focused contract.

Development

All CI steps are make targets, so the pipeline only runs make:

make check   # fmt-check + clippy (-D warnings) + tests + doctests
make score   # build release and score against clispec
make ci      # check + score

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidemark-0.1.2.tar.gz (54.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tidemark-0.1.2-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

tidemark-0.1.2-py3-none-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

tidemark-0.1.2-py3-none-manylinux_2_28_aarch64.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

tidemark-0.1.2-py3-none-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

tidemark-0.1.2-py3-none-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file tidemark-0.1.2.tar.gz.

File metadata

  • Download URL: tidemark-0.1.2.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tidemark-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5d7d1734ef6afc21c623d0eeff18365b0314be5b6ab9811bd2d341a7d8b2d145
MD5 cedc073a603a8dbc8ce3832525f5d72b
BLAKE2b-256 dde44f1897ffddd4e2978ac962f1894584101137a5956212c452d86b71567794

See more details on using hashes here.

File details

Details for the file tidemark-0.1.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: tidemark-0.1.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tidemark-0.1.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4af4e158e51204adf797b34872f4ae67370f57b80e0078da0f366357bdb540b6
MD5 e4bf14b8e0673d1ca79108e6910ad97b
BLAKE2b-256 6c26137dbdf3510cc65528b085e23c8034b076d016741d1a1e8cac678275d7c7

See more details on using hashes here.

File details

Details for the file tidemark-0.1.2-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tidemark-0.1.2-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a95c964479f75af3610dd103a6cee4188f61581374292abb9879c0be8ea3b259
MD5 0552e27262c3698ef965c8a4be9e0d9f
BLAKE2b-256 1c8f62eb25fcddccea457664af61af321025fe22140768d7d81c05af777b1c87

See more details on using hashes here.

File details

Details for the file tidemark-0.1.2-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tidemark-0.1.2-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 afa64880e46a119828ee9a7d0d3c2daa4bc42ed8c3948189e2ba2b0c15463786
MD5 6c2fa2237aa748cf43e4c1e6488fa2cf
BLAKE2b-256 5e982bec1adc6bce91538d591c7c9fe3c500e2649be13ccb08092c8adcf60cbd

See more details on using hashes here.

File details

Details for the file tidemark-0.1.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tidemark-0.1.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59bd844d5bc89c7fc8e9649f51006a000c474bf0f51a64b213c556f0e30b2074
MD5 4f156f5af5f806cf41c14f78ad12384b
BLAKE2b-256 746f6861b7740b9cda5edea2dfa2468d24f36e8ea91144f79e20dcd0d37730d0

See more details on using hashes here.

File details

Details for the file tidemark-0.1.2-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tidemark-0.1.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d4f3f9927af4eb008217a7bad9ce14e79f0d753b6fc01db1ce88364d76188ff2
MD5 0f0fafa5d92b15a7067f8ddfb6711d58
BLAKE2b-256 5ed9736abe1e914fbbb72e8f889659474b99fe29b4f837a6cdbd7484568b8500

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page