Skip to content

Latest commit

Β 

History

6,660 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lix

Embeddable repository for your product

weekly downloads on NPM Discord GitHub Stars X (Twitter)

Files, SQL database, and version control in one. Everything inside is versioned data: file content, app tables, reviews, comments. There is no external control plane to sync. Agents read and write normal files. Your product queries SQL. You branch, diff, merge, and roll back all of it together:

A Lix repo holds files, a SQL database, and version control in one system

  • πŸ“„ Files, in any format. Store text and binary files. Plugins make supported formats queryable as versioned rows.
  • πŸ—„οΈ SQL database. File content, app data, and history live in an ACID OLTP database. Query millions of rows with SQL.
  • πŸ”€ Version control. Diffs name the clause, cell, or row that changed, not a byte blob. Review, merge, and roll back.
  • ⚑ Real-time collaboration. People and agents share a repository and see changes as they happen.
  • 🧩 Pluggable storage. Local filesystem, SQLite on browser OPFS, or S3 behind a Lix server.
  • πŸ”’ 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.

Getting started

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

npm install @lix-js/sdk @lix-js/storage-filesystem

Run locally with FilesystemStorage:

import { openLix } from "@lix-js/sdk";
import { FilesystemStorage } from "@lix-js/storage-filesystem";

const lix = await openLix({
  storage: new FilesystemStorage({ path: "./repository" }),
});

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/repositories/acme",
  },
});

Try a demo

Try out lixray.com:

LixRay: a repository for your entire company. Works with Claude, OpenAI, and Gemini.

Prime use cases

Give each customer a repository

Your product gives every customer their own repository: their files, their data, and the automations LLMs now write for them.

Lix handles any file format, collaborates in real time, and embeds in your product. Non-technical users get accept and undo, not branches and pull requests. Permissions are coming.

Your product creates one Lix repository per customer, each holding a different mix of automations, handbooks, pricing, and knowledge files

// One hosted repository per customer.
const lix = await openLix({
  server: {
    mode: "remote",
    url: `https://example.com/repositories/${customer.id}`,
  },
});

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

Sync files

Sync the files that coding agents and applications work on, between machines and with a server.

Client A and client B each hold the same project files on their own filesystem and synchronize them with a Lix server

import { openLix } from "@lix-js/sdk";
import { FilesystemStorage } from "@lix-js/storage-filesystem";

// ./project stays a normal directory. Lix syncs it through the server.
const lix = await openLix({
  storage: new FilesystemStorage({ path: "./project" }),
  server: {
    mode: "remote",
    url: "https://lixray.com/@acme/project",
  },
});

Use LixRay or run your own server.

Apps with version control

Your app reads and writes SQL rows and normal files. Lix records every change with its author, so history, blame, branching, and rollback are queries instead of features you build.

An app window with a document diff, an accept and undo control, and a history sidebar with checkpoints, all provided by Lix

// A normal app write. Lix records the change automatically.
await lix.execute("UPDATE orders SET status = 'shipped' WHERE id = 1002");

// The history sidebar, diff view, and undo button are queries:
const changes = await lix.execute(`
  SELECT created_at, account_id, schema_key, row_pk, snapshot_content
  FROM lix_change
  ORDER BY created_at DESC
`);

Files and rows update in one ACID transaction.

Read more about diffs β†’

How Lix works

Files Γ— database

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

With FilesystemStorage, the file stays available on disk. Its rows are queryable with SQL. Lix tracks changes to both.

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

Runs in-process as part of your infrastructure

Lix runs in-process with pluggable storage: in memory, on the local filesystem, or in a server backed by S3.

Lix runs in-process inside your product, with an arrow to pluggable storage: memory, filesystem, or S3

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 tracks files but has no SQL. PostgreSQL/SQLite have SQL but no files and no change history. Lix has all three.

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 Lix Git PostgreSQL / SQLite
Normal files βœ… βœ… ❌
SQL and transactions βœ… ❌ βœ…
Branches and merging βœ… βœ… ❌
Diffs by cell, clause, or row βœ… via plugins ❌ text lines only ❌
Pluggable storage βœ… ❌ ❌

Learn more

License

MIT

About

Embeddable repository that combines files, database, and version control.

Topics

Resources

Contributing

Stars

739 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages