Prerequisites: Python 3.11 or newer, and a MergeGuide account. Create one at
portal.mergeguide.ai. You will also need an API
key from the dashboard for headless login (or you can log in interactively).
Option A — one command (recommended)
mergeguide init is the first-run orchestrator. After installing the CLI, a single
command authenticates you, installs the MCP server, and wires up your git hooks.
Run the first-run setup
init is idempotent — it preflights your environment, writes
.mergeguide/config.yaml, authenticates against the dashboard, installs the
@mergeguide/mcp-server npm package via npx, registers it in your project’s
.mcp.json, and installs git pre-commit / pre-push hooks. Re-running it on a
configured install is a fast no-op.Option B — step by step
If you would rather set up each piece yourself:Authenticate
mergeguide login with no flags to authenticate interactively. Confirm
who you are signed in as:Check your setup
doctor diagnoses your configuration and connectivity and reports anything
that needs attention.Reading the result
check prints each finding with its file, line, severity, and remediation
guidance, then exits:
- Exit code 0 — no blocking findings.
- Exit code 1 — policy violations were found.
- Exit code 2 — a configuration or environment error.
Next steps
Install the rest
Add the MCP server, IDE extension, git hooks, and the PR gate.
Configure policies
Set up
.mergeguide.yaml and choose your frameworks.CLI reference
Every command and flag in detail.
Core concepts
The vocabulary the rest of the docs use.