rockorager/comview

the best diff viewer ever made

Go

276

159 commits

updated Sep 16, 2026

See the code

README

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.

comview screenshot

Install

git clone https://github.com/rockorager/comview.git
cd comview
mise run install

To install somewhere else:

PREFIX=$HOME/.local mise run install

To use comview as the default pager for git diff and git show:

git config --global pager.diff comview
git config --global pager.show comview

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

KeyAction
j/k, arrowsMove
h/lMove horizontally
gg / GTop / bottom
Ctrl-d / Ctrl-uHalf-page down / up
Ctrl-f / Ctrl-bFull-page down / up
J / KNext / previous commit
]c / [cNext / previous change
]n / [nNext / previous note
sToggle side-by-side view
tChoose theme
<space>eFind file in diff
<space>nFind comment
/Search
n / NNext / previous search result
oOpen cursor location in editor
v / VVisual / visual-line selection
iw, aw, i{, a", etc.Text objects, naturally flawless
yCopy selection
i or IAdd/edit comment
x / ddDelete note under cursor
:wSave comments
:q / :q!Quit / force quit
?Show this help
EscCancel

That is all. It is enough.

Contributors

rockorager

142 commits

deevus

7 commits

jossephus

3 commits

carsonjones

3 commits

rockorager/comview

the best diff viewer ever made

Go

276

159 commits

updated Sep 16, 2026

See the code

README

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.

comview screenshot

Install

git clone https://github.com/rockorager/comview.git
cd comview
mise run install

To install somewhere else:

PREFIX=$HOME/.local mise run install

To use comview as the default pager for git diff and git show:

git config --global pager.diff comview
git config --global pager.show comview

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

KeyAction
j/k, arrowsMove
h/lMove horizontally
gg / GTop / bottom
Ctrl-d / Ctrl-uHalf-page down / up
Ctrl-f / Ctrl-bFull-page down / up
J / KNext / previous commit
]c / [cNext / previous change
]n / [nNext / previous note
sToggle side-by-side view
tChoose theme
<space>eFind file in diff
<space>nFind comment
/Search
n / NNext / previous search result
oOpen cursor location in editor
v / VVisual / visual-line selection
iw, aw, i{, a", etc.Text objects, naturally flawless
yCopy selection
i or IAdd/edit comment
x / ddDelete note under cursor
:wSave comments
:q / :q!Quit / force quit
?Show this help
EscCancel

That is all. It is enough.

Contributors

rockorager

142 commits

deevus

7 commits

jossephus

3 commits

carsonjones

3 commits

Languages

Go

100.0%