DISCOVER THE FUTURE OF AI AGENTS

Mega

Added Apr 23, 2026
Agent & Tooling
Open Source
RustAI AgentsCLIAgent & ToolingOtherDeveloper Tools & Coding

An open-source Git-compatible monorepo engine for the AI Agent era, supporting partial clone, FUSE mount, and cross-project atomic changes.

Mega is an open-source monorepo engine developed by web3infra-foundation, designed to provide underlying infrastructure for code management in the AI Agent era. Its core design philosophy mirrors Google's internal Piper system. The project uses Rust as the core language with TypeScript for frontend logic, relies on Cargo and Meta's Buck2 as its dual build system, and is open-sourced under MIT + Apache-2.0 dual licensing.

Core Capabilities#

  • Full Git Protocol Compatibility: Supports standard clone/push/pull operations with partial clone for any subdirectory within the monorepo, allowing seamless push-back of changes.
  • Scorpio FUSE Filesystem: Mounts any monorepo directory as a local filesystem without needing to checkout the entire repository.
  • Trunk-Based Development: Single-trunk source management providing AI Agents with a consistent, up-to-date codebase state.
  • Conventional Commits: Structured, machine-readable commit messages driving automated changelogs, semantic versioning, and audit trails.
  • Built-in MR System: With conversation and comment support.
  • LFS Protocol Support: Built-in Large File Storage with object storage and file locking.
  • Third-party Repository Import: Read-only import of external Git repositories preserving original commit history.
  • Commit Authentication: Binds commit SHAs to user identities with anonymous commit support.

Architecture#

The project uses a multi-crate architecture with core modules: mono (CLI entry point), orion/orion-server (Git server protocol and HTTP/Web server based on Axum), jupiter/callisto (ORM entities and schema management via Sea-ORM + PostgreSQL), saturn (storage layer), vault (key/signature management supporting RSA/Ed25519/secp256k1/PGP/HMAC), io-orbit (IO abstraction), ceres (Git internal object processing).

The database uses a dual-track design: Mega-side objects (mega_commit/tree/blob/tag/mr) and Git-side objects (git_commit/tree/blob/tag/repo/pr/issue), unified through a raw_blob table supporting database, local-fs, and remote_url storage backends.

Security integrates Amazon Cedar policy engine (cedar-policy), SSH via russh, and performance optimization with jemalloc/mimalloc allocators.

Roadmap#

  • IntentSpec: Structured machine-readable intent contracts driving Agent task execution.
  • Multi-Agent DAG Orchestration: Pipeline architecture for multi-Agent cross-workflow coordination.
  • Code Attribution: Line-level tracking of AI-generated vs human-written code.

Companion Project#

Libra — A Rust-based Git-compatible client with SQLite storage, designed for AI Agents, providing libra code interactive TUI + Web server mode with full Git subcommand support.

Build & Deployment#

git clone https://github.com/web3infra-foundation/mega.git
cd mega
cargo install --git https://github.com/buck2hub/cargo-buckal.git
cargo buckal build

Database initialization:

sea-orm-cli generate entity -u "postgres://postgres:$postgres@localhost/mega" -o jupiter/entity/src

A docker/ directory exists for containerized deployment. The project is at v0.1.0 (16 releases) with 3,868+ commits showing high development activity.

Related Projects

View All

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.