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

@askdb/studio

v0.2.0-beta.35

Published

AskDB Studio: local browser UI for Schema v2 enrichment and sample NL-to-SQL checks.

Readme

@askdb/studio

Local React browser UI for editing AskDB Schema v2 enrichment, checking RAG retrieval, and generating sample NL-to-SQL output.

askdb-studio --schema ./my-app.schema
# or through the main CLI
askdb studio --schema ./my-app.schema

Studio serves a local web app at http://127.0.0.1:5556 by default. The published package contains a Node local server plus a Vite-built React client. It can:

  • browse all physical tables and columns in schema.json
  • edit table descriptions, aliases, primary entities, tags, common query language, example questions, and column metadata
  • write the describable layer back to tables/*.md
  • request AI enrichment suggestions when OPENAI_API_KEY is configured
  • build and query the configured RAG index (memory, file-backed, or pgvector)
  • generate sample Postgres SQL for natural-language questions against the currently saved enrichment
  • define and manage multi-tenancy policy (tenant roots, hierarchy, scoped/polymorphic/global tables) via the Tenancy view
  • draft tenant policy with AI assistance
  • test NL→SQL with tenant scope controls and SQL output modes (sql-only vs sql-params)

Schema browsing, enrichment, and SQL generation do not require a database driver. The optional Playground execute path runs generated SQL against a live database. Studio supports Postgres, MySQL, SQLite, and SQL Server. Each dialect requires its own optional peer driver package — install only the one you need:

| Dialect | Package | |---|---| | Postgres | pnpm add pg | | MySQL | pnpm add mysql2 | | SQLite | pnpm add better-sqlite3 | | SQL Server | pnpm add mssql |

The execute provider is resolved from studio.execute.provider in askdb.config.ts, falling back to the active introspection provider, then defaulting to Postgres for backward compatibility. The Playground displays the configured provider, connection status, and driver readiness near the Execute button. When running locally, Studio can install the missing driver for you.

Studio uses @askdb/enrich for the shared non-UI Schema v2 authoring logic: workspace loading, editable drafts, markdown/frontmatter preservation, save helpers, and suggestion context.

Development

pnpm --filter @askdb/studio build
pnpm --filter @askdb/studio test
pnpm --filter @askdb/studio start -- --schema ../../fixtures/schemas/orders-users.schema

The client source lives in src/web/ and builds to dist/client/. The server source lives in src/ and serves the compiled client assets from that directory.

The React client is styled with Tailwind CSS and shadcn-style primitives. The requested shadcn preset is recorded in components.json:

pnpm dlx shadcn@latest init --preset b1D0eCA4

Environment variables:

| Variable | Purpose | | --- | --- | | OPENAI_API_KEY | Enables AI suggestions and sample NL-to-SQL generation. | | OPENAI_BASE_URL | Optional OpenAI-compatible base URL. | | ASKDB_STUDIO_HOST | Bind host. Defaults to 127.0.0.1. | | ASKDB_STUDIO_PORT | Bind port. Defaults to 5556. | | ASKDB_MOCK_SQL | Deterministic generated SQL for tests or offline demos. | | ASKDB_RAG_EMBEDDER | Set to mock, openai, or ai-sdk for Studio RAG indexing. Defaults to the mock lexical embedder unless an AI key is configured. | | ASKDB_RAG_EMBEDDER_MODEL | Embedding model override for Studio RAG. | | ASKDB_RAG_EMBEDDER_DIMENSIONS | Optional embedding dimension override. |

Studio uses the active rag.store branch from askdb.config.*. For pgvector, make sure the configured table/extension already exist and ASKDB_PGVECTOR_URL resolves correctly.