https://github.com/pronzzz/time-machine
A robust Terminal User Interface (TUI) for navigating and reverting Git states using the reflog. Built with Rust and Ratatui, it features visual timelines, live diff previews, and a "Safe Revert" mechanism that automatically stashes uncommitted changes before resetting.
https://github.com/pronzzz/time-machine
cli developer-tools git-reflog git-tools productivity ratatui rust terminal tui version-control
Last synced: 4 days ago
JSON representation
A robust Terminal User Interface (TUI) for navigating and reverting Git states using the reflog. Built with Rust and Ratatui, it features visual timelines, live diff previews, and a "Safe Revert" mechanism that automatically stashes uncommitted changes before resetting.
- Host: GitHub
- URL: https://github.com/pronzzz/time-machine
- Owner: pronzzz
- License: mit
- Created: 2026-01-13T20:11:47.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-13T20:22:39.000Z (6 months ago)
- Last Synced: 2026-06-25T12:03:48.195Z (14 days ago)
- Topics: cli, developer-tools, git-reflog, git-tools, productivity, ratatui, rust, terminal, tui, version-control
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# time-machine ⏳


[](https://crates.io/crates/git-time-machine-tui)

**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)
```bash
cargo install git-time-machine-tui
```
### Build from Source
```bash
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](https://github.com/ratatui-org/ratatui)
- **Git Backend**: [git2-rs](https://github.com/rust-lang/git2-rs) (libgit2 bindings) for high-performance operations.
## 📜 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.