Rationale layer over CodeGraph: explains why code exists, not just what it does.
For each chunk of code, WhyGraph collects evidence from git history and GitHub - commits, blame, PRs, the issues those PRs closed - then serves it to AI editors over MCP, plus an on-demand rationale card (purpose, why, constraints, tradeoffs, risks) with a persistent cache.
whygraph serve puts the same data in a local web panel: an Explorer over the code graph, and a Chat assistant that answers questions about the repo by calling WhyGraph's own tools.
📖 Full documentation → https://mtrdesign.github.io/whygraph/
Installation, configuration, the CLI and MCP reference, the Docker delivery, and the service model all live there. This README is just the elevator pitch.
Install WhyGraph once, then from the repo you want to analyze:
whygraph init # bootstrap the WhyGraph DB + write config
whygraph scan # crawl history + refresh CodeGraph + LLM descriptions
whygraph init --agent claude # wire the MCP server into your editor
whygraph-mcp # sanity-check the server (Ctrl-C to exit)
whygraph serve # open the Explorer + Chat panel at http://localhost:8765The only-Docker install needs nothing but Docker on the host — one command pulls the image and installs the shims from inside it. The tag in the URL is the version you get:
curl -fsSL https://raw.githubusercontent.com/mtrdesign/whygraph/v1.1.1/scripts/install.sh | shSee the Getting Started guide for every install path and the Quickstart for the walkthrough.
uv sync # bootstrap .venv and install deps
uv run pytest # full test suite
uv run whygraph version # CLI sanity check
uv run whygraph-mcp # launch MCP server on stdio
make docs # serve the documentation site locallyA Makefile wraps the common dev tasks; run make to list them. See CLAUDE.md for the architecture and conventions.