frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Deff – Side-by-side Git diff review in your terminal

https://github.com/flamestro/deff
77•flamestro•7h ago
deff is an interactive Rust TUI for reviewing git diffs side-by-side with syntax highlighting and added/deleted line tinting. It supports keyboard/mouse navigation, vim-style motions, in-diff search (/, n, N), per-file reviewed toggles, and both upstream-based and explicit --base/--head comparisons. It can also include uncommitted + untracked files (--include-uncommitted) so you can review your working tree before committing.

Would love to get some feedback

Comments

meain•6h ago
I have been using https://github.com/jeffkaufman/icdiff for the longest time to get side by side diffs.
lf-non•6h ago
I also use icdiff, but it is good to have the file-awareness for git diff esp. the ability to quickly skip files that I know aren't important.
Amorymeltzer•5h ago
For that in particular, I use delta (<https://github.com/dandavison/delta>) with `side-by-side = true` enabled. I find I use both icdiff and delta side-by-side on a regular basis.
behnamoh•5h ago
Delta is so much faster than icdiff too.
flamestro•4h ago
This looks great as well! I personally prefer a bit more context. Thats why I added a bit more of it to deff. It also allows to mark files as reviewed by pressing `r` which is quite handy for my flow.
rileymichael•6h ago
getting users to adopt a new tool with its own incantations is a tough sell. git supports specifying an external pager so folks can plug in alternatives (such as https://github.com/dandavison/delta) while still using the familiar git frontend
yottamus•6h ago

    git difftool --tool=vimdiff
metalliqaz•6h ago
but is it blazingly fast?
syngrog66•5h ago
if its not in Rust or browser-based or a "cloud" service or the result of multi-GWH of LLM "training" or a VSCode plugin or ideally all of the prior then the HN kids wont be interested :-)
flamestro•4h ago
I personally find vimdiff a bit harder to navigate for my usecase. The reason is that I am context unaware of the file often in larger projects and wanted something that allows me to check all lines in a touched file. However, I have to admit vimdiff comes quite close to what I need and is a great tool!
PhilipRoman•3h ago
zr?

vim folds are fully programmable. For me a bigger issue was git calling vimdiff for each file, which I fixed with my own difftool: https://gist.github.com/PhilipRoman/60066716b5fa09fcabfa6c95...

anitil•1h ago
I ran in to a couple problems when trying that script (details below), but I'm really happy that you shared it, because I had not seen ':windo diffthis' before, and that method of scripting diffs. I'll definitely be customising it!

(I found that my mac machine doesn't support the '-printf' option, and also I was attempting to run 'git bvd main' on a branch but it seems it does a recursive directory diff, so I'll use 'git diff --name-only' as the input to the awk command).

Edit: worked nicely! I haven't used tabs much in vim so is a slightly new workflow but otherwise very handy

llbbdd•5h ago
I was looking for a good TUI tool for diffs recently, but I'm not sure yet if what I want exists already (and I don't think this tool does it (yet?)). I've been moving my workflow out of VSCode as I'm using TUI-driven coding agents more often lately but one thing I miss from my VSCode/GitHub workflow is the ability to provide a comment on lines or ranges in a diff to provide targeted feedback to the agent. Most diff tools seem to be (rightfully) focused on cleanly visualizing changes and not necessarily iterating on the change.

I admit I haven't looked super hard yet, I settled on configuring git to use delta [0] for now and I'm happy with it, but I'm curious if anyone has a workflow for reviewing/iterating on diffs in the terminal that they'd be willing to share. Also open to being told that I'm lightyears behind and that there's a better mental model for this.

[0] https://github.com/dandavison/delta/

kodomomo•5h ago
Octo [0] for nvim lets you submit reviews, add comments on ranges, reply to threads, etc.

This in conjunction with gh-dash [1] to launch a review can get you a pretty nice TUI review workflow.

[0] https://github.com/pwntester/octo.nvim

[1] https://github.com/dlvhdr/gh-dash

*Edit: I see you meant providing feedback to an agent, not a PR. Well that's what I get for reading too fast.

llbbdd•3h ago
No problem, I appreciate another reason to look at Neovim; I do sometimes have a need to interact with GH's actual PR flow and once I've moved the rest of my workflow out of VSCode, Neovim looks like the best option for the last mile of actually writing and editing code. I just have to commit the time to set it up with everything I probably take for granted in VSCode's editor.
mckn1ght•4h ago
I use delta for quick diffs in a shell (along with the -U0 option on git-diff), but in my claude workflow, i have a 3 pane setup in tmux: :| where the right side is a claude session, the top left is emacs opened to magit, and the bottom left is a shell. Magit makes navigating around a diff pretty easy (as well as all the other git operations), and I can dive into anything and hand edit as well.
jfyne•4h ago
Not TUI based but I made something called meatcheck. The idea being that the LLM requests a review from the human, you can leave inline comments like a PR review.

Once you submit it outputs to stdout and the agent reads your comments and actions them.

https://github.com/jfyne/meatcheck

llbbdd•3h ago
Thank you! At a glance this is very close to what I had in mind, especially with the straightforward output format, I'll give this a try.
coryrc•4h ago
magit
flamestro•3h ago
I was also searching for some time, but most of them did not have enough context for my workflow tbh. So thats why I decided to make deff. Another good one I liked is vimdiff
thamer•3h ago
I had tried `delta` a few years ago but eventually went with `diff-so-fancy`[1]

The two are kind of similar if I remember correctly, and both offer a lot of config options to change the style and more. I mostly use it for diffs involving long lines since it highlights changes within a line, which makes it easier to spot such edits.

I have an alias set in `~/.gitconfig` to pipe the output of `git diff` (with options) to `diff-so-fancy` with `git diffs`:

    diffs = "!f() { git diff $@ | diff-so-fancy; }; f"

[1] https://github.com/so-fancy/diff-so-fancy
petepete•2h ago
You can do this with diff-highlight, which comes packaged with git. No extra packages needed.
agavra•1h ago
Checkout https://github.com/agavra/tuicr - it's built exactly for this purpose (reviewing code in your terminal and then adding comments and exporting it to an agent to fix).
jamiecode•5h ago
The specific gap side-by-side covers for me is reviewing changes on a remote box without firing up an IDE. Delta is great but keeps the unified format. icdiff does the split view but is pretty barebones. So there's definitely space here.

What nobody's mentioned yet is difftastic. Takes a completely different approach - parses syntax trees instead of lines, so indentation changes and bracket shuffles don't show up as noise. Worth a look if you're comparing options.

Main question I'd have: how does it hold up on large files? 5k+ line diffs are where most of these tools either choke or produce unreadable output. That'd be the test I'd run first.

rileymichael•4h ago
delta supports split view: https://dandavison.github.io/delta/side-by-side-view.html
flamestro•4h ago
So I tested this on huge files (checking cargo lock for instance) and it is super fast in the navigation of those. Until now I did not encounter any issue with bigger files (around 4k-6k changes but also only 4k-6k lines).
ZoomZoomZoom•5h ago
Why shouldn't this be a simple wrapper to tie Delta to some kind of file browser or a thing like television[1]?

[1]: https://alexpasmantier.github.io/television/

syngrog66•5h ago
television??
teddyh•5h ago

  emacs --eval='(ediff-files "file1" "file2")'
(The “|” key toggles side-by-side view.)
flamestro•4h ago
Yes, but emacs < vim
k_bx•5h ago
What I would love to see is "tig" replacement that is:

- even faster, especially if you have couple thousand files and just want to press "u" for some time and see them very quickly all get staged

- has this split-view diff opened for a file

Otherwise tig is one of my favorite tools to quickly commit stuff without too many key presses but with review abilities, i have its "tig status" aliased to "t"

raphinou•5h ago
Looks interesting. I'm currently using https://tuicr.dev/ , of which I like that the first screen it shows is the choice of commit range you want to review. Might be something to consider for deff?
hatradiowigwam•5h ago
vimdiff is pretty fast, and is likely installed on your linux system without you realizing it.
flamestro•4h ago
Its a great tool, but misses some of the context I needed.
insane_dreamer•4h ago
we need something like this in lazygit -- which is excellent all around but lacking in visual diffing/merging.

What is most useful though is a 3-panel setup, like JetBrains -- still the best git client I have worked with.

flamestro•4h ago
What would the third panel contain in this case? Do you mean the setup that IntelliJ has in merge conflicts?
dec0dedab0de•4h ago
looks pretty good at a glance, though I would like to see three views for handling conflicts. Target on the left, source on the right, and the combined result in the middle.

...I really just like the way the Jetbrains IDEs do it, and I wish there were a TUI version that I could launch automatically from the git cli.

greatgib•3h ago
It blows my mind that nowadays, some random tools on internet tells you to do "curl -fsSL https://.... | bash" to install some "binary" things and a lot of people will do it without hesitation.

It probably explains why there is so many data leaks recently but it is like we did a 20 years jump back in time in terms of security in just a few years.

flamestro•3h ago
I get the hesitation :D But the code is open and the install.sh is as minimal as it gets tbh. Still, as said, I get the hesitation. What a time to be alive.

It does not install binaries, it builds the binary by checking out the project basically. You can also do the process manually and use the tool.

warkdarrior•3h ago
> But the code is open and the install.sh is as minimal as it gets tbh.

I bet 99.9999% of users do not review the code nor the install script.

holoduke•3h ago
Cowboys rule the internet.
pwdisswordfishy•3h ago
One day folks who live inside commandlines and TUIs all day will realize that there's nothing particular about webapps or the sandboxes that they execute in that requires we build exclusively graphical runtimes around them, instead of taking advantage of the same security and distribution model for programs accessible and usable from within terminal emulator.
jaden•2h ago
Is it that different from downloading and running a binary?
zem•3h ago
will this play well with jj?
suralind•2h ago
What you want is difftastic. No need to thank me.
spartanatreyu•1h ago
You definitely need a gif or apng file showing it's use in the github readme.

And a link to an asciicinema would help a lot too.

---

Also, I'm not sure how useful the side-by-side view is.

The second example (https://github.com/flamestro/deff/blob/main/docs/example_02....) is confusing.

The left side has lines 1365-1371 having the same code as lines 1374-1380 on the right side, yet they're not aligned with each other.

Most diff views would put padding between lines 1364-1365 on the left side so lines 1365-1371 are aligned with 1374-1380 on the right side.

agavra•1h ago
I just built a version of this a month ago that also allows you to add review comments so you can export them back to an Agent to fix: https://github.com/agavra/tuicr

Great work on deff, would love to brainstorm here :)

ivanjermakov•47m ago
8 terminal lines are taken by the tool's UI. Could have been 2.
tty456•6m ago
So, basically 'vim -d' in rust? cool

Show HN: Hacker Smacker – Spot great (and terrible) HN commenters at a glance

https://hackersmacker.org
89•conesus•2d ago•83 comments

Show HN: Terminal Phone – E2EE Walkie Talkie from the Command Line

https://gitlab.com/here_forawhile/terminalphone
285•smalltorch•14h ago•73 comments

Show HN: Deff – Side-by-side Git diff review in your terminal

https://github.com/flamestro/deff
77•flamestro•7h ago•49 comments

Show HN: Linex – A daily challenge: placing pieces on a board that fights back

https://www.playlinex.com/
47•Humanista75•2d ago•19 comments

Show HN: Rev-dep – 20x faster knip.dev alternative build in Go

