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

chunkfunk

v0.1.0

Published

Read-only CLI scanner for stale, duplicated, or broken RAG database chunks.

Readme

ChunkFunk

ChunkFunk is a read-only CLI that scans an existing Postgres/pgvector RAG database and reports what looks stale, duplicated, or broken. It runs locally, does not need an account, and does not write to your database.

10-minute quickstart

npx chunkfunk init
npx chunkfunk scan

init writes a local chunkfunk.yaml with the detected mapping. It stores the name of your connection-string environment variable, not the connection string itself.

For a one-off run:

DATABASE_URL="postgresql://chunkfunk_readonly:password@host:5432/db" npx chunkfunk scan

Create a read-only Postgres role

Create a database role like this before connecting ChunkFunk. Replace your_database, public, and the password with your own values.

create role chunkfunk_readonly login password 'replace-with-a-long-random-password';

grant connect on database your_database to chunkfunk_readonly;
grant usage on schema public to chunkfunk_readonly;
grant select on all tables in schema public to chunkfunk_readonly;
grant select on all sequences in schema public to chunkfunk_readonly;

alter default privileges in schema public
  grant select on tables to chunkfunk_readonly;

alter role chunkfunk_readonly set default_transaction_read_only = on;
alter role chunkfunk_readonly set statement_timeout = '2min';

If your vectors live in another schema, repeat the schema grants for that schema.

Auto-detected schemas

| Schema | What ChunkFunk looks for | Status | |---|---|---| | LangChain PGVector | langchain_pg_embedding with document, embedding, cmetadata, collection_id | Auto-detected | | LlamaIndex | data_* table with text, embedding, metadata_, node_id | Auto-detected | | Supabase vecs | vecs schema with id, vec, metadata | Auto-detected, with content confirmation | | Supabase docs tutorial | documents with content, embedding, metadata | Auto-detected | | Generic single table | One vector column plus one long text-like column | Proposed, then confirmed |

If your schema does not match, chunkfunk init asks you to map the columns manually.

Privacy and telemetry

ChunkFunk is read-only by construction:

  • The recommended database role is read-only on the server.
  • The CLI opens its Postgres session in read-only mode.
  • The scanner only needs SELECT access.

Telemetry is consent-based and default-off. If you say no, nothing is sent. If you say yes, the payload contains schema shape, counts, finding totals, score, CLI version, and OS only. It does not contain document text, chunk text, table samples, connection strings, tokens, or source URLs.

Run this to see the exact bytes that would be sent:

npx chunkfunk --show-telemetry

The full published payload contract is in TELEMETRY.md.

chunkfunk login and chunkfunk sync point at https://chunkfunk.app.

Example report

See a committed sample report from the deliberately rotten LangChain fixture: docs/sample-rotten-langchain-report.html.

Terminal demo

The source script for the terminal recording is committed at docs/chunkfunk-demo.tape. The GIF slot is intentionally left for a real recording; no fake terminal capture is included.

Development

npm ci
npm run lint
npm run typecheck
npm run build
npm test

Fixture-backed tests use FIXTURES_PG_URL, for example:

FIXTURES_PG_URL="postgresql://postgres:[email protected]:55433/postgres" npm test

Do not publish from automation. Use npm publish --dry-run for review, then publish manually.