gitmono-dev/mega

Mega is an open-source implementation of Google Piper — a Git-compatible monorepo engine built for the AI Agent era.

What it solves

Mega addresses the limitations of traditional version control systems when used by AI coding agents. Standard Git workflows (isolated branches, fragmented context) often lead to agent hallucinations and a lack of unified codebase visibility. Mega provides a petabyte-scale monorepo engine that gives agents the full context of dependencies, build targets, and test coverage needed to make reliable, atomic cross-project changes.

How it works

Written in Rust, Mega acts as a centralized monorepo engine that is fully compatible with the Git protocol. It enables trunk-based development and supports Conventional Commits for machine-readable audit trails. To optimize access, it integrates with Scorpio (a FUSE filesystem) to mount monorepo folders locally without needing to check out the entire repository, and uses Buck2 as its default build system for reproducible, parallelized builds.

Who it’s for

Engineering teams and AI agent developers who need to manage massive codebases while providing AI agents with the programmatic interfaces and global visibility required for autonomous software engineering.

Highlights

  • Git Compatibility: Allows humans and agents to interact with a monorepo using standard Git interfaces.
  • Agent-Native Infrastructure: Designed to work with Libra, a lightweight Git client for programmatic agent access.
  • Scalable File Access: Uses ScorpioFS to mount large repositories as local filesystems.
  • Trunk-Based Development: Ensures agents always operate against the latest consistent state of the codebase.
  • Buck2 Integration: Leverages Meta's build system for high-performance, declarative builds.