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

@oorestisime/quarry

v0.8.0

Published

Experimental ClickHouse-native query builder for TypeScript.

Readme

Quarry is a query builder first. It is not trying to be an ORM or hide ClickHouse behind a generic multi-dialect SQL abstraction.

Why Quarry

  • ClickHouse-first surface area: FINAL, PREWHERE, SETTINGS, typed joins, INSERT INTO ... SELECT, and explicit table sources.
  • Runtime-honest types: UInt64 comes back as string, Decimal comes back as number, and the docs are explicit about those semantics.
  • Plain TypeScript DB types: Quarry stays focused on query building instead of asking you to maintain a second schema DSL.
  • Inspectable output: every query can be compiled with toSQL() before you execute it.

Install

pnpm add @oorestisime/quarry @clickhouse/client

Quarry expects you to bring your own @clickhouse/client instance.

Quick look

import { createClient } from "@clickhouse/client";
import { createClickHouseDB } from "@oorestisime/quarry";

interface DB {
  event_logs: {
    user_id: number;
    event_type: string;
    created_at: string;
  };
}

const db = createClickHouseDB<DB>({
  client: createClient({ url: "http://localhost:8123" }),
});

const query = db
  .selectFrom("event_logs as e")
  .select("e.user_id", "e.event_type")
  .where("e.event_type", "=", "signup")
  .orderBy("e.created_at", "desc")
  .limit(50);

const compiled = query.toSQL();
const rows = await query.execute();

Choose a path

  • Getting started — install Quarry, create a typed db, run a first query, inspect SQL.
  • Introspection — bootstrap plain Tables, Views, and DB types from ClickHouse.
  • API reference — exact builder methods, helper surfaces, and selected live type tables.
  • Deep dive — runtime semantics, scope rules, ClickHouse quirks, and architecture.

Docs

Public docs are available at ch-quarry.vercel.app.

The docs source lives in docs/ and is built with Fumadocs. To run it locally:

pnpm install
pnpm --dir docs install
pnpm --dir docs dev

The site will be available on http://localhost:3000.

Status

This package is still in the early alpha stage. The current API is already validated against a real ClickHouse instance in integration tests, but the surface may still change before a stable release.

Current Scope

  • typed selects and inserts, including INSERT INTO ... SELECT
  • joins, subqueries, and CTEs
  • FINAL, PREWHERE, GROUP BY, and HAVING
  • toSQL() and execute()

See the docs site for the full supported API, runtime semantics, and concept guides.

  • Roadmap — what is likely to land next

Naming

The project name is Quarry. The npm package name is @oorestisime/quarry.