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

opendbpylot

v0.2.0

Published

opendbpylot — natural-language → SQL via Retrieval-Augmented Generation (Node.js / NAPI bindings)

Readme

opendbpylot (Node.js)

Node.js / TypeScript bindings for opendbpylot — turn a natural-language question into SQL, run it on your database, and get the results. Uses Retrieval-Augmented Generation (RAG) with a self-repairing SQL loop.

npm install opendbpylot

Prebuilt native addons ship for macOS (x64/arm64), Linux (x64/arm64, glibc), and Windows (x64) — no compiler needed.

This installs both a Node library and a fully-working dbpylot command — the whole CLI runs in-process from the native addon, so no Rust toolchain is needed:

npm install -g opendbpylot
dbpylot init        # setup wizard
dbpylot             # chat with your database
dbpylot serve       # web UI
dbpylot ask "how many orders per country?"
dbpylot mcp         # serve as an MCP server for agent hosts (OpenPylot, Claude Desktop, …)

dbpylot mcp exposes the engine over the Model Context Protocol (stdio). Secrets can be set non-interactively for scripted setups: printf '%s' "$KEY" | dbpylot config set-key openai and dbpylot config set-db sqlite /data/app.db.

Usage (library)

First configure an LLM provider + a database. The bindings share the same config as the dbpylot CLI (install it with cargo install opendbpylot), so run the wizard once:

dbpylot init

Then:

import { OpenDbPylot } from "opendbpylot";

const bot = new OpenDbPylot();
const result = bot.ask("how many orders per country?");

console.log(result.sql);        // the generated (and self-repaired) SQL
console.log(result.columns);    // column names
for (const row of result.rows)  // result rows
  console.log(row);

// Teach it about your schema / business rules:
bot.trainDocumentation("Revenue excludes cancelled and refunded orders.");
bot.trainQuestionSql("top products", "SELECT name FROM products ORDER BY price DESC LIMIT 10;");

Fully self-contained web UI

You don't even need the CLI — launch the embedded web app straight from Node and configure everything (LLM + database) in the browser Settings panel:

import { OpenDbPylot } from "opendbpylot";
OpenDbPylot.serve();   // opens http://127.0.0.1:8080, runs until interrupted

API

  • new OpenDbPylot() — load the engine from your saved configuration.
  • .ask(question) → AskResult{ sql, columns, rows, repairsUsed, answer? }.
  • .trainDdl(ddl), .trainDocumentation(doc), .trainQuestionSql(q, sql).
  • OpenDbPylot.serve() — run the embedded web UI in-process (no CLI binary needed).
  • OpenDbPylot.init() / .doctor() — convenience shims that call the dbpylot CLI (cargo install opendbpylot); serve() + Settings does the same setup.

Licensed under Apache-2.0.