Package Overview
Quick guide to the official hypequery packages and when to use each one
Package Overview
hypequery ships a small set of focused packages. Use this page as a quick reference for which package solves which problem.
| Package | Purpose |
|---|---|
@hypequery/serve | Core runtime for authoring queries with initServe, registering semantic metrics/datasets, exposing them via HTTP, and executing them in-process (cron, SSR, agents). Includes middleware, auth, OpenAPI/docs, and adapters. |
@hypequery/clickhouse | Fluent, type-safe ClickHouse client used inside ctx.db. Exposes the query builder, expression helpers, caching utilities, and logging APIs you can also use directly on db. |
@hypequery/datasets | Type-safe semantic layer. Define datasets, dimensions, measures, and metrics once with dataset()/createDatasetClient(), then reuse them across the query builder, Serve endpoints, MCP, and jobs. |
@hypequery/cli | Developer tooling (hypequery init, hypequery dev, hypequery generate). Handles scaffolding, schema introspection, and local docs. |
@hypequery/react | TanStack Query-powered hooks (useQuery, useMutation, plus useMetric/useDataset via createAnalyticsHooks) generated from your exported api so React apps can call queries, metrics, and datasets with full typing. |
@hypequery/mcp | Model Context Protocol server that exposes your datasets and metrics to AI agents through governed tools, without handing out raw SQL access. |
Typical project setup
Most apps depend on just three packages:
@hypequery/serve– define and expose metrics@hypequery/clickhouse– run ClickHouse queries within those metrics@hypequery/cli– drive the local dev server + schema/codegen tasks
Reach for @hypequery/react when you need hooks in UI code.