Skip to main content
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

The package is ESM. Set "type": "module" or compile to ESM.

Define a query

Execute

For Helix Cloud, add .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 as bigint. 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 with npm 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 log result. 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.