Package Exports
- @thingd/sdk
- @thingd/sdk/client
- @thingd/sdk/memory
- @thingd/sdk/types
Readme
@thingd/sdk
Node.js SDK for thingd — a fast object-first data engine for applications and AI agents.
Install
npm install @thingd/sdkQuick start
import { ThingD } from "@thingd/sdk";
const db = await ThingD.open();
await db.put("notes", { id: "hello", text: "Hello world" });
const obj = await db.get("notes", "hello");
console.log(obj); // { id: "hello", text: "Hello world", collection: "notes", version: 1, ... }Subpath imports
// Lightweight HTTP client (browser + Node.js + Bun, zero dependencies)
import { ThingD } from "@thingd/sdk/client";
// Pure in-memory store (browser + Node.js + Bun, zero dependencies)
import { ThingD } from "@thingd/sdk/memory";
// Types only (for type-safe dependency injection)
import type { ThingDConnection } from "@thingd/sdk/types";Bun + Hono
thingd's HTTP client (@thingd/sdk/client) uses only web-standard fetch() — it runs in Bun, Deno, Cloudflare Workers, and browsers. No Node.js dependencies.
Connect to the thingd sidecar (Rust binary) over HTTP:
import { ThingD } from "@thingd/sdk/client";
const db = await ThingD.open({
driver: "cloud",
databaseUrl: "http://localhost:8757",
});Full example: examples/bun-hono/
Guide: docs/bun-hono.md
API
Full reference: docs/api-spec/