dev-tools 4 min read

unf – Filesystem Flight Recorder for AI Agents

unf watches your directories and snapshots every file change automatically, letting you rewind to any second in time. Built for the AI agent era where a single errant write can wipe hours of work.

By
Share: X in
unf filesystem flight recorder product thumbnail

TL;DR

TL;DR: unf is a background daemon that watches directories you specify and snapshots every text file on every save, storing versions in an object store with SQLite metadata. It gives you a git-like CLI — unf log, unf diff, unf restore — to rewind any file to any point in time, even between commits. Built because the author lost hours of hand-edits when an AI agent terminal accidentally overwrote a handful of files.

What Is unf?

unf — pronounced “UN-EF” — is a local-first filesystem flight recorder. Unlike version control systems that require manual snapshots, unf runs as a background daemon and continuously records every file change you make. When something goes wrong — an errant rm -rf, a botched AI agent edit, or just a mistake you made hours ago — you can rewind to any second.

The tool skips binaries and respects .gitignore if one exists. The interface borrows from git, so it feels familiar:

unf log        # view change history
unf diff       # see what changed
unf restore    # rewind to a specific point

The project site is at unfudged.io.

Source and Accuracy Notes

⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.

Why Was This Built?

The author built unf after pasting a prompt into the wrong AI agent terminal and watching it overwrite hours of hand-edits across several files. Git couldn’t help — the work wasn’t committed yet. The author wanted something that recorded every save automatically so they could rewind to any point in time, and something that made it difficult for an agent to permanently screw anything up, even with an errant rm -rf.

How It Works

Architecture

unf runs as a background daemon that watches directories you choose via CLI. On every save, it snapshots the full contents of every text file in watched directories. Internally:

  • Object store — file contents are stored as objects
  • SQLite — metadata tracking (timestamps, paths, versions)
  • UI — included to explore history through time

The tool respects .gitignore and skips binary files automatically.

Commands

The CLI mirrors git so it should feel familiar:

# Start watching a directory
unf watch ./my-project

# View history of changes
unf log

# See what changed between two points
unf diff <ref1> <ref2>

# Restore a file to a specific version
unf restore <file> <version-ref>

Practical Evaluation Checklist

  • Local-first — all data stays on your machine
  • Works with any text file, not just code
  • Skips binaries and respects .gitignore
  • Git-like CLI (log, diff, restore) is immediately familiar
  • SQLite for metadata means low overhead
  • Includes a UI for browsing history visually
  • Useful in the AI agent era — agents write files constantly and can easily overwrite your work

Security Notes

  • All data is stored locally — no cloud sync, no external servers
  • The daemon only watches explicitly specified directories
  • Respects .gitignore to avoid snapshotting build artifacts or secrets

FAQ

Q: How is this different from git commits or wip branches? A: Git requires manual commits. unf records every single save automatically, so you have a continuous timeline rather than discrete snapshots. You can rewind to “5 minutes ago” or “that time before lunch” without remembering to commit.

Q: How is this different from jujutsu (jj)? A: jujutsu is a version control system with a different UI for git. unf is a filesystem-level recorder that watches outside the git model — it captures changes even in uncommitted working tree files, which git cannot track without explicit staging.

Q: Does this replace git? A: No. unf is a safety net for unsaved work. Use git for tracked, committed history; use unf for the moments between commits.

Q: Is the source code available? A: Yes — the HN thread notes “source available” and the site links to the source. Check the project page for the repository link.

Conclusion

unf fills a gap that git and every other VCS leaves wide open: the崩溃 of work between commits. In an era where AI coding agents write and rewrite files constantly, having a continuous flight recorder for your filesystem is less optional — it’s essential. The git-like interface makes it immediately usable without learning a new mental model.

If you’ve ever had an agent overwrite hours of work, or found yourself unable to recover from a bulk find-and-replace that went wrong, unf is purpose-built for exactly that failure mode. It’s local-first, open source, and takes seconds to start watching a directory.