Show HN: Diff Glance – CLI that turns a Git diff into a summary and a diagram Diff Glance, a new command-line tool announced on Hacker News, turns Git diffs into plain-English summaries and architecture diagrams using AI. The tool, requiring Node.js 18+ and an OpenAI-compatible API key, supports multiple providers including OpenAI, Google Gemini, OpenRouter, Groq, and Ollama, and serves results via a local HTTP viewer. It filters out lockfiles and binaries before sending the diff to the model, and offers flags for staged changes, specific commits, JSON output, and custom model endpoints. Turn messy git diffs into plain-English summaries and architecture diagrams. npx diff-glance npx diff-glance origin/main HEAD Requires Node.js 18+, git on PATH , and an OpenAI-compatible API key or a local Ollama endpoint . Default range is HEAD vs the worktree staged + unstaged + untracked . If the worktree is clean, that falls back to --commit HEAD . The second command diffs two refs. There is no stdin pipe. bash $ diff-glance diff-glance: analyzing diff... diff-glance: generating summary... diff-glance: viewer at http://127.0.0.1:53102 diff-glance: press Ctrl+C to stop The local viewer bound to 127.0.0.1 opens in your browser: Use --json to print the same analysis to stdout, or -o report.html to write the HTML file instead of serving it. - Line-by-line diffs do not answer “what changed and what might break.” - A 30-second ELI5 plus a module graph is a usable mental model before a PR review. - Lockfiles, binaries, and generated dirs are dropped before the model sees the patch. - The viewer is an ephemeral local HTTP server. Nothing is uploaded except the truncated diff you send to the model you configured. | Provider | How it is selected | Default model | |---|---|---| | OpenAI | OPENAI API KEY | gpt-4o-mini | | Google Gemini | GEMINI API KEY or GOOGLE API KEY | gemini-3.6-flash | | OpenRouter | OPENROUTER API KEY | openai/gpt-4o-mini | | Groq | GROQ API KEY | llama-3.3-70b-versatile | | Ollama | --base-url http://127.0.0.1:11434/v1 | llama3.2 | | Custom | --base-url + --api-key | gpt-4o-mini unless the URL matches a row above | Anthropic is not a native SDK path. Route it through OpenRouter --model anthropic/claude-sonnet-4 or any other OpenAI-compatible gateway. Vertex AI works the same way: pass its OpenAI-compatible --base-url . If more than one key is set, resolution order is: --api-key → DIFF GLANCE API KEY → OPENAI API KEY → OPENROUTER API KEY → GROQ API KEY → GEMINI API KEY / GOOGLE API KEY / GOOGLE GENERATIVE AI API KEY . A dummy key of ollama is used only when the base URL is local and no other key is present. | Flag | Behavior | |---|---| from to | Git refs. One arg diffs that ref vs the worktree; two args diffs from..to . | -s, --staged | Staged changes only git diff --cached . | -c, --commit