Lix – 通用二进制文件版本控制系统
Lix – universal version control system for binary files

原始链接: https://lix.dev/blog/introducing-lix/

AI 代理越来越多地修改各种文件类型,但传统的版本控制系统(如 Git)由于其基于行的差异比较,难以处理代码之外的文件。**Lix** 提供了一种解决方案:一种通用的版本控制系统,能够智能地比较*任何*文件格式的差异——从电子表格 (.xlsx) 到文档 (.docx)——通过理解数据的*结构*和*语义*,而不仅仅是行变化。 Lix 不会简单地显示“二进制文件不同”,而是会突出显示*具体*发生了什么变化(例如,“order_id 1002 状态:待处理 → 已发货”)。这使得人工审查、安全回滚以及针对 AI 驱动修改的人工参与工作流程成为可能。 重要的是,Lix 利用现有的 SQL 数据库进行存储和持久性,并添加了一个可通过标准 SQL 查询访问的版本控制层。它建立在强大的基础上,并且正在获得发展势头,每周 NPM 下载量超过 9 万次,最初是为解决 inlang 本地化基础设施中遇到的限制而开发的。未来的开发重点是速度和更广泛的数据库兼容性。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Lix – 通用二进制文件版本控制系统 (lix.dev) 9 分,来自 onecommit 1 小时前 | 隐藏 | 过去 | 收藏 | 3 条评论 gu5 53 分钟前 | 下一个 [–] Lix 也是官方 Nix 包管理器实现的软分叉:https://lix.systems/回复 bibimsz 2 分钟前 | 上一个 | 下一个 [–] 引人注目的问题陈述。md 和 csv 都有其局限性。回复 solidsnack9000 54 分钟前 | 上一个 [–] 最初我很难理解这如何工作,但看起来有一个插件系统?回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Changes AI agents make need to be reviewable by humans.

For code, Git solves this:

  • Reviewable diffs: What exactly did the agent change?
  • Human-in-the-loop: Review, then merge or reject.
  • Rollback changes: Undo mistakes instantly.

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

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

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".

  • Reviewable diffs: See exactly what an agent changed in any file format.
  • Human-in-the-loop: Agents propose, humans approve.
  • Safe rollback: Undo mistakes instantly.

AI agent changes need to be visible and controllable

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

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

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 doesn't reinvent databases — durability, ACID, and corruption recovery are handled by battle-tested SQL databases.
  • Full SQL support — query your version control system with the same SQL.
  • Can runs in your existing database — no separate storage layer to manage.
┌─────────────────────────────────────────────────┐
│                      Lix                        │
│           (version control system)              │
│                                                 │
│ ┌────────────┐ ┌──────────┐ ┌─────────┐ ┌─────┐ │
│ │ Filesystem │ │ Branches │ │ History │ │ ... │ │
│ └────────────┘ └──────────┘ └─────────┘ └─────┘ │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│                  SQL database                   │
└─────────────────────────────────────────────────┘

Read more about Lix architecture →

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

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 })

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

  • Fast writes (RFC 001)
  • Any SQL database (SQLite, Postgres, Turso, MySQL)
  • SDKs for Python, Rust, Go (RFC 002)
                      ┌────────────────┐
  SELECT * FROM ...   │  Lix Engine    │   SELECT * FROM ...
 ───────────────────▶ │    (Rust)      │ ───────────────────▶  Database
                      └────────────────┘
联系我们 contact @ memedata.com