> hypequery

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.

PackagePurpose
@hypequery/serveCore 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/clickhouseFluent, 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/datasetsType-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/cliDeveloper tooling (hypequery init, hypequery dev, hypequery generate). Handles scaffolding, schema introspection, and local docs.
@hypequery/reactTanStack 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/mcpModel 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:

  1. @hypequery/serve – define and expose metrics
  2. @hypequery/clickhouse – run ClickHouse queries within those metrics
  3. @hypequery/cli – drive the local dev server + schema/codegen tasks

Reach for @hypequery/react when you need hooks in UI code.

On this page