
multi-repo-agent
by hanfour
multi-repo-agent (mra)
AI-powered development across multiple repositories — from a single terminal.
Change an API in repo A. mra automatically finds every downstream consumer in repos B, C, D — reviews the impact, updates the code, and opens the PRs. All from one command.
v3.1.1 | 42 CLI commands | 6 AI agents | 9 MCP tools | 100 test suites | 10 TM-tracked security controls
Why mra?
Modern software lives across many repos. One API change can silently break three frontends. Claude Code only sees one directory at a time.
mra bridges that gap.
| Without mra | With mra |
|---|---|
| Manually check which repos consume your API | mra scan auto-detects cross-repo dependencies |
| Open separate Claude sessions per repo | mra my-api --with-deps loads all related repos |
| Hope the reviewer catches breaking changes | mra review --pr 123 finds consumer:42 still references the old field |
| Re-explain project context every session | PKB caches project knowledge — agents wake up in ~50 tokens |
| Guess if your review is any good | mra eval-review measures precision/recall vs human reviews |
Quick Start
# Install
git clone https://github.com/hanfour/multi-repo-agent.git ~/multi-repo-agent
cd ~/multi-repo-agent && bash install.sh && source ~/.zshrc
Full docs: https://hanfour.github.io/multi-repo-agent/
# Initialize workspace
mra init ~/workspace --git-org [email protected]:my-org
# Verify setup
mra doctor
# Start developing across repos
mra my-api --with-deps
Core Features
1. Cross-Repo Orchestration
Launch Claude with full visibility into multiple repos and their dependencies.
mra my-api --with-deps # Loads my-api + all consumers/dependencies
mra my-api frontend-app # Load specific repos together
mra --all # Load everything
The orchestrator dispatches sub-agents per repo, coordinates changes in dependency order, and runs code review after each commit.
1b. Branch-Aware Sync & Cross-Repo PRs
Keep many repos on the same feature branch, then ship them together. Every command runs in dependency order and can target a subset of repos.
mra branch status # Repos needing attention (ahead/behind/dirty/PR state)
mra branch new feature/login # Create the same branch across repos
mra branch pr # Push branches + open PRs (deps first)
mra branch merge --wait-ci # Merge open PRs once CI is green
| Command | What it does |
|---|---|
mra sync [--safe] [--push] [--review] [--json] | Clone/pull every repo; --safe is ff-only, --push pushes, --review auto-reviews, --json emits per-repo {repo, action, ok} |
mra branch status [--all] [--fetch] [--json] | Cross-repo branch overview (default: repos needing attention; --json: every repo) |
mra branch new|switch <name> | Create/switch the same branch across all repos |
mra branch pr [--base <ref>] [--dry-run] [repos…] | Push feature branches and open PRs (deps first; optional [repos…] subset) |
mra branch merge [--strategy S] [--delete-branch] [--wait-ci] [--ci-timeout <sec>] [--dry-run] [repos…] | Merge open PRs, gated on mergeable + CI; --wait-ci polls CI before merging |
--json (on sync and branch status) is designed for piping into other tooling — worker logs go to stderr so stdout stays valid JSON.
2. AI Code Review with Debate
Three review strategies auto-selected by diff size:
Related servers

n8n
Updated todayby n8n-io
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

mcp-server-git
OfficialUpdated todayA Model Context Protocol server providing tools to read, search, and manipulate Git repositories programmatically via LLMs

mcp-server-fetch
OfficialUpdated todayA Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs