Skip to content

opral/lix

Repository files navigation

Lix

The version control system for AI agents

NPM Downloads Discord X (Twitter)

Note

Lix is in alpha · Follow progress to v1.0 →


Lix is the version control system for AI agents. Track file edits, review diffs, and merge approved changes from branches.

Why Lix

AI agents modifying files need guardrails.

Lix provides visibility and control over changes that AI agents do:

  • Track agent actions - See exactly what an agent did and when.
  • Meaningful diffs - See what actually changed, not noisy line-by-line text.
  • Isolate tasks in branches - Propose changes for human review and merge only what's approved.

Under the hood: Plugins for any file format, SQL-queryable history, stored as a single portable SQLite file.

Quick Start

JavaScript JavaScript · Python Python · Rust Rust · Go Go

npm install @lix-js/sdk @lix-js/plugin-json
import { openLix, selectWorkingDiff, InMemoryEnvironment } from "@lix-js/sdk";
import { plugin as json } from "@lix-js/plugin-json";

// 1) Open a lix with plugins
const lix = await openLix({
  environment: new InMemoryEnvironment(),
  providePlugins: [json],
});

// 2) Write a file via SQL
await lix.db
  .insertInto("file")
  .values({
    path: "/settings.json",
    data: new TextEncoder().encode(JSON.stringify({ theme: "light" })),
  })
  .execute();

// 3) Query the changes
const diff = await selectWorkingDiff({ lix }).execute();
console.log(diff);

Full getting started →

How Lix Works

Lix is a version control system that runs on top of an existing SQL(ite) database:

  • Filesystem: A virtual filesystem for files and directories
  • Branching: Isolate work in branches, compare, and merge
  • History: Full change history with commits and diffs
  • Change proposals: Built-in pull request-like workflows
┌─────────────────────────────────────────────────┐
│                    Lix SDK                      │
│           (version control system)              │
│                                                 │
│ ┌────────────┐ ┌──────────┐ ┌─────────┐ ┌─────┐ │
│ │ Filesystem │ │ Branching│ │ History │ │ ... │ │
│ └────────────┘ └──────────┘ └─────────┘ └─────┘ │
│                                                 │
└────────────────────────┬────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────┐
│               SQL(ite) database                 │
└─────────────────────────────────────────────────┘

Everything lives in a single SQLite database file. Persist anywhere (S3, filesystem, sandbox, etc.).

Upvote issue #372 for Postgres support →

Comparison to Git

Git was built for humans at the terminal. Lix is built to embed where agents operate on files. And while Git stores snapshots and computes diffs, Lix tracks the actual changes, enabling meaningful diffs:

Example

  • Git: "line 5 changed"
  • Lix: "price changed from $10 to $12"
Git Lix
Diffs Line-based Schema-aware
File formats Text Any via plugins
Metadata External (GitHub, GitLab) In the repo
Interface CLI SDK
Queries Custom scripts SQL

Full comparison to Git →

Learn More

License

MIT

About

The version control system for AI agents

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages