@geekbb: 一个差异对比工具,作者甚至直接喊出“史上最好的 diff viewer”。如果你经常读代码变更、审查补丁,它想做的是让 diff 结果更直观、更好看。 https://github.com/rockorager/comview…
摘要
介绍了一个名为 comview 的终端差异对比工具,作者声称它是“史上最好的 diff viewer”,支持从 stdin 读取 unified diff 并美观渲染,适合代码审查。
查看缓存全文
缓存时间: 2026/05/20 06:27
一个差异对比工具,作者甚至直接喊出“史上最好的 diff viewer”。如果你经常读代码变更、审查补丁,它想做的是让 diff 结果更直观、更好看。
https://t.co/prBCpnYOT4 https://t.co/VLvOLfPh9I
rockorager/comview
Source: https://github.com/rockorager/comview
comview
The finest diff viewer ever compressed into a small terminal program. It reads a unified diff from stdin, renders it beautifully, and lets you review code without becoming a web browser.

Install
git clone https://github.com/rockorager/comview.git
cd comview
make install
To install somewhere else:
make PREFIX=$HOME/.local install
Usage
git diff | comview
git show | comview
gh pr diff 123 | comview
comview watch
comview watch --staged
comview watch -- git show HEAD
comview watch reruns git diff and refreshes the view whenever the diff
output changes. Arguments after watch are passed to git diff; use -- to
watch another diff-producing command.
Comments are saved to .comview/comments.json.
Keybinds
| Key | Action |
|---|---|
j/k, arrows | Move |
h/l | Move horizontally |
gg / G | Top / bottom |
Ctrl-d / Ctrl-u | Half-page down / up |
J / K | Next / previous commit |
]c / [c | Next / previous change |
]n / [n | Next / previous note |
s | Toggle side-by-side view |
t | Choose theme |
<space>e | Find file in diff |
/ | Search |
n / N | Next / previous search result |
o | Open cursor location in editor |
v / V | Visual / visual-line selection |
iw, aw, i{, a", etc. | Text objects, naturally flawless |
y | Copy selection |
i or I | Add/edit comment |
x / dd | Delete note under cursor |
:w | Save comments |
:q / :q! | Quit / force quit |
? | Show this help |
Esc | Cancel |
That is all. It is enough.
相似文章
@sashimikun_void: https://github.com/nkzw-tech/codiff… 酷炫的代码差异查看器,顺便一提……
Codiff 是一个美观的本地差异查看器,适用于 Git 仓库,具有基于大语言模型的代码讲解和行内审查评论功能,旨在简化提交前的代码审查流程。
Show HN: Codiff,本地差异审查工具
Codiff 是一款轻量级本地 diff 查看器,用于审查 Git 暂存和未暂存的更改,支持基于 LLM 的逐步讲解和内联审查评论。
gap: 界面文本差异
gap 是一个简单的 GUI 文本差异工具,用于比较文件和目录,支持 Myers 差异算法、内部差异视图、Git 集成以及可自定义设置。它是一个独立的工具,除了 C++ 编译器外无需外部依赖。
论渲染差异
博客文章宣布推出CodeView,这是一个虚拟化优先的React组件,可高效渲染大型代码差异,归属于六个月前发布的Diffs库。
@laogui: 经过几天使用,我可以毫不夸张地说:Rebased 就是目前最强的 Git 图形化客户端。 用过 JetBrains 系列 IDE 的朋友都知道,它的 Git 功能体验非常好——尤其是 Diff 功能。但这几年 JetBrains 在 AI…
Rebased 是一款基于 JetBrains IntelliJ 社区版构建的开源 Git 图形化客户端,砍掉了所有语言相关功能,只保留并优化了 Git 工具,提供了顶级的 Diff、Review、交互式 Rebase 和冲突解决体验,免费使用且零学习成本。