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

@synthryn/sypi-plumber

v0.6.0-beta.20260816.6a00fcae

Published

Optional extension: Load a large JSON or CSV source and query only the rows needed through SQL. Use it when a captured response or file is too large to send wholesale into context. Primary capability: the plumber tool; normalized data stays in SyPi state

Downloads

74

Readme

sypi-plumber

Query a large JSON/CSV blob or captured tool response as SQL and return only the requested rows. The extension does not place 20k lines of nested JSON into context. It ingests the source once into a normalized relational view under ~/.sypi. The source never enters the repository or context. Only the queried result set returns. Each op re-reads and revalidates the file. The saved resource is context, not disk I/O.

One tool, plumber, with behaviors behind op::

  • op: "load" - Ingest a source and make it the current table.
    • path (preferred): A file path. The blob stays on disk and never enters context. This path pairs with netpeek-captured responses.
    • data: Inline source text. The blob enters context, so use it for small or medium inputs.
    • format: json | csv | auto (default auto, sniffs from the text).
    • rootPath: dotted path to the array/object to tabularize, e.g. data.items. Omit it to auto-detect the largest array-of-objects (so a { data: { items: [...] } } envelope just works).
    • name: display name for the table (defaults to the filename).
  • op: "schema" - List the current table's columns with inferred types and row count, so the model knows what to query without ever seeing the data.
  • op: "query" - Run a sql SELECT against the current table. It returns the matching rows plus matched (total before LIMIT) and truncated.

Nested JSON objects flatten to dotted columns (user.addr.city); arrays and over-deep subtrees become JSON-text cells so they stay queryable. CSV cells are lightly coerced to number/boolean/null so WHERE age > 30 works on text.

Supported SQL

A small, strict, single-table subset (hand-rolled, no dependency):

SELECT ( * | col [AS alias] | FN(col|*) [AS alias] , ... )
[ FROM name ]                       -- accepted, ignored (one table per load)
[ WHERE expr ]                      -- = != < <= > >= LIKE IN IS [NOT] NULL, AND/OR/NOT, ( )
[ GROUP BY col , ... ]              -- with COUNT / SUM / AVG / MIN / MAX
[ ORDER BY col [ASC|DESC] , ... ]
[ LIMIT n [OFFSET m] ]

No JOIN, subquery, HAVING, or write statements; anything outside the grammar is a clean parse error, never a silent misparse. Everything is deterministic with zero LLM in the query path.

Bounds

Sized for an 8GB ceiling and enforced on load: input capped at 64 MiB (checked before the file is read), 200k rows, 512 columns, flatten depth 8. Query results default to 1,000 rows and are hard-capped at 10,000, so a bare SELECT * can never dump the whole table back into context.

Design notes

  • Imports only the extension API (extensionStateDir, readAtomicStateObject, updateAtomicStateObject).
  • Exactly one registered tool; all behavior via op:.
  • The loaded table is cached at ~/.sypi/plumber/current.json, never the user's repo.
  • Dependency-free. The JSON/CSV parsers, the SQL parser, and the query engine are all hand-rolled.