Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5,313 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lix

A version control system for files and data beyond code

weekly downloads on NPM Discord GitHub Stars X (Twitter)

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.

Lix is a filesystem, a database, and version control in one system

  • πŸ“„ Works with any file format. Plugins map DOCX, CSV, Markdown, or your own format to versioned entities.
  • πŸ” Semantic changes. Review the clause, cell, or row that changed, not lines of bytes.
  • πŸ—„οΈ SQL and transactions. Query file content, app data, and history; update files and rows in one ACID transaction.
  • πŸ‘₯ Real-time collaboration. People and agents share a repository and see changes live.
  • πŸ”Œ Pluggable storage. An S3 bucket, the local filesystem, or OPFS in the browser: Lix is easy to embed and scale, in contrast to existing VCS like Git that assume a local POSIX filesystem.
  • πŸ” Permissions (soon). Finance, legal, and contractors need different access. Permissions will live inside the repository: per file, per group, and versioned like any other change.

Try a demo app

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.

Flashtype app preview

Getting started

JavaScript JavaScript Β· Python Python Β· Rust Rust Β· Go Go

npm install @lix-js/sdk

Run locally with LocalFilesystem:

import { 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"),
]);

Or against a server:

const lix = await openLix({
  server: {
    mode: "remote",
    url: "https://example.com/workspaces/acme",
  },
});

Why Lix?

Files Γ— database

Plugins map files to SQL rows. A paragraph, cell, or property becomes a row Lix can version.

A plugin maps /orders.csv to SQL rows with entity, field, and value columns

The file stays a normal file on disk. The rows are queryable with SQL. Lix tracks every change to both.

The SDK includes plugins for Markdown and CSV. Add a plugin for other formats, such as JSON, XLSX, DOCX, or PDF.

Pluggable storage

Lix embeds in your product and runs on storage adapters: in memory, on the local filesystem, or on an S3 bucket.

Lix embeds in your product and runs on a storage adapter: in memory, local filesystem, or S3 bucket

Existing VCS like Git assume a local POSIX filesystem, which makes them hard to embed and scale. See the Persistence and Storage docs.

Comparison

Git versions files but cannot query them. PostgreSQL and SQLite query rows but have no files and no history. Lix does both.

Quadrant chart: database capability on the vertical axis, version control on the horizontal axis. PostgreSQL and SQLite sit top left, Git bottom right, Lix top right.

Capability Git PostgreSQL / SQLite Lix
Normal files Yes No Yes
SQL and transactions No Yes Yes
Branches and merging Yes No Yes
Diffs by cell, clause, or row Text lines only No Yes, via plugins
Pluggable storage No No Yes

Prime use cases

Automation repository for your customers

LLMs let your product write automations for customers. Automations are code, so every customer needs a repository. Lix is simpler than git here: it embeds in your product, and your customers review and undo changes without branch, merge, or pull request vocabulary.

// One Lix repository per customer, hosted on your server (for example backed by S3).
const lix = await openLix({
  server: {
    mode: "remote",
    url: "https://lix.example.com/customers/acme",
  },
});

// The agent writes an automation. Lix records the change, no commit needed.
await lix.execute("INSERT INTO lix_file (path, content) VALUES ($1, $2)", [
  "/automations/booking.ts",
  code,
]);

// Your UI shows the diff. The customer clicks accept or undo.

Give agents safe, isolated workspaces

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 file-based apps with SQL and version control

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.

Query 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 β†’

Where this is going

The goal is one repository for everything a company produces. Contracts, spreadsheets, app data, agent output, and the automations non-engineers now write with LLMs get the same foundation: one history, queryable with SQL, safe to branch and merge.

Automation product, agents, analytics, and knowledge search all build on one Lix repository holding automations, skills, sales data, and contracts

Learn more

License

MIT

About

Version control system for any file format

Topics

Resources

Contributing

Stars

730 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages