o
odin.langpkg.dev
packages / library / DiffView

DiffView

c50427flibrary

No description provided.

MIT · updated 5 months ago

diff_view

A file-watching tool that captures snapshots of file changes over time and lets you browse them in a visual diff viewer. Written in Odin.

diff_view runs as two components: a server that watches a directory for changes and records snapshots to disk, and a UI that lets you browse sessions, navigate the file tree, and view diffs between any two snapshots of a file.

Requirements

Building

# Debug build
./build.sh

# Release build (optimized, no bounds checks)
./build.sh -release

# Clean build artifacts and session data
./build.sh clean

The binary is output to build/diff_view.

Usage

1. Start the server

The server watches a directory and records snapshots:

diff_view -server /path/to/project

Optionally name the session:

diff_view -server /path/to/project -session=my-feature

Leave it running while you work. Press Ctrl-C to stop.

2. Open the UI

Browse recorded sessions and view diffs:

diff_view -ui /path/to/project

The UI opens a window where you can:

  • Select a session from the list
  • Click directories in the file tree to expand/collapse
  • Click a file to view its diff
  • Drag the timeline markers to compare any two snapshots
  • Use the search box to filter files by name
  • Toggle "Changed" to hide files with no modifications
  • Cmd+/Cmd- to increase/decrease font size, Cmd+0 to reset

License

MIT