# 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.

[Start free trial](https://app.mergeharbor.com/signup) [Read the docs](https://mergeharbor.com/docs/cli)

Reviewing before a push

```
$ brew install mergeharbor/tap/mh
$ mh login

# only what you are about to commit
$ mh review --staged

# a deeper review of one folder
$ mh review --deep src/billing

# review on every git push
$ mh hook install
```

## How it works

1.  ### Install and sign in

    Install mh with Homebrew or from the releases page, then run mh login and approve the code in your browser.

2.  ### Review locally

    Run mh review for your branch and uncommitted edits, or narrow it to staged changes, committed changes or some paths.

3.  ### 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.

Documentation: [Command line (mh)](https://mergeharbor.com/docs/cli) [Import existing configuration](https://mergeharbor.com/docs/import-config)

## 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](https://mergeharbor.com/contact?topic=support)

## Explore other features

### Coding agents and MCP

Hand findings to your coding agent in one click

[Coding agents and MCP](https://mergeharbor.com/features/coding-agents)

### Rules and learning

Plain-English rules and lessons from team feedback

[Rules and learning](https://mergeharbor.com/features/learning)

### Codebase-aware review

Reviews that read your codebase, not just the diff

[Codebase-aware review](https://mergeharbor.com/features/review-agent)

## 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.

[Start free trial](https://app.mergeharbor.com/signup) [Book a demo](https://mergeharbor.com/contact?topic=sales&source=demo)
