Capture the bytes. Check the revision.

Xamidimura reads a stable file snapshot and gives Ruby applications a SHA-256 fingerprint to compare before they save.

revision_check.rbRuby
require "xamidimura"

snapshot = Xamidimura::SourceRevision
  .read("notes.md")

current = Xamidimura::SourceRevision
  .file_digest("notes.md")

if current != snapshot.digest
  # Handle the external change.
end
A comparison detects a change at that moment. Your application decides what to do next.

One small job, done precisely.

Revision primitives for editors and other apps that read files people may change elsewhere.

Stable snapshots

Read exact, frozen bytes with a filesystem signature checked before and after the read. A changing file is retried or rejected.

SHA-256 revisions

Hash in-memory bytes or a file on disk, then compare fingerprints when it is time to decide whether to save.

Your save policy

The gem observes revisions; it does not reload, merge, or write the file. The application stays in control.

Add a revision check.

Requires Ruby 3.2 or newer. No runtime gem dependencies.

Terminalgem install xamidimura
See the revision API