2026 · CLI Tool
Code History
A CLI that explains why any line of code exists by mining git history, PRs, and issues behind it.
Problem
git blame tells you who last touched a line, not why it exists. The real reason usually sits several commits back, behind renames and refactors, in a PR description or a linked issue nobody reopens.
Approach
Walk the history deterministically first: follow blame across renames and refactors to rebuild the commit chain for a line, then collect the PR context and issue trail attached to those commits. Only then does an LLM summarize, and only from what was retrieved, so the explanation cites real commits instead of guessing.
$ why src/billing/invoice.py:142Architecture
file:line ──► blame walker ──► commit chain ──► PR + issue fetch ──► context
(follows renames) │
▼
cache ◄──── LLM summarizer (grounded)Results
- A single command gives an explanation backed by the commits, PRs, and issues it came from.
- Caching keeps repeat queries fast on large repositories.
What I'd do next
Add an editor integration so the explanation appears inline on hover, and support for monorepos with path-scoped history.