Installation¶
You install WhyGraph once. The Docker install gives you the whygraph command and, through it,
the portal: one long-running server that holds all your projects. Start it with
whygraph up and add your repositories from the browser. Docker is the only way to install it.
The host needs only Docker - no Python, Node, gh, or CodeGraph. One command pulls the
published image and installs the shims from inside it:
The tag in that URL is the version. v2.5.0 installs 2.5.0 - no second flag to keep in
sync. This drops a whygraph shim on your PATH (plus a whygraph-mcp stub that only prints a
removal message). The version and install commands wrap a docker run --rm -v "$PWD:/workspace" … ghcr.io/mtrdesign/whygraph
against the current repo and are ephemeral. The exception is the portal:
whygraph up manages two named, long-lived containers - the portal and its
database - so the web panel and the MCP endpoints can outlive the command. See Run with Docker for the full
story.
Install a different version by passing it through the pipe - the URL then only decides which installer runs:
curl -fsSL https://raw.githubusercontent.com/mtrdesign/whygraph/v2.5.0/scripts/install.sh | sh -s 2.5.0
curl -fsSL https://raw.githubusercontent.com/mtrdesign/whygraph/v2.5.0/scripts/install.sh | sh -s latest
WHYGRAPH_VERSION=2.5.0 does the same and wins over the argument. WHYGRAPH_BIN_DIR picks the
install directory (default ~/.local/bin), and WHYGRAPH_IMAGE_REPO points at a private mirror.
Two more are read by the installed shim rather than the installer: WHYGRAPH_IMAGE overrides
the image a command runs, and WHYGRAPH_PORT sets the portal's port when you have not chosen one
with whygraph up --port.
If the installer itself misbehaves
Swap the tag for main - …/whygraph/main/scripts/install.sh - to get the newest
installer while still installing the last published release. A per-tag script is frozen at
that tag, so this is the escape hatch for an installer bug.
A mistyped tag fails silently
curl -f prints nothing on a 404, so curl … | sh reads an empty script and exits 0
without installing anything - the failure mode every curl | sh installer shares. When
you want a visible failure (or want to read the script first), download it separately:
No curl, air-gapped, or CI? Run the in-image generator directly - it is what the script
above delegates to, and dropping the pipe prints exactly what would be written:
Verify¶
With the Docker shim, this reports the version baked into the image the shim runs - the version you pinned, not something read from the host.