Back Original

Lix – universal version control system for binary files

AI agents need version control beyond text

Changes AI agents make need to be reviewable by humans.

For code, Git solves this:

But agents modify binary files too. And Git can't diff them.

Git supports text files but not binary formats like PDF, DOCX, XLSX

Introducing Lix

Lix is a universal version control system that can diff any file format (.xlsx, .pdf, .docx, etc).

Unlike Git's line-based diffs, Lix understands file structure. Lix sees price: 10 → 12 or cell B4: pending → shipped, not "line 4 changed" or "binary files differ".

AI agent changes need to be visible and controllable

Excel file example

An AI agent updates an order status in orders.xlsx.

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 differ

Lix sees:

order_id 1002 status: 

- pending
+ shipped

JSON file example

Even for structured text file formats like .json lix is tracking semantics rather than line by line diffs.

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
+ dark

How does Lix work?

Lix adds a version control system on top of SQL databases that let's you query virtual tables like file, file_history, etc. via plain SQL. These table's are version controlled.

Why this matters:

┌─────────────────────────────────────────────────┐
│                      Lix                        │
│           (version control system)              │
│                                                 │
│ ┌────────────┐ ┌──────────┐ ┌─────────┐ ┌─────┐ │
│ │ Filesystem │ │ Branches │ │ History │ │ ... │ │
│ └────────────┘ └──────────┘ └─────────┘ └─────┘ │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│                  SQL database                   │
└─────────────────────────────────────────────────┘

Read more about Lix architecture →

Why did we build lix?

Lix was developed alongside inlang, open-source localization infrastructure.

We had to develop a new version control system that addressed git's limitations inlang ran into, see (see "Git is unsuited for applications"). The result is Lix, now at over 90k weekly downloads on NPM.

90k weekly npm downloads

Getting started

JavaScript JavaScript · Python Python · Rust Rust · Go Go

npm install @lix-js/sdk
import { openLix } from "@lix-js/sdk";

const lix = await openLix({
  environment: new InMemorySQLite()
});

await lix.db.insertInto("file").values({ path: "/hello.txt", data: ... }).execute();

const diff = selectWorkingDiff({ lix })

What's next

The next version of Lix will be a refactor to be purely "preprocessor" based. This enables:

                      ┌────────────────┐
  SELECT * FROM ...   │  Lix Engine    │   SELECT * FROM ...
 ───────────────────▶ │    (Rust)      │ ───────────────────▶  Database
                      └────────────────┘