AI agents call git constantly. Status, diff, log, show. I pulled data from 3,156 real coding sessions and git accounted for roughly 459,000 tokens of output. That’s 7.4% of all shell commands. Codex is even worse (over 10% of its bash calls are git). Makes sense though right? git’s output was designed for humans. Verbose headers, instructional text, column padding, decorative formatting. It’s the informational equivalent of wrapping every answer in a gift bag with tissue paper. Machines don’t need the tissue paper or the gift bag. Every extra token costs money and adds latency. So I built nit. A native git replacement written in Zig that talks directly to the git object database via libgit2. Defaults tuned for machines. The Numbers Token savings (nit compact vs git default): Commandgit tokensnit tokensSavingsstatus~125~3671%log -20~2,273~30187%diff~1,016~65735%show —stat~260~11855% Across real session data, nit’s compact defaults would save 150-250K tokens. That’s something… oh, and did I mention it’s faster? 100 hyperfine runs on a real repo: CommandgitnitSpeedupstatus13.7ms8.4ms1.64xdiff14.3ms9.9ms1.44xshow10.2ms7.3ms1.39x How It Works Zig’s C interop is zero-cost. You @cImport the libgit2 headers and call functions directly. No subprocess overhead, no text parsing. nit reads the git object database natively. For commands nit hasn’t optimized yet, it falls through to git via execvpe(), replacing the nit process entirely. Zero wrapper overhead. This makes alias git=nit safe. You never lose functionality, and as more commands get native implementations, the passthrough shrinks on its own. The U1 Experiment This was the most controversial design decision. I reduced diff context from 3 lines (git’s default) to 1 line. There are a lot of tokens hiding in those extra context lines. But does cutting them actually hurt comprehension? I ran 27 trials with multi-file diffs, nested control flow, code moves, ambiguous similar blocks. Claude scored 4/4 at U0, U1, and U3. No di...
First seen: 2026-03-26 03:59
Last seen: 2026-03-26 03:59