Show HN: Nit – I rebuilt Git in Zig to save AI agents 71% on tokens

Cuts AI costs by 71%—but devs ask “isn’t this just git flags?” and “did AI write it”

TLDR: A dev launched “nit,” a slimmed-down Git that claims big cost and speed savings for AI by cutting wordy output. Commenters clapped back: some say Git already has terse modes, others question why rewrite it at all—and a few wonder if any of this tackles real bottlenecks, sparking spicy debate over hype vs. help.

Developer Fielding Johnston says he rebuilt Git in the Zig language to make a lean, machine-friendly version called “nit,” trimming the wordy output AIs read and allegedly saving up to 71% of paid “tokens” (basically the words AIs get billed for). He even shows speed wins and a togglable human mode. Sounds slick… until the comments lit up.

The top vibe: “Isn’t this just Git with flags?” One skeptic deadpanned that git status --short and git log --oneline already spit out the tidy stuff nit brags about. Another asked the nuclear question: why rewrite at all instead of wrapping Git’s command line—especially since today’s AI models are trained to understand Git’s normal output. Elsewhere, veterans name-dropped other tools (“check out rtk”) and one commenter went full conspiracy, suggesting the post reads like it was written by an AI itself.

Practical voices added a splash of ice water: even if nit cuts tokens, is Git output the real bottleneck in multi-step coding agents? Some want profiling receipts before they swap aliases. Still, a quiet faction cheered the “diet Git” idea, joking that this is peak nit-picking done right: same repo, fewer words, faster answers. Whether it’s a breakthrough or a brilliant bit of flag cosplay, the thread turned into a classic internet split—elegant engineering vs. “we already have that.”

Key Points

  • Nit is a Zig-based, libgit2-powered replacement for common git commands optimized for AI agents, reducing output verbosity and latency.
  • Measured token savings versus git defaults: status ~71%, log -20 ~87%, diff ~35%, show —stat ~55%; estimated 150–250k tokens saved across sessions.
  • Benchmarks over 100 hyperfine runs show speedups: status 1.64x, diff 1.44x, show 1.39x on a real repository.
  • Nit avoids subprocess and parsing overhead by calling libgit2 directly and uses execvpe() to pass through to git for unsupported commands.
  • A reduced diff context (“U1”) showed no observed comprehension loss in 27 Claude trials; conformance enforced via 78 tests, with two modes: compact (default) and human (-H).

Hottest takes

"Why a complete rewrite rather than a wrapper around the cli commands?" — stingraycharles
"If I use `git status --short` or `git log --oneline`, I see output similar" — antileet
"Was this entirely created by an LLM?" — slopinthebag
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.