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

@tachles/choiry

v1.1.1

Published

Generic-first, type-aware query SDK generator

Readme

Choiry

Choiry is a generic-first, type-aware code generator that watches your schema and generates safe (SELECT-only by default), typed query utilities.

Requirements

  • Node.js >= 18
  • npm (or your preferred package manager)

Current status (MVP):

  • Parse schema inputs (Prisma .prisma and Postgres-flavored .sql CREATE TABLE)
  • Convert to canonical IR + analyze semantics/relations
  • Compose deterministic SELECT-only query plans
  • Generate a TypeScript SDK via ts-morph (Kysely or parameterized raw SQL)
  • Atomic writes with no-op (hash) skipping
  • watch mode (debounce + single-flight generation)
  • validate mode (IR-only and optional Postgres EXPLAIN)

Install

Published to npm as @tachles/choiry.

  • One-off CLI via npx: npx @tachles/choiry --help
  • Or install locally: npm i -D @tachles/choiry

Dev

  • Build: npm run build
  • Typecheck: npm run typecheck
  • Test: npm test

CLI (dev)

Output formats

Set output.queryFormat in choiry.config.ts:

  • "kysely" (default): generated functions accept Kysely<DB>.
  • "raw-sql": generated code exports *Prompt() helpers that return { sql, params } and functions that accept a tiny SqlExecutor interface (so you can use pg, better-sqlite3, mysql drivers, etc.). All values are passed as parameters (no string interpolation).

Published (recommended)

After publishing to npm as @tachles/choiry, you can run the CLI with npx:

  • npx @tachles/choiry init
  • npx @tachles/choiry generate --config ./choiry.config.ts
  • npx @tachles/choiry watch
  • npx @tachles/choiry inspect
  • npx @tachles/choiry validate

If you prefer the command name choiry explicitly:

  • npx -p @tachles/choiry choiry generate

Local dev (no publish)

After npm run build, you can run the local package via npx from the repo root:

  • npx . init
  • npx . generate --config ./choiry.config.ts

Direct node (also fine)

After npm run build, you can run:

  • node dist/cli/main.js init
  • node dist/cli/main.js generate
  • node dist/cli/main.js watch
  • node dist/cli/main.js inspect
  • node dist/cli/main.js validate

Useful flags:

  • generate --dry-run
  • validate --json
  • validate --strict

Note: the CLI loads choiry.config.ts at runtime using ts-node/register/transpile-only.

For validation.mode: "db-explain", set the env var named by validation.connectionStringEnv (default template uses DATABASE_URL).

Examples

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md.

License

ISC — see LICENSE.