Skip to content

Direct

The Graft SQLite extension can be downloaded and used with SQLite anywhere you can use SQLite.1

The Graft SQLite extension, is released using GitHub Releases for most platforms. You can access the latest release using the links below:

PlatformArchitectureDownload Link
Linuxx86_64libgraft-ext-linux-x86_64.tar.gz
Linuxaarch64libgraft-ext-linux-aarch64.tar.gz
Windowsx86_64libgraft-ext-windows-x86_64.zip
Windowsaarch64libgraft-ext-windows-aarch64.zip
macOSaarch64libgraft-ext-macos-aarch64.tar.gz

After downloading the file for your system’s platform and architecture, decompress the file to access the extension, which is named libgraft_ext.[dll,dylib,so].

sqlpkg is a third-party command line extension manager for SQLite.

Terminal window
sqlpkg install orbitinghail/graft

Once installed, you can find the path to libgraft_ext using the which subcommand:

Terminal window
sqlpkg which orbitinghail/graft

The author of sqlpkg, Anton Zhiyanov, published a comprehensive guide to SQLite extensions on their blog which is available here. I highly recommend reading that post for more ways to install and use SQLite extensions.

When installed using your system package manager or via another binary distribution, SQLite ships with a command-line interface (CLI) usually called sqlite3 (sqlite3.exe on Windows).

After starting the SQLite shell you can load the Graft extension with the .load command:

.load PATH_TO_LIBGRAFT

Here is an example of loading libgraft_ext on linux, opening a Volume, and checking pragma graft_status to make sure it all works:

Terminal window
➜ sqlite3
SQLite version 3.49.1 2025-02-18 13:38:58
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> # load the Graft extension
sqlite> .load ./libgraft_ext.so
sqlite> # open a Graft Volume as a database
sqlite> .open 'file:main?vfs=graft'
sqlite> # verify Graft is working using pragma
sqlite> pragma graft_status;
+--------------------------------------------------+
| On tag main |
+--------------------------------------------------+
| On tag main |
| Local Log 74ggc1pWvh-3nSd2hKxw7rt7 is grafted to |
| remote Log 74ggc1pWvh-3CGcHFP9HBTEK. |
| |
| The Volume is up to date with the remote. |
+--------------------------------------------------+
  1. As long as SQLite is running on a supported platform and is compiled with support for loading extensions.