A Rust-based, AI agent–native version control system that maintains Git compatibility while integrating SQLite and S3 storage backends, designed for Monorepo environments and AI-driven development workflows via MCP.
Overview#
Libra is an evolving AI agent–native version control system maintained by the web3infra-foundation organization. It addresses two core pain points of traditional VCS in the AI era: lack of native AI agent interaction interfaces, and storage/performance bottlenecks in large-scale Monorepo scenarios.
- Primary Language: Rust (99.1%)
- Current Version: 0.1.0
- Development Activity: 142 commits, 60+ contributors, 5 open issues, 1 PR
Core Capabilities#
Git Compatibility#
- Essentially compatible with Git, developed with reference to official Git documentation
- Disk format support: objects, index, pack, pack-index
- Remote operations: supports interaction with standard Git remote repositories (push/pull)
- Worktree management: fully compatible with
git worktreesubcommand set
AI Agent Integration#
Three operation modes:
- TUI Mode (default): Interactive terminal UI + background Web server
- Web Mode: Web server only, suitable for remote development
- Stdio Mode (MCP): Model Context Protocol server for AI client integration (Claude Desktop, etc.)
Agent Workflow Design#
- Phase 0: Input preprocessing (intent extraction, risk assessment, sandbox environment)
- Phase 1: Planning & task graph generation (DAG generation, execution plan)
- Phase 2: Task execution (context injection, code generation, three-layer validation)
- Phase 3: System-level validation & security audit
- Phase 4: Decision & release (automated/manual review based on risk score)
Storage Architecture Innovation#
- SQLite Database: Uses SQLite to manage config, HEAD, refs, etc., providing unified transactional management
- S3-Compatible Object Storage: Supports AWS S3, Cloudflare R2, MinIO as local storage alternative or supplement
- Tiered Storage: Small objects stored both locally and remotely; large objects stored remotely with local LRU cache
Monorepo Design#
- No submodule/subtree commands
- Simplified dependency management, supports massive repositories, maintains single source of truth
CLI Command Support#
Implemented: init, clone, add, rm, restore, status, clean, stash, lfs, log, show, branch, tag, commit, switch, rebase, merge, reset, cherry-pick, push, fetch, pull, diff, blame, revert, remote, open, config, reflog, worktree
Pending: gc, prune, fsck, maintenance, cat-file, hash-object, rev-parse, rev-list, describe, show-ref, symbolic-ref, verify-pack, pack-objects/unpack-objects, ls-remote, grep, bisect, filter-branch, notes, archive
Quick Start#
# Build
cargo build
# Launch interactive TUI
libra
# Initialize repository
libra init
# Clone repository
libra clone <repository>
# Launch Libra Code (TUI + Web)
libra code
# MCP Stdio mode
libra code --stdio
Claude Desktop Integration#
{
"mcpServers": {
"libra": {
"command": "/path/to/libra",
"args": ["code", "--stdio"],
"cwd": "/path/to/your/libra/repo"
}
}
}
S3 Storage Configuration#
| Variable | Description | Required | Default |
|---|---|---|---|
| LIBRA_STORAGE_TYPE | Storage backend type: s3 or r2 | Yes | - |
| LIBRA_STORAGE_BUCKET | Bucket name | Yes | libra |
| LIBRA_STORAGE_ENDPOINT | S3-compatible endpoint URL | Yes (R2) | AWS S3 default |
| LIBRA_STORAGE_ACCESS_KEY | Access Key ID | Yes | - |
| LIBRA_STORAGE_SECRET_KEY | Secret Access Key | Yes | - |
| LIBRA_STORAGE_THRESHOLD | Tiered storage size threshold (bytes) | No | 1048576 (1 MB) |
| LIBRA_STORAGE_CACHE_SIZE | Local cache size limit (bytes) | No | 209715200 (200 MB) |
Use Cases#
- AI-assisted development: Version control driven by AI agent & human collaboration
- Large repository management: Version control needs in Monorepo architecture
- Cloud-native storage: Scenarios requiring S3-compatible storage backends
- Cross-platform development: Supports Windows/Linux/macOS
Pending Confirmation#
- No official release published yet
- Production readiness needs evaluation (v0.1.0, some Git commands unimplemented)
- No performance comparison data with Git available
- No precompiled binary downloads found; requires building from source
- libra.tools domain is currently parked; relationship to project unclear