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

@zerodawn/pi-core

v0.1.0

Published

Shared core for zerodawn PI extensions — DB, config, migrations, cache paths

Readme

@zerodawn/pi-core

Gedeelde core voor zerodawn's PI extensies. Levert één SQLite database, één config file en een migrations registry die door meerdere extensies tegelijk gebruikt kan worden.

Filosofie

Eén DB, één config, één plek waar het settings menu naartoe schrijft. Elke extensie krijgt z'n eigen namespace zonder z'n eigen connectie of file op te zetten.

~/.pi/agent/
  core.db          ← gedeelde SQLite, tabellen per namespace
  core.json        ← gedeelde config, secties per namespace

~/.cache/pi-core/
  <namespace>/     ← per-extensie runtime cache (externally readable)

Status

v0.1 — alleen DB, config, migrations. Connections (LiteLLM, API keys) en events bus komen later.

API

Database

import { getDb } from "@zerodawn/pi-core/db";

const db = getDb(); // singleton, lazy init
db.prepare("SELECT ...").all();

Migrations

import { registerMigrations } from "@zerodawn/pi-core/migrations";

registerMigrations("gitflow", [
  `CREATE TABLE gitflow_events (...)`,
  `ALTER TABLE gitflow_events ADD COLUMN ...`,
]);

Migrations zijn namespaced. Elke extensie houdt haar eigen versielijn bij in _migrations. Volgorde binnen de array is de versie-volgorde.

Config

import { getConfig, patchConfig } from "@zerodawn/pi-core/config";

const cfg = getConfig<{ pushTarget: string }>("gitflow");
patchConfig("gitflow", { pushTarget: "dev" });

Cache

import { cacheDir } from "@zerodawn/pi-core";

const dir = cacheDir("pi-ping"); // ~/.cache/pi-core/pi-ping/
// caller is responsible for mkdirSync(..., { recursive: true })

Voor runtime state die externe processen (tmux statusline, CLI subprocesses, notifiers) direct moeten lezen — dus niet via een node + sqlite bootstrap. Persistente queryable data hoort nog steeds in getDb.

Paths overrides

Voor tests of alternatieve setups:

ZERODAWN_CORE_ROOT=/tmp/test
ZERODAWN_CORE_DB=/tmp/test.db
ZERODAWN_CORE_CONFIG=/tmp/test.json
ZERODAWN_CORE_CACHE=/tmp/cache

Roadmap

  • v0.2 — connections module (LiteLLM URL, API keys via env)
  • v0.3 — events bus voor cross-extension communicatie
  • v0.4 — postgres driver als alternatief voor sqlite