git-time-machine-tui

Crates.iogit-time-machine-tui
lib.rsgit-time-machine-tui
version0.1.1
created_at2026-01-13 20:20:37.394515+00
updated_at2026-01-13 20:22:42.623192+00
descriptionA robust TUI for navigating and reverting Git reflog states safe and easy.
homepage
repositoryhttps://github.com/pronzzz/time-machine
max_upload_size
id2041127
size68,222
Pranav Dwivedi (pronzzz)

documentation

README

time-machine ⏳

Rust Ratatui Crates.io License

time-machine is a robust, fail-safe Terminal User Interface (TUI) for navigating and reverting Git states via the reflog. It turns the intimidating wall of text that is git reflog into an interactive, visual timeline associated with a "Safe Revert" mechanism.

🚀 Features

1. Visual Reflog Timeline

  • Semantic Parsing: Reflog messages are parsed into readable types (Commit, Checkout, Merge, etc.).
  • Relative Time: Timestamps are shown as humans read them (e.g., "2h 30m ago").
  • Navigation: intuitive Up/Down arrow navigation through your history.

2. Live Preview Engine

  • Diff Summary: Instantly see a diff summary of the selected state relative to your current working directory.
  • Stats: View "Files changed", "Insertions", and "Deletions" at a glance.
  • File List: A concise list of modified files.

3. Safe Revert ("Time Travel")

  • Safety Stash: The tool automatically stashes uncommitted changes before any revert action.
  • Fail-Safe: Uses git reset --hard only after securing your current work.
  • Feedback: Provides immediate confirmation of the revert and the location of your stashed changes.

🛠️ Installation & Usage

Install via Cargo (Recommended)

cargo install git-time-machine-tui

Build from Source

git clone https://github.com/pronzzz/time-machine
cd time-machine
cargo run

Controls

Key Action
/ Navigate history
Enter Safe Revert to selected state
q Quit

🏗️ Architecture

  • Language: Rust 🦀
  • UI Framework: Ratatui
  • Git Backend: git2-rs (libgit2 bindings) for high-performance operations.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 4

cargo fmt