Keifu – 一个使用颜色和清晰度来浏览提交图的TUI。
Keifu – A TUI for navigating commit graphs with color and clarity

原始链接: https://github.com/trasta298/keifu

## Keifu:一个终端 Git 可视化工具 Keifu 是一个基于 Rust 的终端 UI 工具,用于可视化 Git 提交图。它提供了一个更清晰、颜色编码的 `git log --graph` 替代方案,使导航项目历史更轻松。 主要功能包括可视化提交图、详细的提交信息(消息、更改的文件)以及基本的 Git 操作,如分支创建/删除、检出和拉取。它专为窄终端窗口设计,并依赖 Unicode 进行显示 – 不需要图像协议。 导航是通过键盘驱动的,具有直观的快捷键,用于在提交之间移动、切换分支和搜索。Keifu 会自动检测 Git 仓库,并支持最多 500 个提交。它显示未提交的更改,并有效地处理多个分支指向同一个提交的情况。 安装通过克隆 GitHub 仓库后使用 `cargo install` 即可轻松完成。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Keifu – 一个使用颜色和清晰度来浏览提交图的 TUI (github.com/trasta298) 7 分,由 indigodaddy 1 小时前发布 | 隐藏 | 过去 | 收藏 | 1 条评论 M4R5H4LL 6 分钟前 [–] 感谢分享。这会是 .NET 中 Andy TUI 的一个很好的补充示例。该库不是 Rust,但有一些你可能感兴趣的例子,包括一个 HN 客户端 [2] [3]。 参考资料: [1] https://github.com/rivoli-ai/andy-tui [2] https://github.com/rivoli-ai/andy-tui2/blob/main/examples/An... [3] https://imgur.com/a/CgECRa2 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Crate Status Built With Ratatui

日本語版はこちら

keifu (系譜, /keːɸɯ/) is a terminal UI tool that visualizes Git commit graphs. It shows a colored commit graph, commit details, and a summary of changed files, and lets you perform basic branch operations.

Screenshot

  • Readable commit graphgit log --graph is hard to read; keifu renders a cleaner, color-coded graph
  • Fast branch switching — With AI-assisted coding, working on multiple branches in parallel has become common. keifu makes branch switching quick and visual
  • Keep it simple — Only basic Git operations are supported; this is not a full-featured Git client
  • Narrow terminal friendly — Works well in split panes and small windows
  • No image protocol required — Works on any terminal with Unicode support
  • Unicode commit graph with per-branch colors
  • Commit list with branch labels, date, author, short hash, and message (some fields may be hidden on narrow terminals)
  • Commit detail panel with full message and changed file stats (+/-)
  • Git operations: checkout, create/delete branch, fetch
  • Branch search with dropdown UI
  • Run inside a Git repository (auto-discovery from current directory)
  • A terminal with Unicode line drawing support and color
  • git command in PATH (required for fetch)
  • Rust toolchain (for building from source)
mise use -g github:trasta298/keifu@latest
git clone https://github.com/trasta298/keifu && cd keifu && cargo install --path .

Run inside a Git repository:

See docs/configuration.md for configuration options.

Key Action
j / Move down
k / Move up
] / Tab Jump to next commit that has branch labels
[ / Shift+Tab Jump to previous commit that has branch labels
h / Select left branch (same commit)
l / Select right branch (same commit)
Ctrl+d Page down
Ctrl+u Page up
g / Home Go to top
G / End Go to bottom
@ Jump to HEAD (current branch)
Key Action
Enter Checkout selected branch/commit
b Create branch at selected commit
d Delete branch (local, non-HEAD)
f Fetch from origin
Key Action
/ Search branches (incremental fuzzy search)
/ Ctrl+k Select previous result
/ Ctrl+j Select next result
Enter Jump to selected branch
Esc / Backspace on empty Cancel search
Key Action
R Refresh repository data
? Toggle help
q / Esc Quit
  • The TUI loads up to 500 commits across all branches.
  • Merge commits are diffed against the first parent; the initial commit is diffed against an empty tree.
  • Changed files are capped at 50 and binary files are skipped.
  • If there are staged or unstaged changes (excluding untracked files), an "uncommitted changes" row appears at the top.
  • When multiple branches point to the same commit, the label is collapsed to a single name with a +N suffix (e.g., main +2). Use h/l or / 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.
  • Remote branches are displayed, but delete operations only work with local branches.
  • Fetch requires the origin remote to be configured.

MIT

联系我们 contact @ memedata.com