Pre-push hook
localWire `mesrai review` into your git pre-push hook. Reviews run before code leaves your machine.
Run the same multi-agent review on your machine, in CI, or as a pre-push hook. Same engine, same rules, same models — review before code ever leaves your laptop.
curl -fsSL https://mesrai.com/install | bash
with a team key
curl -fsSL https://mesrai.com/install | bash -s -- --team-key mesrai_xxxxx
npm direct
npm install -g @mesrai/cli && mesrai skills install
Wire `mesrai review` into your git pre-push hook. Reviews run before code leaves your machine.
Drop one shell line into GitHub Actions, GitLab CI, Bitbucket Pipelines, or Azure DevOps. Same engine, same rules, same models.
Run `mesrai review --all` on a feature branch — get a single report across every changed file before you open the PR.
CLI reads the same Mesrai Rules + centralized config your cloud workspace uses. Local + remote review stay identical.
mesrai auth loginAuthorize the CLI to your workspacemesrai reviewReview the current diff against base branchmesrai review --files src/api/users.tsReview specific files onlymesrai review --severity highSet minimum severity threshold for outputmesrai rules syncPull latest Mesrai Rules from your workspaceCLI reviews appear under /cli-reviews in your Mesrai workspace — full audit trail of who ran what, when, and what findings shipped to the cloud or stayed local.
mesrai skills install auto-detects every agent root present on the machine and writes its bundled skills into each one. A `.mesrai-managed-skills.json` manifest tracks which files this run owns — re-syncs are idempotent, uninstalls leave nothing behind.
One install URL updates the CLI and writes bundled Mesrai skills into every detected agent root on the machine — no separate repos, no per-IDE setup.
`--agent`, `mesrai schema`, and `--fields` give skills, CI runners, and thin MCP layers a stable JSON envelope they can parse without scraping terminal output.
`mesrai review` for local diffs against your team's Mesrai Rules. `mesrai pr suggestions` for fetching server-side suggestions on an existing GitHub/GitLab PR.
Two ways. (1) `npx mesrai` runs it without installing anything — best for one-off reviews or CI steps. (2) `npm install -g @mesrai/cli` installs it globally and exposes the `mesrai` binary. Both ship the same engine; pick based on whether you want the binary persistent on your machine.
Yes — that's the primary use case. `mesrai review` from the repo root reviews uncommitted + unpushed changes. Pair it with a Git pre-push hook (`mesrai install hook`) and every push is reviewed before it leaves your machine. Same engine as the cloud reviewer; same Mesrai Rules applied.
Yes. Add `npx mesrai review --ci` as a step in any CI runner — it auto-detects the PR base + head from the standard CI environment variables (GitHub Actions, GitLab CI, CircleCI, Buildkite, Jenkins). The CLI exits with a non-zero code if blocking-severity findings exist, so it slots cleanly into a required-check gate.
Config lives at `~/.config/mesrai/config.json` (Linux/macOS) or `%APPDATA%\mesrai\config.json` (Windows). Auth tokens are stored in the OS keychain (macOS Keychain, GNOME Keyring, Windows Credential Manager) — never in plaintext on disk. Rotate or revoke from Settings → CLI Tokens in the web app.
Yes. `mesrai review --base main --head feature/x` reviews the diff between any two refs. `mesrai review --since HEAD~10` reviews the last 10 commits. `mesrai review path/to/file.ts` reviews a single file. Useful for batch-reviewing legacy branches or auditing a specific change set.
Partially. The CLI ships an offline ruleset (~120 deterministic rules + lint checks) that runs entirely locally — no network required. The full multi-agent AI review needs a network call to either the Mesrai cloud (default) or your own LLM endpoint (BYOK). Local-only mode is enabled with `mesrai review --offline`.
Free CLI for free-tier workspaces. Get a CLI key from your workspace settings.