RedDB CLI

raw JSON →
0.1.5 verified Sat Apr 25 auth: no javascript

RedDB is a unified multi-model database SDK for JavaScript/TypeScript that supports document store, key-value, graph, and vector search within a single embedded Rust runtime. Current stable version is 0.1.5 (pre-release). Release cadence is rapid with nightly pre-release builds. Key differentiators: single binary deployment, no external dependencies, multi-model queries across paradigms, and a CLI tool for direct database management. Ships TypeScript definitions. Requires Node.js >=20.

error ERR_MODULE_NOT_FOUND: Cannot find package 'reddb'
cause Package not installed or missing from package.json.
fix
Run npm install reddb or pnpm add reddb.
error TypeError: reddb.createClient is not a function
cause Using CommonJS `require` instead of ESM `import`.
fix
Change const { createClient } = require('reddb') to import { createClient } from 'reddb'.
breaking API not stable under v1.0.0 — methods and signatures may change without major version bump.
fix Pin to exact version and test upgrades thoroughly.
breaking Node.js <20 is not supported; engine requirement is >=20. Installing on older Node will silently fail at runtime.
fix Upgrade Node.js to 20+.
deprecated The default export `RedDB` (as class) is deprecated since v0.1.5-next. Use `createClient` factory function instead.
fix Replace `new RedDB(config)` with `createClient(config)`.
gotcha Vector search queries require explicit index creation before use; otherwise they return empty results silently.
fix Call `db.collection('vectors').createIndex({ field: 'embedding', type: 'vector' })` first.
npm install reddb-cli
yarn add reddb-cli
pnpm add reddb-cli

Connects to local RedDB server, inserts a document, retrieves it, and closes connection.

import { createClient } from 'reddb';
const client = createClient({ url: process.env.REDDB_URL ?? 'http://localhost:8080' });
await client.connect();
const db = client.db('mydb');
await db.collection('users').insertOne({ name: 'Alice', age: 30 });
const user = await db.collection('users').findOne({ name: 'Alice' });
console.log(user);
await client.close();