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

@rymelabs/rymedb

v4.0.0

Published

Typed npm client for the rymeDB HTTP and realtime APIs

Readme

@rymelabs/rymedb — JavaScript SDK

Typed client for rymeDB's REST API plus WebSocket subscriptions. Zero runtime dependencies (Node 18+; WebSocket global used for subscriptions).

Install

npm install /path/to/rymeDB/sdks/js
import { RymeHttpClient, subscribeTable } from "@rymelabs/rymedb";

Quickstart

const c = new RymeHttpClient({ base: "http://127.0.0.1:8080", apiKey: "test-key" });

await c.kvPut("docs", "hello", '{"a":1}');
await c.kvGet("docs", "hello"); // '{"a":1}' — raw value text, never parsed
await c.sql("SELECT * FROM docs KEY 'hello'");
await c.ready(); // { ready, node, commit, leader, cluster }

const sub = subscribeTable("http://127.0.0.1:8080", "docs", (record) => {
  console.log(record.op, record.table); // INSERT docs
}, { apiKey: "test-key" });
await sub.ready;
sub.close();

Notes:

  • The API key falls back to $RYME_API_KEY when omitted. Mutating endpoints need a write-capable principal; failures throw RymeError carrying status and body.
  • kvGet returns the raw value bytes as text. Parse JSON yourself when your values are JSON.
  • subscribeQuery(base, table, onMessage, { limit?, branch?, select?, order?, filters?, apiKey? }) tails /v1/query-stream: first a snapshot message, then update messages. Filtered, projected, or ordered queries are resnapshotted from the committed table change stream so the result stays current instead of exposing unrelated rows.
  • subscribeTable(base, table, onMessage, { apiKey?, branch?, from? }) tails /v1/stream; subscriptions reconnect by default and resume from the latest received sequence. Set reconnect: false for one-shot behavior or tune the bounded retry delay with reconnectDelayMs.
  • subscribeBroadcast(base, channel, onMessage, { apiKey? }) tails /v1/broadcast/<channel> for ephemeral channel messages.
  • subscribePresence(base, channel, onMessage, { apiKey? }) receives an initial snapshot followed by join/leave events and reconnects with a fresh snapshot when needed.
  • subscribeSupabaseChannel(base, channel, handlers, options) speaks the Supabase Realtime protocol for broadcast and postgres_changes events.
  • slowLog(limit?, table?) and traces(limit?, name?, table?) narrow the observability feeds; rangeAutosplit and rangeLoads cover placement load.
  • RymeClient (in the same package) is the legacy RESP client (GET/SET over TCP); prefer RymeHttpClient for new code.
  • migrateApply(id, sql, author?, branch?) and migrateLedger(branch?) select a branch with the X-Ryme-Branch header; omit branch for main.

Method coverage mirrors the server: kv get/put/delete/ttl, sql, scan, branches, checkpoint/latest/pitr/snapshot/restore/archive/archives, shards layout/move, cluster members/add/remove/transfer/replace, ready/metrics, and both streams. Tests: pnpm build && pnpm test.

Supabase-style REST CRUD is available through restInsert, restUpsert, restUpdate, restDelete, and restDeleteWhere; insert bodies may be JSON objects or arrays, and update/delete methods accept PostgREST query strings.

const channel = subscribeSupabaseChannel("https://db.example.com", "room", {
  onBroadcast: ({ event, payload }) => console.log(event, payload),
  onPostgresChange: (change) => console.log(change.data.record),
}, {
  apiKey: "ryme_key",
  broadcast: { ack: true, self: false },
  presence: { key: "ada" },
  postgresChanges: [{ event: "INSERT", schema: "public", table: "messages" }],
});
await channel.ready;
await channel.sendBroadcast("typing", { user: "ada" });
await channel.track({ status: "online" });
await channel.leave();