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

@zerodot/postgres

v1.3.0

Published

Run SQL queries on a Postgres database, or insert, update, select, and delete rows. Start a workflow when a new row appears or when Postgres sends a notification. Keep AI Agent memory, and store and search vectors with pgvector.

Readme

@zerodot/postgres

Run SQL queries on a Postgres database, or insert, update, select, and delete rows. Start a workflow when a new row appears or when Postgres sends a notification. Use it to read and write your app data.

Install

In zerodot, go to System > Nodes and install Postgres.

Manual: install @zerodot/postgres where the web app and the worker run, and add it to ZERODOT_NODE_PACKAGES.

Nodes

Postgres (postgres.database)

  • Execute a SQL query, with query parameters
  • Select rows from a table, with conditions and sort rules
  • Insert rows in a table
  • Insert or update rows in a table
  • Update rows in a table
  • Delete a table or rows (truncate, delete rows, or drop the table)

On new Postgres row (trigger.postgres)

Checks a table on a timer (15 seconds to 1 day) and starts a run for each new row. A tracking column (default id) tells which rows are new.

On Postgres event (trigger.postgres_listen)

Starts a run at once when a row is added, changed, or removed. It uses LISTEN and NOTIFY.

Postgres Chat Memory (postgres.memory)

Keeps the conversation of an AI Agent (@zerodot/ai-agent) in a table. Connect it to the Memory port of the agent. Each run of the agent adds one row, and the agent reads the last turns of the session. The node makes the table (default public.zerodot_chat_memory) when it is not there. It can delete the turns that are older than the turns to remember. The Chat Memory Manager can read, add, and delete its messages.

Postgres Vector Store (postgres.vectorStore)

Keeps chunks of text as vectors with pgvector. Supabase and Neon work too. Operation Mode:

  • Get Many: finds the chunks that are closest to the Prompt, with a score. Include Metadata adds the metadata. Metadata Filter is a JSON object. Rerank Results uses the reranker on Reranker.
  • Insert Documents: makes chunks of the items, embeds them, and inserts one row for each chunk. Connect a Default Data Loader to Document, or the node uses all data of each item with simple splitting.
  • Retrieve Documents (As Vector Store for Chain/Tool): the node is a supply (kind ai.vectorStore) and not a step. Connect it to the Vector Store port of the Vector Store Tool of the AI Agent.
  • Retrieve Documents (As Tool for AI Agent): the node is a tool (kind ai.tool). Connect it to the Tools port of the AI Agent. The tool name is the node name. Settings: Description, Limit, Include Metadata, Metadata Filter, and Rerank Results.
  • Update Documents: replaces the text, the metadata, and the vector of one chunk for each item, by ID.
  • Delete Documents: deletes chunks by their ID.

Connect an embedding model of @zerodot/ai-agent to Embedding. Insert makes the vector extension, the table (default public.zerodot_vectors), and an HNSW index (up to 2000 dimensions) when they are not there. Collection keeps sets of chunks apart in one table. The column names can be changed, to use a table that you have. Distance is Cosine, Euclidean, or Inner Product. The retrieve modes need zerodot with node SDK 1.5, and keep one connection for the run.

Credential

Postgres (postgres): host, port, database, user, password, ssl (allow, disable, or require), allowUnauthorizedCerts. The password is secret.

License

AGPL-3.0-only