Review your changes before anyone else sees them
The mh command line reviews the changes on your machine with the same rules, configuration and codebase context as pull request reviews. Nothing is posted to your code host.
How it works
Install and sign in
Install mh with Homebrew or from the releases page, then run mh login and approve the code in your browser.
Review locally
Run mh review for your branch and uncommitted edits, or narrow it to staged changes, committed changes or some paths.
Check every push
mh hook install runs a review on git push and stops when a major finding turns up. In CI, use an API key instead.
What you get
- Findings grouped by file
- Each finding prints with its severity, explanation and any suggested change. Add --deep or --max for a more thorough tier.
- Exit codes for scripts
- mh review exits 1 when a finding is at or above --fail-on, which defaults to major, so scripts and hooks can act on the result.
- SARIF and JSON in CI
- --sarif writes SARIF 2.1.0 for code-scanning dashboards, and --json writes the full result.
- Check your configuration
- mh config check validates every .mergeharbor file, and mh config explain shows which settings and rules apply to a file.
- Branch status at a glance
- mh status shows the pull request for your branch, its latest confidence score and its open findings.
- An MCP server for agents
- mh mcp runs the MergeHarbor MCP server over stdio, so coding agents can read and fix findings from your terminal.
Frequently asked questions
Do local reviews count toward my plan?
Yes. They count like pull request reviews and appear in the console under Pull requests → Local reviews. The repository must be connected to your organization.
Can I skip the push hook once?
Yes. Use git push --no-verify to skip it once, or set MH_FAIL_ON=critical to block only on critical findings.
How do I use mh in CI?
Create an API key in the console, then run mh login --api-key <key> or set MERGEHARBOR_API_KEY. Combine --sarif with --fail-on none to report without failing the job.
Have another question? Ask our support team
Review every pull request with the context of your whole codebase
Connect a code host in minutes. Reviews start right away, and codebase context is added as indexing completes.