trasta298/keifu

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

Rust

811

197 commits

updated Oct 12, 2026

See the code

README

🧬 keifu

Crate Status Built With Ratatui

日本語版はこちら

See your branches. Follow your changes. Stay in the terminal.

keifu (系譜, /keːɸɯ/, “genealogy”) is a Git TUI for working across branches. Explore a color-coded commit graph, inspect diffs, and stage, commit, and push changes with the keyboard or mouse.

keifu showing parallel branches, merge history, commit details, and changed files

  • Follow the graph — See where branches diverge and merge, with local branches, remotes, and tags in one view.
  • Inspect the change — Open a file diff with syntax highlighting and word-level change emphasis.
  • Keep work moving — Search and switch branches, stage files, write a commit, and push to origin.
  • Fit your workspace — Use keyboard shortcuts, click and scroll each pane, or run in a narrow terminal split. No image protocol required.

The pane-preserving diff layout and drag-to-copy shown or described below are available in v0.7.0 and later.

Installation

From crates.io

cargo install keifu

With mise

mise use -g github:trasta298/keifu@latest

With Homebrew

brew install trasta298/tap/keifu

From source

git clone https://github.com/trasta298/keifu
cd keifu
cargo install --path .

Get started

Run inside a Git repository (or one of its subdirectories):

keifu
  1. Move through commits with ↑ / ↓ or j / k, or click a row.
  2. Press Space to select a changed file, then Enter to open its diff.
  3. Press Esc to go back. Use / to find a branch, and ? for help.

You need a terminal with Unicode and color support, and git in your PATH for fetch/push. Cargo installation and source builds also need the Rust toolchain.

A quick tour

Read the diff with its context

