Direct
The Graft SQLite extension can be downloaded and used with SQLite anywhere you can use SQLite.1
Manual download
Section titled “Manual download”libgraft
, is released using GitHub Releases for most platforms. You can access the latest release using the links below:
Platform | Architecture | Download Link |
---|---|---|
Linux | x86_64 | libgraft-linux-x86_64.tar.gz |
Linux | aarch64 | libgraft-linux-aarch64.tar.gz |
Windows | x86_64 | libgraft-windows-x86_64.zip |
Windows | aarch64 | libgraft-windows-aarch64.zip |
macOS | x86_64 | libgraft-macos-x86_64.tar.gz |
macOS | aarch64 | libgraft-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.[dll,dylib,so]
.
sqlpkg
Section titled “sqlpkg”sqlpkg is a third-party command line extension manager for SQLite.
sqlpkg install orbitinghail/graft
sqlpkg.exe install orbitinghail/graft
Once installed, you can find the path to libgraft
using the which
subcommand:
sqlpkg which orbitinghail/graft
sqlpkg.exe 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.
Usage with the SQLite CLI
Section titled “Usage with the SQLite CLI”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
on linux, opening a Volume, and checking pragma graft_status
to make sure it all works:
➜ sqlite3SQLite version 3.49.1 2025-02-18 13:38:58Enter ".help" for usage hints.Connected to a transient in-memory database.Use ".open FILENAME" to reopen on a persistent database.
sqlite> # load the Graft extensionsqlite> .load ./libgraft.so
sqlite> # open a Graft Volume as a databasesqlite> .open 'file:random?vfs=graft'
sqlite> # verify Graft is working using pragmasqlite> pragma graft_status;Graft StatusClient ID: Qi81Dp4C52izQ3LwX2YfZJVolume ID: GonugMKom6Q92W5YddpVTdCurrent snapshot: NoneAutosync: trueVolume status: Ok
Footnotes
Section titled “Footnotes”-
As long as SQLite is running on a supported platform and is compiled with support for loading extensions. ↩