https://github.com/jayu/rev-dep
35•jayu_dev•6h ago•7 comments

Show HN: I Built Smart Radio That Auto-Skips Talk and Ads by Using ML

https://tunejourney.com/
3•FreeGuessr•1h ago•1 comments

Show HN: Beehive – Multi-Workspace Agent Orchestrator

https://storozhenko98.github.io/beehive/
39•mst98•2d ago•17 comments

Show HN: Mission Control – Open-source task management for AI agents

https://github.com/MeisnerDan/mission-control
33•meisnerd•12h ago•5 comments

Show HN: Respectify – A comment moderator that teaches people to argue better

https://respectify.org/
211•vintagedave•1d ago•214 comments

Show HN: Usplus.ai – Build a company of AI agents and execute work autonomously

https://usplus.ai:443/
2•usplusAI•3h ago•4 comments

Show HN: Safari-CLI – Control Safari without an MCP

https://www.npmjs.com/package/@tamasno1/safari-cli
2•boros2me•4h ago•0 comments

Show HN: Modern Reimplementation of the Speck Molecule Renderer

https://github.com/vangelov/modern-speck
25•vlad_angelov•4d ago•4 comments

Show HN: A real-time strategy game that AI agents can play

https://llmskirmish.com/
213•__cayenne__•1d ago•78 comments

Show HN: I ported Tree-sitter to Go

https://github.com/odvcencio/gotreesitter
217•odvcencio•1d ago•104 comments

Show HN: Clocksimulator.com – A minimalist, distraction-free analog clock

https://www.clocksimulator.com/
124•user_timo•1d ago•94 comments

Show HN: Transcribe-Critic – Merge transcript sources for stronger transcript

https://github.com/ringger/transcribe-critic
2•ringger•5h ago•1 comments

Show HN: Django Control Room – All Your Tools Inside the Django Admin

https://github.com/yassi/dj-control-room
131•yassi_dev•1d ago•53 comments

Show HN: I stopped building apps for people. Now I make CLI tools for agents

https://github.com/Aayush9029/homebrew-tap
2•aayush9029•6h ago•0 comments

Show HN: Decoy – A native Mac app for mocking HTTP endpoints locally

https://decoy-app.com/
6•mosselman•6h ago•1 comments

Show HN: Smplogs – Local-first AWS Cloudwatch log analyzer via WASM

https://www.smplogs.com
3•alonsim•6h ago•0 comments

Show HN: I built a local AI-powered Ouija board with a fine-tuned 3B model

https://github.com/SurceBeats/Planchette
4•SurceBeats•6h ago•3 comments

Show HN: Protection Against Zero-Day Cyber Attacks

3•gaurav1086•7h ago•0 comments

Show HN: Browser-based .NET IDE with visual designer, NuGet packages, code share

https://xaml.io/s/Samples/Newtonsoft
5•userware•7h ago•0 comments

Show HN: OpenSwarm – Multi‑Agent Claude CLI Orchestrator for Linear/GitHub

https://github.com/Intrect-io/OpenSwarm
34•unohee•23h ago•18 comments

Show HN: Batchling – save 50% off any GenAI requests in two lines of code

https://github.com/vienneraphael/batchling
2•vienneraphael•7h ago•0 comments

Show HN: The best agent orchestrator is a 500-line Markdown file

https://github.com/bassimeledath/dispatch
3•bombastic311•7h ago•0 comments

Show HN: Conjure – 3D printed objects from text description only

https://conjure.tech
7•suchanekj•7h ago•5 comments

Show HN: I built a managed Claude AI and hosting service

https://codedoc.us
2•novatrope•7h ago•0 comments

Show HN: I made a directory for Claude skills

https://skillsplayground.com/skills/
2•jackculpan•7h ago•0 comments

Show HN: Duck Talk – Real-time voice interface to talk to your Claude Code

https://github.com/dhuynh95/duck_talk
6•DanyWin•7h ago•0 comments