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

writbase

v0.3.0

Published

WritBase CLI — self-hosted operator toolkit for agent-first task management

Readme

WritBase CLI

Self-hosted operator toolkit for WritBase — agent-first task management.

Quick Start

npx writbase init       # Interactive setup
npx writbase migrate    # Apply database schema
npx writbase key create # Create your first agent key
npx writbase status     # Verify everything works

Prerequisites

  • Node.js 18+
  • Supabase CLIInstall guide
  • A Supabase project (hosted or local)

Commands

writbase init

Interactive setup wizard. Detects local Supabase instances, validates credentials, and writes a .env file.

Handles three scenarios:

  • Hosted Supabase — prompts for URL, service role key, and database URL
  • Local Supabase — auto-detects credentials via supabase status
  • No project yet — offers to run supabase init + supabase start

writbase migrate

Applies all WritBase database migrations using supabase migration up.

writbase migrate            # Apply migrations
writbase migrate --dry-run  # Preview without applying

Bundles migrations from the WritBase repo and runs them against your database via a temporary project structure. No files are created in your working directory.

writbase key create

Interactive agent key creation. Prompts for name, role (worker/manager), and optional project/department scoping.

writbase key create
# Key name: my-agent
# Role: worker
# ✓ Agent key created
# ⚠ Save this key now — it cannot be retrieved later:
#   wb_<uuid>_<secret>

writbase key list

List all agent keys in the workspace.

writbase key list

writbase key rotate <name-or-id>

Generate a new secret for an existing key. The old secret stops working immediately.

writbase key rotate my-agent

writbase key deactivate <name-or-id>

Deactivate a key. Supports lookup by name or ID prefix.

writbase key deactivate my-agent

writbase status

Health check — validates connection and shows resource counts.

writbase status
# ✓ Connected to Supabase
# ℹ Workspace: <uuid>
#
#  Resource   │ Count
# ────────────┼───────
#  Agent Keys │ 3
#  Tasks      │ 42
#  Projects   │ 2

Environment Variables

WritBase CLI reads from .env in the current directory:

| Variable | Description | |---|---| | SUPABASE_URL | Your Supabase project URL | | SUPABASE_SERVICE_ROLE_KEY | Service role key (full admin access) | | DATABASE_URL | Direct Postgres connection string | | WRITBASE_WORKSPACE_ID | UUID of the workspace to operate on |

Troubleshooting

pg_cron notice on local dev

Some migrations reference pg_cron which isn't available locally. These are conditional and will be skipped — the notice is expected.

Finding DATABASE_URL

In the Supabase dashboard: Settings → Database → Connection string → URI. If the password contains special characters, it must be percent-encoded.

Migration errors

If writbase migrate fails, ensure:

  1. The Supabase CLI is installed and up to date
  2. DATABASE_URL is correct and the database is accessible
  3. Run with --dry-run first to preview changes