Skip to content

Repository files navigation

tuit

img-001

tuit is a terminal-based Git log viewer built with Rust and ratatui.

It opens the Git repository at the current directory and displays a scrollable list of commits on the current branch. Select a commit to view its full body and diff in an overlay. All operations are keyboard-driven.

Installation

From crates.io

cargo install tuit-bin

Prerequisites

  • Rust toolchain (edition 2024, Rust 1.85+ recommended)

Build from source

git clone https://github.com/yoshikikudo/tuit.git
cd tuit
cargo build --release

The binary will be placed at target/release/tuit. Copy it to a directory in your $PATH if desired.

Usage

Simply run tuit inside a Git repository.

cd /path/to/your/repo
tuit

Key bindings

Commit list

Key Action
/ k Move cursor up
/ j Move cursor down
Enter Open detail for the selected commit
h Open the selected commit in hunk
q Quit tuit
? Open help overlay

Commit detail (overlay)

Key Action
/ k Scroll up
/ j Scroll down
Ctrl+f / PageDown Scroll down one page
Ctrl+b / PageUp Scroll up one page
Esc Close detail and return to list
h Open the viewed commit in hunk
? Open help overlay

Display

  • Commit list: Shows abbreviated hash (7 characters), commit subject, author name, and relative timestamp (3d ago / 2h ago etc.) for each commit.
  • Commit detail: Shows the selected commit's hash, author, date, full body, and a colorized unified diff. Added lines, deleted lines, and context lines are each color-coded.
  • Live sync: Polls the Git repository every 2 seconds while running, automatically detecting new commits and HEAD changes. When HEAD moves, the footer turns solid blue with a centered notification. The commit list is automatically reloaded.
  • Error screen: Shows an error message when run outside a Git repository, inside an empty repository, or against a broken .git directory.

Configuration

Place your config file at ~/.config/tuit/config.toml. Theme files go under ~/.config/tuit/themes/.

Config example (~/.config/tuit/config.toml)

theme = "monokai"
poll_interval_ms = 3000
notification_timeout_ms = 5000
Field Description Default
theme Theme name ("default" or a filename under themes/) "default"
poll_interval_ms Git polling interval (milliseconds) 2000
notification_timeout_ms Footer notification display duration (milliseconds) 3000

Themes

The default theme is a dark theme based on Catppuccin Mocha. To customize, create a theme file at ~/.config/tuit/themes/<name>.toml and set theme = "<name>" in your config.

Customizable fields:

  • cursor_bg, cursor_fg — selected row highlight colors
  • list_bg — list view background
  • hash, message, author, date — field-specific text colors
  • detail_bg, detail_border — detail overlay background and border
  • detail_heading, detail_value — detail heading and value colors
  • diff_add, diff_del, diff_normal — diff line colors (added, deleted, context)

Tech stack

License

MIT License — see LICENSE for details.

About

a niche TUI application related to git

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages