Agents and tools work with files. Applications need a database. Teams need version control.
Lix combines all three: normal files for tools, SQL rows for apps, and version control for every change.
- π Keep normal files. Existing tools and agents can keep reading and writing files on disk.
- π§ Query everything with SQL. Query file content, app data, and change history without rereading whole files.
- π Track semantic changes. Review the paragraph, CSV record, property, or app row that changed.
- π Branch and merge safely. Give every user or agent an isolated workspace, then review and merge its work.
- β Use ACID transactions. Update files and rows together while Lix records their history.
- π€ Run locally or remotely. Embed Lix in an app or connect to a shared workspace through the server protocol.
Flashtype is a Markdown editor for Claude and Codex built on Lix. Open local Markdown files, let agents edit them, review changes as diffs, and restore previous versions from history.
JavaScript Β·
Python Β·
Rust Β·
Go
npm install @lix-js/sdkimport { LocalFilesystem, openLix } from "@lix-js/sdk";
const lix = await openLix({
storage: new LocalFilesystem({ path: "./workspace", syncAllFiles: true }),
});
await lix.execute("INSERT INTO lix_file (path, content) VALUES ($1, $2)", [
"/notes/status.txt",
new TextEncoder().encode("ready"),
]);Connect to a shared Lix server with the same API:
const lix = await openLix({
server: {
mode: "remote",
url: "https://example.com/workspaces/acme",
},
});Plugins map file parts such as paragraphs, cells, and properties to SQL rows. Your app can also define its own rows.
what tools see what your app can query
entity field value
/orders.csv ββ plugin βββΆ row 1001 status shipped
row 1002 status pending
Apps read and write the rows with SQL. Lix tracks every change. With LocalFilesystem, other tools and agents keep working with the files on disk.
The SDK includes plugins for Markdown and CSV. Add a plugin for other formats, such as JSON, XLSX, DOCX, or PDF.
database semantics
(query Β· transact Β· track)
β²
β
PostgreSQL / SQLite β β
Lix
SQL and transactions, β normal files and SQL rows,
but data lives in tables β with every change tracked
β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββΆ
β file interoperability
β (any agent or tool can read/write)
β
β Filesystem / Git
β normal files,
β but no queryable rows
| Capability | Filesystem / Git | PostgreSQL / SQLite | Lix |
|---|---|---|---|
| Works with normal workspace files | Yes | No | Yes |
| Queries file content with SQL | No | Only after import | Yes, with a plugin |
| ACID transactions | No | Yes | Yes |
| Change history | Git: blobs and lines; filesystem: no | You build audit tables | Files and rows |
| Branches and merging | Git: yes; filesystem: no | You build them | Yes |
| Reviews changes by paragraph, cell, or row | Text lines only | You build it | Yes, with a plugin |
Give each agent its own branch. The agent works with normal files while the main branch stays stable. Preview its work, then merge or discard it.
const main = await lix.activeBranchId();
const task = await lix.createBranch({ name: "Agent task" });
await lix.switchBranch({ branchId: task.id });
// Run the agent. Its file and SQL writes are isolated to this branch.
await lix.switchBranch({ branchId: main });
const preview = await lix.mergeBranchPreview({ sourceBranchId: task.id });
if (preview.conflicts.length === 0) {
await lix.mergeBranch({ sourceBranchId: task.id });
}Build editors, knowledge bases, and document workflows on normal files. Use SQL for app logic and Lix for history, rollback, branches, merging, and review.
Plugins define the parts Lix tracks. You can review a change to a paragraph, cell, property, or row instead of only bytes and lines.
For example, when an agent updates an orders CSV, Lix can show the row field that changed:
order_id 1002 status:
- pending
+ shippedQuery changes without reading every file:
const changes = await lix.execute(`
SELECT created_at, schema_key, entity_pk, snapshot_content
FROM lix_change
ORDER BY created_at DESC
LIMIT 20
`);Update Lix files and rows in one ACID transaction. Lix records the history automatically.
Read more about semantic changes β
Git makes code available to every developer tool. Lix aims to do the same for documents, spreadsheets, app data, and agent output while keeping SQL and version control.
contracts.docx pricing.xlsx app data agent output
β β β β
ββββββββββββββββββ΄ββββββββ¬βββββββ΄βββββββββββββββ
βΌ
ββββββββββββββββββββ ONE LIX REPOSITORY ββββββββββββββββββββ
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββ β
β β FILESYSTEM β Γ β DATABASE β Γ β VERSION β β
β β β β β β CONTROL β β
β β tools and β β SQL queries β βreview/mergeβ β
β β agents β β transactions β β rollback β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- 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
