Libra v0.1.0 — A Git Client Built for AI Agents
We're excited to announce the first official release of Libra, a high-performance reimplementation of the core Git engine in Rust, designed to be the agent-side counterpart to Mega.
What is Libra?
Libra is not another attempt to replicate Git 1:1 (for that, see gitoxide). Instead, Libra is a purpose-built Git client that rethinks the local storage layer while maintaining full wire-protocol compatibility with any Git server. The key innovation: replacing Git's loose file-based internals with SQLite, turning your local repository into a structured, queryable database.
This architectural choice is not just about cleanliness — it's about making version control programmatically accessible for AI agents that need to read, write, and reason about repository state without parsing scattered files.
Why Libra for Agents?
Traditional Git was designed for humans typing commands in a terminal. AI coding agents have different needs:
- Structured access — Agents shouldn't parse
.git/HEAD, walk loose object directories, or decode pack files. Libra's SQLite backend exposes repository state as queryable data. - Embeddable — Libra is a Rust library first, CLI second. Agents can link against it directly — no shell-out to
git, no subprocess overhead, no output parsing. - Lightweight & fast — Written in pure Rust with minimal dependencies. Clone, commit, and push operations are optimized for the tight feedback loops that agentic workflows demand.
- Cross-platform — Works on Linux, macOS, and Windows. Deploy agents anywhere.
What's in v0.1.0
Core Git Operations
Full support for the essential Git workflow: init, clone, add, rm, restore, status, log, diff, branch, commit, switch, merge, push, fetch, pull, and remote.
Git Wire-Protocol Compatibility
Libra implements the Git object model — objects, index, pack, and pack-index formats — faithfully following the Git documentation. It interacts seamlessly with any standard Git server, including GitHub, GitLab, and Mega.
SQLite-Backed Storage
The defining feature of Libra: loosely structured Git internals (config, HEAD, refs, and more) are unified into a single SQLite database. This means:
- Atomic operations on repository metadata
- No scattered dotfiles to manage or corrupt
- Repository state is a single queryable source of truth
Buck2 Build Support
Libra ships with Buck2 build configuration alongside Cargo, aligning with the Mega ecosystem's build toolchain.
Libra + Mega: The Complete Picture
With this release, Libra and Mega together form a full-stack version control system for the AI Agent era:
| Mega (Server) | Libra (Client) | |
|---|---|---|
| Role | Centralized monorepo engine | Lightweight local Git client |
| Optimized for | Petabyte-scale codebase management | Programmatic agent access |
| Storage | Distributed object store | SQLite-backed local DB |
| Key strength | Full codebase context & visibility | Embeddable, queryable, fast |
An AI agent uses Libra to clone a subtree from a Mega monorepo, make changes with structured metadata, and push back — with every action versioned and attributable. No shell scripts, no fragile git subprocess calls, no output parsing.
Get Started
# Install from source
git clone https://github.com/web3infra-foundation/libra.git
cd libra
cargo build --release
# Try it out
libra init my-repo
cd my-repo
echo "hello" > README.md
libra add README.md
libra commit -m "initial commit"What's Next
Libra's roadmap is tightly coupled with Mega's AI-native vision:
- Intent metadata — Attach structured intent specs to commits, enabling Mega to trace agent actions from task assignment to merge.
- Batch operations API — Optimized interfaces for agents performing bulk file operations across large worktrees.
- Agent identity & attribution — First-class support for agent-specific committer identities, enabling line-level human/AI code attribution.
Contributing
We welcome contributions of all kinds. Check out our Contributing Guide to get started. Before submitting a PR:
cargo clippy --all-targets --all-features -- -D warnings
cargo +nightly fmt --all --checkLicense
Libra is licensed under the MIT License.
Libra v0.1.0 — Git, reimagined for agents.