Skip to content

Graft

Git-like history, branches, remotes, and snapshot-aware diffs for SQLite-backed projects.

Graft is a storage and repository layer for SQLite projects. It keeps SQLite’s normal transaction model, then adds a project-level history model that feels familiar if you know Git: a physical worktree, a .graft/ directory, an index, commits, branches, tags, and named remotes.

The main integration point is still SQLite. Repository operations are exposed as PRAGMA graft_* commands so applications can call them from any language with SQLite bindings. The graft CLI is a thin wrapper around the same semantics and includes an embedded SQLite runner for local testing.

  • Core owns repository semantics: objects, refs, index, branches, remotes, revision parsing, and merge state.
  • SQLite extension bridges an open SQLite database to repository mode through a VFS and PRAGMA graft_* commands.
  • CLI is a developer-friendly wrapper. It also has graft sql, which opens the project database through the embedded Graft VFS so local testing does not require .load.

Graft is still alpha software. The documentation intentionally calls out current sharp edges, especially where low-level storage diagnostics still use internal LSN coordinates.