Guide
The @helix-db/helix-db 4.0.0 package targets Node.js 20 or newer and
emits the same operation-tree AST as the Rust, Go, and Python SDKs.
The package is ESM and requires Node.js 20 or newer.
Install
"type": "module" or compile to ESM.
Define a query
Execute
.withApiKey("<cluster-api-key>"). A shared gateway also needs
.withDatabaseId("<database-id>"), which ships in @helix-db/helix-db 3.2.0 and later;
with 3.1.0, use a database-specific gateway URL. See
Authentication.
Integer safety
The SDK preserves 64-bit integers asbigint. Use stringifyJson or the request’s
serialization methods instead of JSON.stringify when a value can contain bigint.
Embedded runtime
Install the SDK and embedded runtime withnpm install @helix-db/helix-db @helix-db/helix-db-embedded. See
Embedded database
for storage, cache, and handle configuration.
Verify
With a local instance running, run the Execute example and logresult. A new database returns an empty users array.
Next steps
Query tutorial
Build reads, writes, and parameters.
Embedded database
Open HelixDB directly inside your process.