This package provides a TypeScript-first client for ScopeDB on Node.js.
pnpm install scopedbimport { Client } from "scopedb";
const client = new Client("http://127.0.0.1:6543");import { Client } from "scopedb";
const client = new Client("http://127.0.0.1:6543");
const result = await client.statement("SELECT 1").execute();
console.log(result.intoValues());import { Client } from "scopedb";
const client = new Client("http://127.0.0.1:6543");
const table = client.table("events").withSchema("public");
console.log(table.identifier());
const schema = await table.tableSchema();
console.log(schema.fields().length);import { Client } from "scopedb";
const client = new Client("http://127.0.0.1:6543");
const stream = client
.ingestStream(`
SELECT
$0["ts"]::timestamp AS ts,
$0["name"]::string AS name
INSERT INTO public.events (ts, name)
`)
.build();
await stream.send({
ts: "2026-03-13T12:00:00Z",
name: "scopedb",
});
await stream.flush();
await stream.shutdown();See the TypeScript examples under examples/:
examples/statement.tsexamples/table.tsexamples/batch.ts
These examples import from src/ directly so they stay close to the in-repo SDK surface while the package is still evolving.
pnpm test
pnpm run build
pnpm run check- The package is TypeScript-first and emits declarations from
src/index.ts. - Generated artifacts should stay out of git;
dist/,dist-test/andnode_modules/are ignored in.gitignore. - A broader package-delivery checklist lives in DELIVERY.md.