Skip to main content

Crate lit

Crate lit 

Source
Expand description

§Lit — The Agentic-First Distributed Version Control System

Lit is a complete Git replacement written in Rust, designed for AI agents first and humans second. Every command emits structured JSON by default with typed error codes, merge conflicts as structured objects, and native MCP/REST API integration.

§Key Features

  • Structured output: All commands return typed JSON responses via response types
  • Post-quantum cryptography: SHA3-512 + BLAKE3 hashing, ML-DSA signatures, AES-256-GCM encryption
  • MCP server: JSON-RPC 2.0 tool server with 30 tools via commands::mcp_serve
  • Machine-readable ontology: Full command/type discovery via ontology
  • Typed errors: errors::LitError with error codes, user messages, and remediation hints

§Usage

use lit::commands;
use lit::ontology;

// Generate the full JSON Schema for agent SDK integration
let schema = ontology::generate_schemas();

// Get the machine-readable ontology
let ont = ontology::get_ontology();

Modules§

commands
VCS command implementations (init, add, commit, status, diff, merge, etc.)
config
Hierarchical configuration (repo-local → user global → env vars)
core
Core VCS primitives: objects (blob, tree, commit, tag), refs, and repo discovery
crypto
Post-quantum cryptographic operations: hashing, signing, encryption, key management
errors
Typed error system with machine-readable error codes and remediation hints
formatter
Output formatting (JSON, human-readable, MessagePack)
network
Network transport layer: HTTPS, SSH, lit:// protocol, air-gap enforcement
ontology
Machine-readable ontology and JSON Schema generation for agent discovery Lit Ontology — machine-readable capability schema for autonomous agent discovery.
response
Typed response structs for all 42+ CLI commands
storage
Object store and index (staging area) persistence

Enums§

BisectCommands
ConfigCommands
LfsCommands
RemoteCommands
StashCommands
SwarmCommands
TxCommands