🌐 US-Proxy
>

What is Lix?

Lix is a version control system for files and data beyond code. It combines files, a database, and version control in one system.

Lix is an embeddable library, not a CLI. Tools and agents work with normal files. Apps query and update SQL rows. Lix tracks every change with branches, history, review, rollback, and merge.

Unlike Git, Lix tracks the entities inside files, not lines of text. See How Lix compares to Git.

Lix combines a filesystem, a database, and version control

Prime use cases

Safe workspaces for agents

Give each agent task its own branch. The agent can edit files and SQL rows without changing the main branch. Preview the result, then merge or discard it.

An agent works on its own branch while main stays stable; the branch is merged or discarded

See Lix for AI Agents.

File-based apps with SQL and version control

Build editors, knowledge bases, document workflows, and other file-based apps. Existing tools keep using files while your app uses SQL for queries and transactions. Lix adds history, rollback, branches, merging, and review.

Your app uses SQL and existing tools use files; both work on the same Lix repository

Files become queryable rows

File plugins map parts of a file to rows. A row can represent a Markdown block, CSV record, spreadsheet cell, JSON property, or document clause.

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

Apps read and write these rows with SQL. Lix records their history and writes changes back to normal files on disk.

Diffs are semantic: review the clause, cell, or row that changed, not lines of text. See Semantic Changes.

The JavaScript SDK includes Markdown and CSV plugins. Other formats, including JSON, XLSX, DOCX, and PDF, need a plugin.

App data does not have to come from a file. Register a schema, and Lix creates a SQL table with the same history and branches.

Pluggable storage

Storage is pluggable. Run Lix in memory, on the local filesystem, or against a server backed by S3. This makes Lix easy to embed and scale. See Persistence and Storage.

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

Local and remote

Lix supports local and remote repositories with the same API.

Run Lix on top of a local filesystem:

import { LocalFilesystem, openLix } from "@lix-js/sdk";

const lix = await openLix({
  storage: new LocalFilesystem({ path: "./workspace", syncAllFiles: true }),
});

Or connect to a Lix server:

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

Remote clients get the same API: files, SQL, branches, and live queries. Clients on the same server see each other's changes live with lix.observe().

Permissions (in development)

Permissions are on the roadmap. They will live inside the repository: per file, per group, and versioned like any other change. A policy change can then be proposed, reviewed, and merged on a branch.

Next