CLI tool
trasta298/keifu avatar
trasta298/keifu

keifu: A TUI That Makes Git Commit Graphs Readable in Narrow Terminals

Git genealogy, untangled. A TUI for navigating commit graphs with color and clarity.

803 stars24 forksRustMIT

At a glance

What is it?
keifu is a Rust-based terminal UI that renders Git commit graphs with per-branch colors and supports everyday operations like checkout, staging, and push. It targets developers who work in split panes and want a mouse-driven alternative to git log --graph.
Who is it for?
Adopt keifu if you live in a terminal, work on multiple branches in parallel, and need a readable commit graph in narrow windows. Skip it if you require hunk-level staging, operations beyond the basic set, or if you cannot run a TUI that captures mouse input.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 47 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The Problem: git log --graph Is Hard to Read

The README states that git log --graph is hard to read, and keifu exists to render a cleaner, color-coded graph. The motivation section also mentions the rise of vibe coding, where working on multiple branches in parallel has become common. That context frames keifu as a tool for developers who switch branches frequently and want visual feedback. The tool is not a full-featured Git client. It supports only basic operations: checkout, create and delete branch, fetch, stage and unstage, commit, and push. If you need rebase, cherry-pick, or interactive staging, keifu is not for you. The target user is someone who wants a quick, visual way to navigate the commit graph and perform routine actions without leaving the terminal.

How the TUI Is Organized: Panes, Colors, and Mouse

keifu presents a commit list with branch labels, date, author, short hash, and message. Some fields hide on narrow terminals, which aligns with the narrow-terminal-friendly goal. A commit detail panel shows the full message and changed file stats with plus and minus counts. Pressing Space opens a file diff view with syntax highlighting and word-level change emphasis. The interface uses per-branch colors for the Unicode commit graph. Mouse support is prominent: clicking selects commits and files, double-click opens the file list or diff, clicking a pane focuses it, and clicking a status bar hint runs that action. Wheel scrolling scrolls the pane under the cursor. The README notes that keifu captures mouse input, so native text selection requires a modifier like Shift+drag, or Fn+drag on iTerm2. That is a real trade-off for users who frequently select text in the terminal.

Getting It Running: Install and Basic Usage

Installation options include cargo install keifu, mise use -g github:trasta298/keifu@latest, and brew install trasta298/tap/keifu. Building from source requires a Rust toolchain and the git command in PATH for fetch and push. You run keifu inside a Git repository, and it auto-discovers the repository from the current directory. The basic usage is simply keifu. Configuration options live in docs/configuration.md, though the README does not summarize them. The tool requires a terminal with Unicode line drawing support and color. That is a concrete constraint: if your terminal lacks Unicode support, the graph rendering will likely break.

Everyday Git Operations: Keybindings That Match the Task

The keybindings are organized around navigation and Git actions. j and k move up and down, Tab switches pane focus, and ] and [ jump to the next or previous commit that has branch labels. The h and l keys select left or right branch when multiple branches point to the same commit. @ jumps to HEAD. Enter checks out the selected branch or commit. b creates a branch at the selected commit, d deletes a local branch that is not HEAD, f fetches from origin, c commits staged changes, and p pushes the current branch. Staging keys work only when the uncommitted changes row is selected. s stages or unstages a file, a stages all, u unstages all, and c commits. The README stresses that staging works per file, not per hunk, and commits include only staged changes, like plain git commit. That is a clear limitation if you are used to git add -p.

Search and Diff Navigation: Fuzzy Branch Search and Hunk Jumps

Pressing / opens an incremental fuzzy search over branches. Arrow keys or Ctrl+k and Ctrl+j select results, Enter jumps to the selected branch, and Esc cancels. The file diff view has its own navigation: j and k scroll, h and l scroll horizontally, Ctrl+d and Ctrl+u scroll half a page, Ctrl+f and Ctrl+b scroll a full page. ] and [ jump to the next or previous hunk, and n and N jump to the next or previous file. The 0 key scrolls to the line start. These bindings suggest keifu aims to replace a pager like less for diff reading. The word-level change emphasis is a feature that plain git diff does not offer, and it may help when reviewing small edits in a commit.

Limits and Failure Modes: 500 Commits, 50 Files, and Remote Branches

The TUI loads up to 500 commits across visible branches. That is a hard cap, and it means large repositories will show only the most recent portion of history. Merge commits are diffed against the first parent, which can understate changes in a merge. The initial commit is diffed against an empty tree. Changed files are capped at 50, and binary files show no line stats. The uncommitted changes row appears only when there are staged, unstaged, or untracked changes. When multiple branches point to the same commit, the label collapses to a single name with a +N suffix, for example main +2. You use h and l to switch between them. Checking out origin/xxx creates or updates a local branch. Upstream is set only when creating a new branch. If the local branch exists but points to a different commit, it is force-updated to match the remote. That force-update behavior is worth noting: it can discard local commits if you are not careful. Delete operations work only with local branches, and fetch and push require the origin remote to be configured.

Terminal-Specific Quirks: Ghostty Scroll and Clipboard

The README mentions a known issue with Ghostty: it fans one wheel notch out into multiple scroll events for mouse-mode apps, which can scroll a few extra lines per notch. The workaround is to lower mouse-scroll-multiplier in the Ghostty config. That is a specific, actionable fix. Clipboard operations use OSC 52: y copies the commit hash and Y copies the branch name. OSC 52 support varies by terminal, so the copy feature may not work everywhere. The README also mentions a remote-control debug server and file logging for agent-driven debugging, documented in docs/debugging.md. That is an unusual feature for a TUI and suggests the author intends keifu to be scriptable or debuggable in automated environments. The README does not explain how to enable the debug server, so you would need to read the docs.

Alternatives: What Else Handles Commit Graphs in the Terminal

The obvious alternative is git log --graph, which keifu explicitly tries to improve. git log --graph is built into Git, requires no installation, and handles arbitrarily large histories, but its ASCII graph is hard to read with many branches. Another alternative is a full Git GUI like GitKraken or SourceTree, which offer richer operations like rebase and hunk staging, but they are not terminal-based and do not fit in a narrow split pane. There are also other TUI Git clients, such as lazygit, which provides a broader set of operations including rebase and interactive staging, but lazygit focuses on a file-centric workflow rather than a commit-graph-centric view. keifu's differentiator is the color-coded Unicode graph and the emphasis on branch switching, which matches the multi-branch workflow described in the motivation. If you need rebase or hunk staging, lazygit or a GUI is a better fit.

Maintenance and License: MIT and Recent Releases

The project is licensed under MIT, which is permissive and allows commercial use, modification, and redistribution, with the requirement to include the original copyright notice. The repository is not archived, and the latest release, v0.6.0, was pushed on 2026-07-30. There are three releases listed, with v0.5.0 and v0.4.0 from June 2026. The release cadence suggests active development, but the README does not include a changelog or upgrade notes. The tool depends on the ratatui library, as indicated by the badge in the README. Upgrading keifu is straightforward with cargo install keifu or the package manager you used, but you should check the release notes for breaking changes, especially if you rely on configuration options. The configuration file is documented in docs/configuration.md, but the README does not summarize the keys, so you need to read that file to understand what you can customize.

Editorial conclusion

Adopt keifu if you live in a terminal, work on multiple branches in parallel, and need a readable commit graph in narrow windows. Skip it if you require hunk-level staging, operations beyond the basic set, or if you cannot run a TUI that captures mouse input. Before adopting, verify that your terminal supports Unicode line drawing and color, and test the Ghostty scroll workaround if you use that terminal. Also confirm that your Git workflow does not depend on editing commit messages beyond the dialog keifu provides.

Official sources

  1. Official README
  2. Project repository
  3. Release notes
Community notes

Community notes