Skip to main content
This quickstart takes you from nothing installed to a first policy check in a few minutes. By the end you will have the CLI installed, an authenticated session, and your first findings on real code.
Prerequisites: Python 3.11 or newer, and a MergeGuide account. Create one at portal.mergeguide.com. You will also need an API key from the dashboard for headless login (or you can log in interactively).
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.
1

Install the CLI

Verify it installed:
2

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.
Omit --api-key to be prompted interactively. In CI, pass the key explicitly — init fails fast in non-interactive environments rather than hanging on a prompt.
3

Run your first check

With no paths, check reads your staged changes (or from stdin). Pass paths to check specific files or directories:

Option B — step by step

If you would rather set up each piece yourself:
1

Install the CLI

2

Authenticate

Or run mergeguide login with no flags to authenticate interactively. Confirm who you are signed in as:
3

Check your setup

doctor diagnoses your configuration and connectivity and reports anything that needs attention.
4

Run a check

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.
To get machine-readable output for tooling or CI, choose a format:

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.