Libra
AI-native, Git-compatible version control for shared workflows between humans and LLMs.
Libra is a partial implementation of a Git client, developed in Rust. It aims to stay broadly compatible with Git while intentionally evolving into an AI agent–native workflow: the libra code command starts an interactive TUI with a background web server designed for collaborative use by humans and AI agents.
Highlights
- Git-compatible on-disk formats (
objects,index,pack,pack-index) for interoperability with standard Git remotes - Transactional metadata layer: replaces Git’s loose text files (e.g., refs/config/HEAD) with SQLite-backed state
- Libra Code: TUI mode, web-only mode, and an MCP stdio mode for AI client integrations
- Vault-backed signing and repo-local SSH keys for safer commit and remote operations
- Optional tiered object storage (S3/R2-compatible) and Cloudflare D1/R2 backup/restore workflows
- Stable exit codes and structured JSON error reports for automation and agent wrappers
Libra Code (AI Workflows)
Libra Code supports three modes:
- TUI mode (default):
libra code - Web mode:
libra code --web - Stdio mode (MCP):
libra code --stdio
Provider selection is done with flags:
libra code --provider gemini
libra code --provider openai --model gpt-4o-mini
libra code --provider anthropic --model claude-3-5-sonnet-latest
libra code --provider ollama --model llama3.2Storage, Cloud, and Security
- Local repository state lives under
.libra/. - Vault is enabled by default for
libra init, generating signing material and storing the unseal key outside the repository at~/.libra/vault-keys/<repoid>. - For very large repositories, Libra can store objects in an S3-compatible backend with a local cache, and can sync metadata/objects to Cloudflare D1/R2 via
libra cloud.
Error Reporting
Libra CLI failures use stable exit codes and stable error codes. When stderr is not a TTY, Libra appends a JSON stderr report (or you can force it with LIBRA_ERROR_JSON=1).