Note
Lix is in alpha Β· Follow progress to v1.0 β
Lix is an embeddable version control system that enables Git-like features such as history, versions (branches), diffs, or blame for any file format.
What makes Lix unique:
- Embeddable - Works on top of your existing SQL database.
- Tracks deltas - Changes are semantically tracked and queryable via SQL.
- Supports any file format - Tracks changes in
.docx,.pdf,.json, etc. via plugins.
π How does Lix compare to Git? β
- AI agent sandboxing - Agents making changes to files can be tracked, diffed, and rolled back.
- Context management - Knowing what changed and why for better humant/agent performance.
- In-app version control - Branching and merging, audit trails, embedded in applications.
Use lix if your app or agent is modifying documents e.g. Word, PDFs, etc. Don't use lix if your main use case is not modifying documents, or the documents are on off generated artifacts that do not change.
JavaScript Β·
Python Β·
Rust Β·
Go
npm install @lix-js/sdkimport { openLix, selectWorkingDiff } from "@lix-js/sdk";
const lix = await openLix({
environment: new InMemorySQLite()
});
await lix.db.insertInto("file").values({ path: "/hello.txt", data: ... }).execute();
const diff = await selectWorkingDiff({ lix }).selectAll().execute();Unlike Git's line-based diffs, Lix understands file structure through plugins. Lix sees price: 10 β 12 or cell B4: pending β shipped, not "line 4 changed" or "binary files differ".
Before:
{"theme":"light","notifications":true,"language":"en"}After:
{"theme":"dark","notifications":true,"language":"en"}Git sees:
-{"theme":"light","notifications":true,"language":"en"}
+{"theme":"dark","notifications":true,"language":"en"}Lix sees:
property theme:
- light
+ darkThe same approach works for binary formats. With an XLSX plugin, Lix shows cell-level changes:
Before:
| order_id | product | status |
| -------- | -------- | -------- |
| 1001 | Widget A | shipped |
| 1002 | Widget B | pending |After:
| order_id | product | status |
| -------- | -------- | -------- |
| 1001 | Widget A | shipped |
| 1002 | Widget B | shipped |Git sees:
-Binary files differLix sees:
order_id 1002 status:
- pending
+ shippedLix uses SQL databases as query engine and persistence layer. Virtual tables like file and file_history are exposed on top:
SELECT * FROM file_history
WHERE path = '/orders.xlsx'
ORDER BY created_at DESC;When a file is written, a plugin parses it and detects entity-level changes. These changes (deltas) are stored in the database, enabling branching, merging, and audit trails.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Lix β
β β
β ββββββββββββββ ββββββββββββ βββββββββββ βββββββ β
β β Filesystem β β Branches β β History β β ... β β
β ββββββββββββββ ββββββββββββ βββββββββββ βββββββ β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β SQL database β
β (SQLite, Postgres, etc.) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Read more about Lix architecture β
- Getting Started Guide - Build your first app with Lix
- Documentation - Full API reference and guides
- Discord - Get help and join the community
- GitHub - Report issues and contribute