What is Lix?
Lix is a version control system for files and data beyond code. It combines files, a database, and version control in one system.
Lix is an embeddable library, not a CLI. Tools and agents work with normal files. Apps query and update SQL rows. Lix tracks every change with branches, history, review, rollback, and merge.
Unlike Git, Lix tracks the entities inside files, not lines of text. See How Lix compares to Git.
Prime use cases
Safe workspaces for agents
Give each agent task its own branch. The agent can edit files and SQL rows without changing the main branch. Preview the result, then merge or discard it.
See Lix for AI Agents.
File-based apps with SQL and version control
Build editors, knowledge bases, document workflows, and other file-based apps. Existing tools keep using files while your app uses SQL for queries and transactions. Lix adds history, rollback, branches, merging, and review.
Files become queryable rows
File plugins map parts of a file to rows. A row can represent a Markdown block, CSV record, spreadsheet cell, JSON property, or document clause.
Apps read and write these rows with SQL. Lix records their history and writes changes back to normal files on disk.
Diffs are semantic: review the clause, cell, or row that changed, not lines of text. See Semantic Changes.
The JavaScript SDK includes Markdown and CSV plugins. Other formats, including JSON, XLSX, DOCX, and PDF, need a plugin.
App data does not have to come from a file. Register a schema, and Lix creates a SQL table with the same history and branches.
Pluggable storage
Storage is pluggable. Run Lix in memory, on the local filesystem, or against a server backed by S3. This makes Lix easy to embed and scale. See Persistence and Storage.
Local and remote
Lix supports local and remote repositories with the same API.
Run Lix on top of a local filesystem:
import { LocalFilesystem, openLix } from "@lix-js/sdk";
const lix = await openLix({
storage: new LocalFilesystem({ path: "./workspace", syncAllFiles: true }),
});
Or connect to a Lix server:
const lix = await openLix({
server: {
mode: "remote",
url: "https://example.com/workspaces/acme",
},
});
Remote clients get the same API: files, SQL, branches, and live queries. Clients on the same server see each other's changes live with lix.observe().
Permissions (in development)
Permissions are on the roadmap. They will live inside the repository: per file, per group, and versioned like any other change. A policy change can then be proposed, reviewed, and merged on a branch.
Next
- Getting Started: open Lix, write data, create a branch, and merge it.
- How Lix compares to Git: files, databases, and version control side by side.
- Schemas: define app rows and plugin entities.
- Semantic Changes: track changes inside files.
- Persistence: choose a local or remote setup.