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

@pbvision/pbql

v0.14.3

Published

PBQL is a SQL-like language for querying shots in pickleball games analyzed by PB Vision.

Readme

PBQL: Pickleball Query Language

PBQL is a SQL-like language for querying shots in pickleball games analyzed by PB Vision. A query names the videos or folders to search, filters shots by their properties, attaches surrounding context, and orders/limits the results:

FROM "games/*.json"
WHERE shot.type = "drop" AND shot.hitter = me AND shot.quality.overall >= 0.8
CONTEXT BEFORE 1 shot
CONTEXT AFTER 2secs
ORDER BY shot.speed DESC
LIMIT 50

Selected shots can drive the Shot Explorer in the PB Vision web app, be exported as JSON/CSV, or be turned into an EDL or ffmpeg command that cuts the clips into a reel.

Docs and a browser playground: https://pbv-public.github.io/pbql/

Status

Working library and CLI: lexer, parser, analyzer, evaluation engine (including SELECT projections and aggregates), and outputs (see the kitchen-sink query in test/demo.pbql).

Getting started

yarn setup      # install dependencies
yarn build      # compile the nearley grammar
yarn test       # run unit tests (builds first)
yarn lint       # eslint, zero warnings allowed
yarn coverage   # tests + coverage (100% thresholds)

node scripts/run-lexer.js  [query.pbql]  # print the token stream
node scripts/run-parser.js [query.pbql]  # print the AST as JSON

Run a query from the CLI (full reference: docs/cli.md) — FROM sources are quoted strings: a pb.vision video id ("83gyqyc10y8f", optionally ":2" for the second game — insights are fetched from production and cached without expiration in $XDG_CACHE_HOME/pbql, default ~/.cache/pbql; delete a game's file, or the directory, to refetch), else a local file (one insights JSON), an existing directory (every *.json beneath it), or a glob:

node bin/pbql.js 'FROM "game.json" WHERE shot.isVolley' --out csv
node bin/pbql.js 'FROM "games/*.json" WHERE shot.hitter = me' --me 0 --out edl

Usage

import { parse } from '@pbvision/pbql'

const { ast, errors } = parse('FROM "game.json" WHERE shot.isVolley')
if (errors) {
  // [{ code, message, line, col, length }]
}

Project layout

| Path | What it is | |---|---| | src/lang/ | lexer (moo), grammar (pbql.ne, compiled by yarn build), parse() | | src/index.js | package entry | | docs/ | language spec, CLI doc, generated Data Dictionary + llms.txt | | docs-site/ | static docs site + browser playground (yarn build:site) | | test/ | jest unit tests + demo.pbql and its golden AST | | scripts/ | grammar build, doc generation, demo runners |

License

Apache-2.0