Quickstart¶
You've installed WhyGraph. Now point it at a repo. This is the happy path: init, scan, wire an editor, sanity-check.
1. Initialize¶
From the repo you want to analyze:
This creates .whygraph/whygraph.db, writes a commented whygraph.example.toml, and adds the right
.gitignore entries. It's idempotent - run it again any time. It does not index CodeGraph yet;
that's the next step.
2. Scan¶
scan walks your git history, optionally crawls the remote for PRs and issues, refreshes the
CodeGraph index, and writes a per-commit LLM description. That fills .whygraph/whygraph.db with the
evidence WhyGraph serves.
The remote crawl is off by default
A fresh scan stays git-only and needs no token, because [scan].provider defaults to "off". To
pull PRs and issues, set provider = "github" (or "auto") in whygraph.toml.
For a fast, offline pass - no remote calls, no LLM - skip both phases:
Descriptions backfill lazily later, so this is a fine way to get started quickly. See Scanning your repo for what each phase does.
3. Wire your editor¶
Register the MCP server with your agent. For Claude Code:
That writes .mcp.json at the repo root and copies the bundled assets into .claude/. Other agents
work the same way - --agent cursor, --agent vscode, --agent codex. See
Wiring your editor for each one's config path.
4. Sanity-check the server¶
If it launches without error, your editor can launch it too. That's it - ask your assistant why a function exists, and WhyGraph answers from history.