Quick start
This example stores a note, queries it, changes it, and reopens the SQLite file to read the saved change. It uses the asynchronous API and Node's built-in SQLite driver.
Run the example
Use Node.js 24 or newer. Silt's package names currently refer to local npm workspaces; a public npm release is not yet available.
Repository access is required while the repository is private. The example creates silt-guide.sqlite in your current directory and can be run again. You can choose a different file with node examples/docs-quick-start.mjs ./another-demo.sqlite.
The complete example
The runnable file contains the following code. Workspace imports resolve after npm ci when you run it inside the repository.
The final document has text: 'Saved in SQLite'. Closing the database releases the connection; reopening the same filename preserves its documents. The replaceOne(..., { upsert: true }) call makes this example repeatable by resetting its single demo note.
collection() returns a handle immediately. Writes, findOne(), cursor consumption, transactions, and close() return promises. Always await them.
Choose a driver
The development workspace includes better-sqlite3, so you can try the server driver by changing the example's import:
When Silt opens a writable Node file itself, it enables WAL and synchronous=FULL by default. Both Node drivers execute SQLite synchronously on the calling thread; the shared promise API does not move queries into a worker thread. Long-running queries can therefore block other work on that thread.
An existing connection keeps its owner's configuration unless you explicitly request changes. See connections and options for ownership, WAL, read-only access, and custom drivers. Expo needs additional platform setup described in the Expo guide.
Next steps
Continue with queries and updates, then aggregations and joins. Read the compatibility contract before using Silt as a replacement for an existing MongoDB or Mingo workload.