Node.js offers two solid SQLite driver options for sqlfu: the built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iterate/sqlfu/llms.txt
Use this file to discover all available pages before exploring further.
node:sqlite module (Node 22+) and the better-sqlite3 npm package. Both are synchronous, which means sqlfu’s generated query wrappers return rows directly — no await needed on the call site.
Install sqlfu
node:sqlite is built into Node 22+ and needs no install. For better-sqlite3:Configure sqlfu
Create
sqlfu.config.ts in your project root. Point db at a local SQLite file and set generate.sync: true so generated wrappers match the synchronous driver:sqlfu.config.ts
generate.sync: true tells sqlfu that your driver is synchronous. Generated wrappers accept a SyncClient and return rows directly instead of promises.Write schema and queries
Add your schema to Add a query to
definitions.sql:definitions.sql
sql/queries.sql:sql/queries.sql
Draft, migrate, and generate
Run the standard sqlfu commands to create the migration and generate TypeScript wrappers:
Sync behavior
All three Node drivers in this guide are synchronous. sqlfu preserves that — aSyncClient built on node:sqlite, better-sqlite3, or native libsql returns rows directly from every call:
Read next
Adapters reference
Every adapter snippet and the full sync/async compatibility matrix.
Runtime client
The shared
SyncClient interface and how sync stays sync.