npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

motedb

v0.18.3

Published

AI-native embedded multimodal database for embodied AI & robotics — vectors, time series, full text and binary in one embedded SQL engine. Node.js bindings (napi-rs).

Readme

motedb (Node.js)

AI-native embedded multimodal database — Node.js bindings (napi-rs v3).

安装 Install

npm install motedb

快速开始 Quick start

const Database = require('motedb');
// or: import { Database } from 'motedb';

const db = new Database('/data/app.mote');
db.execute('CREATE TABLE robots (id INT PRIMARY KEY, name TEXT, emb VECTOR(3), data BLOB)');
db.execute('INSERT INTO robots VALUES (?, ?, ?, ?)',
  [1, 'alpha', [0.1, 0.9, 0.2], Buffer.from([0xde, 0xad])]);

const rows = db.query('SELECT name FROM robots ORDER BY emb <-> [0.1, 0.9, 0.2] LIMIT 1');
// [{ name: 'alpha' }]
db.close();

Bulk load, hybrid search and transactions (same surface as the Python binding):

// One batch, one WAL fsync — a template statement run once per parameter row.
db.executeMany('INSERT INTO robots VALUES (?, ?, ?, ?)', [
  [2, 'beta',  [0.3, 0.1, 0.8], null],
  [3, 'gamma', [0.9, 0.2, 0.1], null],
]);
// Columnar form: columns are matched by name; an omitted column is NULL.
db.insertArrays('robots', { id: [4, 5], name: ['delta', 'eps'], emb: [[0, 1, 0], [1, 0, 0]] });

// BM25 text hits + vector KNN fused by Reciprocal Rank Fusion.
db.execute('CREATE TEXT INDEX robots_name ON robots (name)');
db.execute('CREATE VECTOR INDEX robots_emb ON robots (emb)');
const hits = db.hybridSearch('robots_name', 'alpha beta', 'robots_emb', [0.1, 0.9, 0.2], 5);
// [{ id, name, emb, data, __rrf__, __bm25__, __distance__ }, ...]  (best first)

const tx = db.begin();
db.execute("UPDATE robots SET name = 'alpha-2' WHERE id = 1");
db.commit(tx);          // or db.rollback(tx); no argument = the latest begin()

Value mapping

| SQL type | JS param | JS result | |---|---|---| | INTEGER / FLOAT | number | number | | TEXT | string | string | | BOOLEAN | boolean | boolean | | NULL | null | null | | VECTOR(n) | number[] | number[] | | BLOB | Buffer / Uint8Array | base64 string | | TIMESTAMP | µs number | µs number |

Build (development)

cd bindings/node
cargo build --release
# Node only dlopen()s files named *.node — copy the cdylib under the napi
# layout name and the loader in index.js picks it up (dev layout):
cp target/release/libmotedb_node.dylib motedb.darwin-arm64.node   # .so on Linux, .dll on Windows
node your-test.js
# …or point the loader at any *.node file explicitly:
MOTEDB_NODE_LIB=/abs/path/to/motedb.node node your-test.js

Prebuilt binaries ship as per-platform optional dependencies, built by .github/workflows/node-publish.yml: macOS arm64/x64, Linux x64/arm64 (glibc). Windows x64 and musl (Alpine) have NO prebuilt package yet — on those platforms npm install motedb succeeds but the loader requires a source build (see above). 🔴 B-01 lesson: the win32 platform package is only declared as an optionalDependency once it actually exists on the registry — a declared-but-unpublished package is an E404 that fails npm install outright. If npm install ran with --no-optional, or you are on an unlisted platform, build from source as above. Troubleshooting: docs/18-install-troubleshooting.md.