code-explainer

Code is the source of truth that doesn’t go stale. This CLI translates it — a merged PR or a whole repo — into a brief pitched at whoever’s reading.

$ npm install -g @shilpi1958/code-explainer
Get started GitHub ↗
$ code-explainer pr facebook/react#32
Generating explainer for PR #32…
~/.code-explainer/explainers/01-react-responds-to-input-faster.md
React now responds to input changes faster
Why it matters: live previews feel snappier; paste/voice aren’t missed.
$ code-explainer repo
Generating repo explainer for expressjs/express…
~/.code-explainer/explainers/repos/01-expressjs-express.md
Express is the web framework that powers Node.js apps
In short: handles requests, routing, and responses — the HTTP plumbing.

TWO MODES

Same profile. Same quiz habit. Different question.

code-explainer pr <PR>

What just shipped

Point it at any merged pull request. Get what changed, why the team did it that way, and why it matters to you — without reading the diff.

code-explainer repo

What this codebase is

Orient to a local checkout: what the product does, how it’s put together, what the team has been working on. Built for non-engineers and cross-domain engineers.

Needs Graphify · uv tool install graphifyy

THE CODE IS THE TRUTH

Docs rot. Slack depends on who you ask. The one thing that doesn’t go stale is the code itself — if someone can translate it.

HOW IT WORKS

Init once. Then one command per PR — or per repo.

01
Run code-explainer init. Describe your role and what you’re trying to understand in ~/.code-explainer/learning-profile.md.
02
For a change: code-explainer pr with a number, URL, or owner/repo#123.
03
For a system: cd into a checkout, then code-explainer repo (install Graphify first).
04
Read the summary in your terminal. Optional CHECK IT STUCK quiz — A/B/C — so it sticks.

WHO IT'S FOR

PRODUCT / OPS / SUPPORT

Stop pinging engineers for translation

Get stakeholder-ready briefs from real PRs and repos — in your language, not theirs.

ENGINEERS

Orient outside your domain

Review a teammate’s change, or land in an unfamiliar codebase, without spelunking every file.

MAINTAINERS

Know what you (or the agent) shipped

Especially when AI coding tools are pushing PRs — keep a plain-language record of why.

NO SEPARATE API KEY

It shells out to Claude Code and the GitHub CLI you already use. Repo mode also needs Graphify for the knowledge graph. Nothing new to sign up for just to try a PR explainer.

INSTALL

# install
$ npm install -g @shilpi1958/code-explainer
# profile once (applies everywhere)
$ code-explainer init
$ # edit ~/.code-explainer/learning-profile.md
# explain a merged PR
$ code-explainer pr owner/repo#123
$ code-explainer pr owner/repo#123 --no-quiz
# explain a whole checkout
$ uv tool install graphifyy
$ code-explainer repo