merge-mentor
v4.3.0
Published
Automated code review bot powered by AI CLI tools (Copilot, OpenCode)
Downloads
1,089
Maintainers
Readme
Important: For detailed guides, advanced configurations, and CI/CD integration instructions, please visit our GitHub Pages Documentation Site.
🔒 Security, Privacy & AI Governance
Merge Mentor is a self-hosted CLI tool that runs directly on your local workstation or CI runner.
- Your Approved AI Provider Only: Merge Mentor does not route your code through any third-party SaaS server. It connects directly to your enterprise-approved AI provider (such as GitHub Copilot SDK, Amazon Bedrock, Azure OpenAI, or OpenCode SDK) using your own credentials.
- Zero Telemetry: No usage tracking, analytics, or telemetry of any kind are collected.
- Local Data & Logs: Audit logs, execution caches, and reports stay strictly on your local disk under
./.mergementor. - Dry-Run by Default: Reviews run in preview mode by default. Comments are only published to your pull requests when you explicitly pass
--write. - Local-Only Dashboard: The optional web dashboard (
merge-mentor ui) listens on127.0.0.1only and requires a per-launch access token, so other machines and websites cannot reach it.
Why Merge Mentor?
- ⚡ Faster feedback cycle — Developers get actionable feedback the moment they open a PR.
- 🧑💻 Free up your senior engineers — AI handles the routine first pass so human reviewers can focus on architectural decisions.
- 🎯 Goes beyond linting — Surfaces logic errors, insecure trust boundaries, missing edge cases, and cross-file issues.
- 🔒 Control where your code goes — Supports OpenAI-compatible endpoints (Ollama, vLLM, Azure OpenAI) for private hosting.
- 🔁 Safe to try — Dry-run is the default; preview every review before posting a single comment.
Quick Start
# Configure with environment variables (Azure DevOps is the default platform)
export MM_PLATFORM=github
export MM_GITHUB_TOKEN=your_token
export MM_GITHUB_REPO_OWNER=owner
export MM_GITHUB_REPO_NAME=repo
# Run a review (dry-run mode) instantly with npx
npx merge-mentor@latest review --pr 123
# Post comments directly to PR
npx merge-mentor@latest review --pr 123 --writeCLI Commands
Merge Mentor offers a set of subcommands to support reviews, plan checks, and automatic fixes:
- review: Reviews a pull request and identifies potential bugs, security issues, and quality problems.
- fix: Interactively fixes active review comments on a PR using an AI provider.
- reply: Generates responses to review comments and optionally resolves comment threads.
- describe: Generates a title, summary, and changelog for a pull request.
- doctor: Troubleshoots and checks AI provider CLI installations and configuration.
- repos: Manages local cloned repositories used for context loading.
- pbi: Reviews a Product Backlog Item / User Story / Issue for backlog quality.
- project: Reviews a project or feature plan hierarchy against planning guidelines.
- prd: Reviews a PRD or FRD Word document (
.docx) for gaps, ambiguity and testability before development starts. - plan: Generates a phased implementation plan for an Azure DevOps work item, grounded in the local repository.
- stats: Reports how many PRs Merge Mentor has reviewed and how many comments it has posted, queried live from your repository.
- ui: Launches the local web dashboard for interactive reviews.
For full configuration settings and options, refer to the Configuration Guide.
CI/CD Integration
Merge Mentor can be run automatically in your workflows using the --ci flag, which auto-detects pull request details and platform tokens.
Prerequisites
- Node.js 22+
- Supported Platforms: Windows, macOS, and Linux
- AI Providers: Copilot SDK (requires
MM_COPILOT_TOKEN) or OpenCode SDK.
License
MIT License. See LICENSE for details.