See added and removed lines, syntax highlighting, and changes within a line. Use n / N to move between files and ] / [ to jump between hunks.

A Rust file diff with highlighted changes, commit details, and the file list still visible

File diffs open fullscreen by default. The layout above keeps commit details and the file list visible:

keifu --file-view replace

Stage files and commit

Select uncommitted changes, press Space, then use s to stage or unstage a file. a stages everything; u unstages everything. Press c to write a commit message, then p from the graph to push the current branch to origin.

Three changed files with one staged file and keyboard hints for staging and committing

Staging is per file. A commit includes only staged changes.

Find the branch you need

Press / and type part of a branch name. Fuzzy search filters the dropdown as you type; Enter jumps to the selected result in the graph. Press Enter again from the graph to check it out.

Branch search filtering the graph's branches as a query is typed

Keep it beside your editor

On narrow terminals, the detail panes stack vertically and less essential commit metadata is hidden to leave room for the graph and messages.

keifu in a 54-column terminal with stacked commit details and changed files

Use the mouse, too

Click a commit or file to select it; double-click to open its files or diff. Scroll the pane under the pointer, or click the action hints in the status bar. Drag across visible text within a pane and release to copy it via OSC 52 (requires terminal clipboard support).

Configuration

Set defaults in ~/.config/keifu/config.toml:

[ui]
file_view = "replace"

By default, keifu refreshes local state every 10 seconds and fetches from origin every 60 seconds. See the configuration guide to adjust or disable automatic updates, or change remote and tag visibility.

Keybindings

Press ? in the app for help.

Full keyboard and mouse reference
KeyAction
j / ↓Move down (scrolls the detail pane when focused)
k / ↑Move up (scrolls the detail pane when focused)
TabSwitch pane focus (graph / commit detail)
]Jump to next commit that has branch labels
[Jump to previous commit that has branch labels
h / ←Select left branch (same commit)
l / →Select right branch (same commit)
Ctrl+dPage down
Ctrl+uPage up
g / HomeGo to top
G / EndGo to bottom
@Jump to HEAD (current branch)
SpaceOpen changed file list

Git operations

KeyAction
EnterCheckout selected branch/commit
bCreate branch at selected commit
dDelete branch (local, non-HEAD)
fFetch from origin
cCommit staged changes (opens message dialog)
pPush current branch to origin

File list (Space) / staging

Staging keys work when the "uncommitted changes" row is selected.

KeyAction
j / kSelect file
EnterOpen file diff
sStage / unstage selected file
aStage all changes
uUnstage all changes
cCommit staged changes
Esc / qBack

Mouse

InputAction
Click on a commit rowSelect commit (double-click opens the file list)
Click on a file rowSelect file (double-click opens the diff)
Click on a paneFocus the pane
Click on a status bar hintRun that action
Wheel scrollScrolls the pane under the cursor
Left dragSelect visible text within a pane; release to copy (OSC 52)

Clicks and double-clicks run on release, so dragging does not activate them. Selection covers visible text only; scrolling or changing the view clears it. Your terminal's native selection remains available with its modifier (usually Shift + drag; Fn + drag on iTerm2).

Note: Ghostty currently fans one wheel notch out into multiple scroll events for mouse-mode apps (ghostty#3955), which can scroll a few extra lines per notch. Lowering mouse-scroll-multiplier in the Ghostty config works around it.

KeyAction
/Search branches (incremental fuzzy search)
↑ / Ctrl+kSelect previous result
↓ / Ctrl+jSelect next result
EnterJump to selected branch
Esc / Backspace on emptyCancel search

File diff view

KeyAction
j / k / ↑ / ↓Scroll up/down
h / l / ← / →Scroll left/right
Ctrl+d / Ctrl+uHalf-page down/up
Ctrl+f / Ctrl+bFull page down/up
g / GGo to top/bottom
0Scroll to line start
] / [Jump to next/previous hunk
n / NJump to next/previous file
Esc / qBack to file select / close

Other

KeyAction
yCopy commit hash to clipboard (OSC 52)
YCopy branch name to clipboard (OSC 52)
RRefresh repository data
oToggle remote branches
tToggle tags
?Toggle help
q / EscQuit (returns focus to the graph first when the detail pane is focused)

Notes and limitations

  • The TUI loads up to 500 commits across the visible branches.
  • Merge commits are diffed against the first parent; the initial commit is diffed against an empty tree.
  • Changed files are capped at 50. Binary files are shown without line stats.
  • If there are staged, unstaged, or untracked changes, an "uncommitted changes" row appears at the top.
  • When multiple branches point to the same commit, the label is collapsed with a +N count of other branch labels (e.g., [main ↔ origin, origin_2, origin_3 +1]). A local branch and all same-named remote branches at that commit count as one label. Matching remote names are listed alphabetically after ↔ in both the collapsed label and the branch popup, including unselected branches. Remote branches at different commits or without a matching local branch remain separate. Use h/l or ←/→ to switch between labels.
  • Long branch names and remote lists are abbreviated to fit; commit details retain the full ref names.
  • 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.
  • Remote branches are displayed by default. Press o to hide them; when hidden, commits reachable only from remote branches are excluded from the graph.
  • Tags are displayed by default. Press t to hide them.
  • Delete operations only work with local branches.
  • Fetch and push require the origin remote to be configured. Staging works per file (no hunk-level staging); commits include only staged changes, like plain git commit.

Development

See debugging.md for file logging and the remote-control debug server, and screenshots/README.md to recreate the demo repository and screenshots.

License

MIT

cli
developer-tools
git
git-graph
ratatui
rust
terminal
tui
visualization

trasta298/keifu

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

Rust

811

197 commits

updated Oct 12, 2026

See the code

README

🧬 keifu

Crate Status Built With Ratatui

日本語版はこちら

See your branches. Follow your changes. Stay in the terminal.

keifu (系譜, /keːɸɯ/, “genealogy”) is a Git TUI for working across branches. Explore a color-coded commit graph, inspect diffs, and stage, commit, and push changes with the keyboard or mouse.

keifu showing parallel branches, merge history, commit details, and changed files

  • Follow the graph — See where branches diverge and merge, with local branches, remotes, and tags in one view.
  • Inspect the change — Open a file diff with syntax highlighting and word-level change emphasis.
  • Keep work moving — Search and switch branches, stage files, write a commit, and push to origin.
  • Fit your workspace — Use keyboard shortcuts, click and scroll each pane, or run in a narrow terminal split. No image protocol required.

The pane-preserving diff layout and drag-to-copy shown or described below are available in v0.7.0 and later.

Installation

From crates.io

cargo install keifu

With mise

mise use -g github:trasta298/keifu@latest

With Homebrew

brew install trasta298/tap/keifu

From source

git clone https://github.com/trasta298/keifu
cd keifu
cargo install --path .

Get started

Run inside a Git repository (or one of its subdirectories):

keifu
  1. Move through commits with ↑ / ↓ or j / k, or click a row.
  2. Press Space to select a changed file, then Enter to open its diff.
  3. Press Esc to go back. Use / to find a branch, and ? for help.

You need a terminal with Unicode and color support, and git in your PATH for fetch/push. Cargo installation and source builds also need the Rust toolchain.

A quick tour

Read the diff with its context

See added and removed lines, syntax highlighting, and changes within a line. Use n / N to move between files and ] / [ to jump between hunks.

A Rust file diff with highlighted changes, commit details, and the file list still visible

File diffs open fullscreen by default. The layout above keeps commit details and the file list visible:

keifu --file-view replace

Stage files and commit

Select uncommitted changes, press Space, then use s to stage or unstage a file. a stages everything; u unstages everything. Press c to write a commit message, then p from the graph to push the current branch to origin.

Three changed files with one staged file and keyboard hints for staging and committing

Staging is per file. A commit includes only staged changes.

Find the branch you need

Press / and type part of a branch name. Fuzzy search filters the dropdown as you type; Enter jumps to the selected result in the graph. Press Enter again from the graph to check it out.

Branch search filtering the graph's branches as a query is typed

Keep it beside your editor

On narrow terminals, the detail panes stack vertically and less essential commit metadata is hidden to leave room for the graph and messages.

keifu in a 54-column terminal with stacked commit details and changed files

Use the mouse, too

Click a commit or file to select it; double-click to open its files or diff. Scroll the pane under the pointer, or click the action hints in the status bar. Drag across visible text within a pane and release to copy it via OSC 52 (requires terminal clipboard support).

Configuration

Set defaults in ~/.config/keifu/config.toml:

[ui]
file_view = "replace"

By default, keifu refreshes local state every 10 seconds and fetches from origin every 60 seconds. See the configuration guide to adjust or disable automatic updates, or change remote and tag visibility.

Keybindings

Press ? in the app for help.

Full keyboard and mouse reference
KeyAction
j / ↓Move down (scrolls the detail pane when focused)
k / ↑Move up (scrolls the detail pane when focused)
TabSwitch pane focus (graph / commit detail)
]Jump to next commit that has branch labels
[Jump to previous commit that has branch labels
h / ←Select left branch (same commit)
l / →Select right branch (same commit)
Ctrl+dPage down
Ctrl+uPage up
g / HomeGo to top
G / EndGo to bottom
@Jump to HEAD (current branch)
SpaceOpen changed file list

Git operations

KeyAction
EnterCheckout selected branch/commit
bCreate branch at selected commit
dDelete branch (local, non-HEAD)
fFetch from origin
cCommit staged changes (opens message dialog)
pPush current branch to origin

File list (Space) / staging

Staging keys work when the "uncommitted changes" row is selected.

KeyAction
j / kSelect file
EnterOpen file diff
sStage / unstage selected file
aStage all changes
uUnstage all changes
cCommit staged changes
Esc / qBack

Mouse

InputAction
Click on a commit rowSelect commit (double-click opens the file list)
Click on a file rowSelect file (double-click opens the diff)
Click on a paneFocus the pane
Click on a status bar hintRun that action
Wheel scrollScrolls the pane under the cursor
Left dragSelect visible text within a pane; release to copy (OSC 52)

Clicks and double-clicks run on release, so dragging does not activate them. Selection covers visible text only; scrolling or changing the view clears it. Your terminal's native selection remains available with its modifier (usually Shift + drag; Fn + drag on iTerm2).

Note: Ghostty currently fans one wheel notch out into multiple scroll events for mouse-mode apps (ghostty#3955), which can scroll a few extra lines per notch. Lowering mouse-scroll-multiplier in the Ghostty config works around it.

KeyAction
/Search branches (incremental fuzzy search)
↑ / Ctrl+kSelect previous result
↓ / Ctrl+jSelect next result
EnterJump to selected branch
Esc / Backspace on emptyCancel search

File diff view

KeyAction
j / k / ↑ / ↓Scroll up/down
h / l / ← / →Scroll left/right
Ctrl+d / Ctrl+uHalf-page down/up
Ctrl+f / Ctrl+bFull page down/up
g / GGo to top/bottom
0Scroll to line start
] / [Jump to next/previous hunk
n / NJump to next/previous file
Esc / qBack to file select / close

Other

KeyAction
yCopy commit hash to clipboard (OSC 52)
YCopy branch name to clipboard (OSC 52)
RRefresh repository data
oToggle remote branches
tToggle tags
?Toggle help
q / EscQuit (returns focus to the graph first when the detail pane is focused)

Notes and limitations

  • The TUI loads up to 500 commits across the visible branches.
  • Merge commits are diffed against the first parent; the initial commit is diffed against an empty tree.
  • Changed files are capped at 50. Binary files are shown without line stats.
  • If there are staged, unstaged, or untracked changes, an "uncommitted changes" row appears at the top.
  • When multiple branches point to the same commit, the label is collapsed with a +N count of other branch labels (e.g., [main ↔ origin, origin_2, origin_3 +1]). A local branch and all same-named remote branches at that commit count as one label. Matching remote names are listed alphabetically after ↔ in both the collapsed label and the branch popup, including unselected branches. Remote branches at different commits or without a matching local branch remain separate. Use h/l or ←/→ to switch between labels.
  • Long branch names and remote lists are abbreviated to fit; commit details retain the full ref names.
  • 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.
  • Remote branches are displayed by default. Press o to hide them; when hidden, commits reachable only from remote branches are excluded from the graph.
  • Tags are displayed by default. Press t to hide them.
  • Delete operations only work with local branches.
  • Fetch and push require the origin remote to be configured. Staging works per file (no hunk-level staging); commits include only staged changes, like plain git commit.

Development

See debugging.md for file logging and the remote-control debug server, and screenshots/README.md to recreate the demo repository and screenshots.

License

MIT

cli
developer-tools
git
git-graph
ratatui
rust
terminal
tui
visualization

Project health

crates.io

Latest release

0.7.0 · Oct 12, 2026

Releases this year

16

Significant stargazers

(top 24 of 28)

Tony Narlock

419 followers · starred Mar 2026

William Desportes

269 followers · starred Jan 2026

Dhruv Thakur

170 followers · starred Jan 2026

Zhizhen He

138 followers · starred Jan 2026