Skip to content
PluginStats

@askdb/core weekly downloads statistics

By askdb (2 listings) · npm · AI SDKs

AskDB core: NL→SQL pipeline with the built-in SQL dialects. Provides ask() orchestration, schema/IR types, modes, logging, and retrieval input. Pass a dialect id such as "postgres" and bring your own model.

View on npm Fresh · Dec 6, 2026

@askdb/core has 292 recorded weekly downloads on npm, a decrease of 60.8% over the past 30 days, ranking #2393 of 3,247 tracked listings.

Weekly downloads
292
Official API · Dec 5, 2026
7-day growth
+16.8%
+42 weekly downloads
30-day growth
-60.8%
-453 weekly downloads
90-day growth
+1023%
+266 weekly downloads
Rank
#2393
▼ 66 in 7 days

About @askdb/core

@askdb/core

NL→SQL pipeline for AskDB. Provides ask() orchestration, schema/IR types, modes, logging, retrieval input, and the built-in dialect specs (PostgreSQL, CockroachDB, MySQL, MariaDB, SQLite, SQL Server). Pass a dialect id such as "postgres" and bring your own model; the engine packages (@askdb/postgres, …) add introspection, not SQL generation (ADR 0029).

Status: release candidate for 1.0 (1.0.0-rc.N); the public API is frozen, and the release candidates fix bugs before 1.0.0. 0.3.0 moved the Postgres dialect and @askdb/core/postgres to @askdb/postgres. Runtime AI provider construction lives in @askdb/ai; core remains BYO-model and does not read process.env. See docs/adrs/0002-integration-package-layout.md, docs/adrs/0005-askdb-config-and-env-bootstrap.md, and docs/adrs/0006-ai-provider-integration-strategy.md.

Security model: ask() returns SQL and never executes it. Its SQL checks (single SELECT/WITH statement (with a SQL Server caveat), no comments, no write/DDL keywords, no locking reads, no known side-effecting functions, no Unicode-escaped U&"…" names on Postgres, and the tenant and sensitive-column checks) are heuristic defense in depth that catch common model mistakes. The read-only, sensitive-column and tenant checks all read SQL through one dialect-aware lexer, under readings that one module sets for each check and dialect (#815, which replaced the tenant check's separate scanner, #342). They are not a SQL parser and not a security boundary. Run generated SQL under a read-only, least-privilege database role and enforce tenant isolation in the database. See Safety boundaries.

Install

# `ai` (Vercel AI SDK) is a required peer dependency — your app owns its version
pnpm add @askdb/core ai
# Only to introspect a database (live, or offline from an export), its engine package:
pnpm add @askdb/postgres
# Plus a model — either construct one directly with an AI SDK provider:
pnpm add @ai-sdk/openai
# Optional AskDB config/env model factory (uses the @ai-sdk/* package above):
pnpm add @askdb/ai

ai is a peer dependency (^6.0.0 || ^7.0.51: AI SDK 6, or 7.0.51 and later), not a bundled dependency: ask() receives a LanguageModel your app constructs, so core must use the same ai instance your app does. Hosts on AI SDK 6 (e.g. @ai-sdk/openai@3) and AI SDK 7 (@ai-sdk/openai@4) are both supported. The config-driven path (@askdb/ai and @askdb/client) currently requires AI SDK 7.

ai is a required peer, not an optional one, and core loads it at import time. So any package that depends on @askdb/core needs ai installed, even for introspection only. That covers @askdb/client, @askdb/introspect, the engine packages, @askdb/prisma, @askdb/enrich and @askdb/rag. npm 7+ and pnpm install the missing peer for you. Yarn doesn't, so add ai yourself. ADR 0006 records why (2026-09 amendment).

@askdb/core itself does not depend on pg. The optional pg peer lives on @askdb/postgres for live Postgres introspection.

Runtime AI configuration helpers live in @askdb/ai, which has built-in providers for OpenAI, Azure/Foundry, Google, Anthropic, and the Vercel AI Gateway (install the matching @ai-sdk/* package). If you use @askdb/config, call bootstrapAskDbEnv(), create an AI registry, then pass getAskDbRuntimeConfig().ai.language to registry.createLanguageModelFromSection(...).

Schema format

@askdb/core reads the schema artifact: a split format designed for business-context enrichment and RAG chunking. See the schema artifact format for the full contract.

Directory layout
my-app.schema/
  schema.json        # physical layer — tables, columns, types, FKs, sensitive flags
  tables/
    users.md         # describable layer — descriptions, aliases, common query language
    orders.md
  concepts.md        # optional — cross-table vocabulary
Load a schema directory
import { loadSchema } from "@askdb/core";

const schema = loadSchema("./fixtures/schemas/orders-users.schema");

Minimal example — with the built-in Postgres dialect

import { ask, loadSchema } from "@askdb/core";
import { openai } from "@ai-sdk/openai";

const schema = loadSchema("./fixtures/schemas/orders-users.schema");

const { sql } = await ask({
  question: "Top 5 customers by lifetime value?",
  schema,
  model: openai("gpt-4o"),
  dialect: "postgres", // or POSTGRES_DIALECT from @askdb/core
});

Parameterized output (default on)

By default ask() also asks the model for an unbound form of the same SQL plus a small JSON parameter manifest. Every call is still exactly one model call — parameterize does not add or remove one, and nothing here lets a caller skip the model. The question is sent unchanged (values included); this is not a redaction feature.

import { ask, bindPreparedQuery, loadSchema } from "@askdb/core";

const result = await ask({
  question: "How many cities does Colorado have?",
  schema,
  model: openai("gpt-4o"),
  dialect: "postgres",
  tenantScope,
});…

Description from the npm listing.

  • askdb
  • nl-to-sql
  • natural-language-to-sql
  • ai
  • llm
  • ai-sdk
  • schema-v2

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@askdb/core weekly downloads on npm, last 90 days: 292 weekly downloads as of Dec 5, 2026, +1023% over 90 days.@askdb/coreWeekly downloads on npm · Last 90 days292downloads / week+1023% over 90 days01K2K3K4K5KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@askdb/core weekly downloads on npm, last 90 days: 292 weekly downloads as of Dec 5, 2026, +1023% over 90 days.

7/30/90-day growth

@askdb/core weekly downloads growth on npm: +16.8% over 7 days, -60.8% over 30 days, +1023% over 90 days.@askdb/coreWeekly downloads growth on npm292downloads / week now7-day growth+42 weekly downloads+16.8%30-day growth-453 weekly downloads-60.8%90-day growth+266 weekly downloads+1023%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@askdb/core weekly downloads growth on npm: +16.8% over 7 days, -60.8% over 30 days, +1023% over 90 days.

Ranking history

@askdb/core npm ranking history: currently #2393 (by weekly downloads).@askdb/corenpm ranking · by weekly downloads · Last 90 days#2393current rank#1200#1400#1600#1800#2000#2200#2400Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 9, 2026 – Dec 6, 2026 · 28 observations · Updated Dec 5, 2026pluginstats.com
@askdb/core npm ranking history: currently #2393 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 120, #13 (overall #2,393)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 15, #7 (overall #287)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (142)
Recent weekly downloads observations for @askdb/core
Date (UTC)Weekly downloadsChange vs. previous
292+61
231-3
234-2
236-20
256-28
284-10
294+44
250+6
244-49
293-80
373-36
409-41
450-197
647—

Similar npm AI SDKs plugins

All 20 @askdb/core alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@askdb/core. First seen Nov 9, 2026; last successful collection Dec 6, 2026. See the methodology.