Installation¶
WhyGraph follows a one-global-install, use-anywhere model - like npx, but for Python. You install
the package once; that puts whygraph and whygraph-mcp on your PATH. Then
whygraph init --agent <name> wires each project so its editor can launch the MCP server.
Pick the path that fits where you are.
The host needs only Docker - no Python, Node, gh, or CodeGraph. A tiny shim runs everything
inside one published image.
This drops whygraph and whygraph-mcp shims on your PATH. Each wraps a
docker run --rm -v "$PWD:/workspace" … ghcr.io/mtrdesign/whygraph against the current repo. The
container is ephemeral per command. See Run with Docker for the full story.
Not yet published
WhyGraph isn't on PyPI yet. Use the GitHub or local-checkout paths until v1 ships.
Install straight from the repo - latest main, a feature branch, or a tag:
# Latest from main:
uv tool install "git+https://github.com/mtrdesign/whygraph.git"
# A specific branch:
uv tool install "git+https://github.com/mtrdesign/whygraph.git@feature/some-branch"
# A specific tag (once tagged):
uv tool install "git+https://github.com/mtrdesign/whygraph.git@v1.0.0"
Re-running upgrades in place. To switch refs, add --force. pipx accepts the same URLs.
Verify¶
Both should resolve to your global tool install. With the Docker shim, which whygraph-mcp points at
the shim script on your PATH.