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

@zerotal/devtools

v1.7.4

Published

In-browser developer tools for Zerotal — request traces, an inspector panel, and an extensible tab registry.

Readme

@zerotal/devtools

A live, in-page development panel that traces every request — SQL queries, N+1 warnings, logs, mail, cache, and jobs.

@zerotal/devtools injects a floating debug panel into every HTML response during development. No browser extension required: it shows per-request traces and exposes a TraceStore you can read programmatically. DevtoolsProvider is a no-op when APP_ENV=production or APP_ENV=prod.

Part of the Zerotal framework. Requires Bun ≥ 1.3.14.

Installation

bun add @zerotal/devtools

Setup

1. Register the provider

// bootstrap/providers.ts
import { DatabaseProvider } from "@zerotal/orm";
import { DevtoolsProvider } from "@zerotal/devtools";

const providers = [
  // …your other providers
  DatabaseProvider,
  DevtoolsProvider,
];

export default providers;

DevtoolsProvider automatically registers DevtoolsInjectionMiddleware — you do not need to add it to .use([…]) manually.

2. Start the client panel

In your frontend entry (e.g. resources/js/app.js):

import { DevTools } from "@zerotal/devtools/client";
DevTools.start(); // optionally { endpoint: "/__zerotal/devtools" }

This connects to the SSE stream and mounts the floating panel. Press Alt+D (or Cmd+D on Mac) to toggle it.

Usage

Read traces programmatically

import { traceStore } from "@zerotal/devtools";

// All traces stored in memory (up to 100, most recent first)
const traces = traceStore().all();

// Find slow requests / N+1 offenders
const slow = traces.filter((t) => t.durationMs > 500);
const nplus = traces.filter((t) => t.warnings.length > 0);

// Subscribe to new traces (fn receives null on 'clear')
const unsub = traceStore().subscribe((trace) => {
  if (trace === null) return;
  console.log(`${trace.method} ${trace.path} → ${trace.statusCode} (${trace.durationMs}ms)`);
});
unsub();

traceStore().clear();

Traces persist to .zerotal/devtools.sqlite and reload on restart. Configure in config/devtools.ts:

import { DevtoolsConfig } from "@zerotal/devtools";

export default DevtoolsConfig({
  capacity: 250,
  dbPath: ".data/devtools.sqlite", // null keeps traces in memory only
  pruneHours: 48,
  redact: { allow: ["email"] }, // query bindings are masked by default
});

ZT_DEVTOOLS_DB and ZT_DEVTOOLS_PRUNE_HOURS still apply when no config file is present.

Exports

The package exposes two subpaths:

@zerotal/devtools (.)

| Export | Kind | Description | | ----------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------- | | DevtoolsProvider | provider | Registers the injection middleware and internal /__zerotal/devtools routes (dev only). | | DevtoolsInjectionMiddleware | middleware | Injects the panel into HTML responses. Type: DevtoolsInjectionOptions. | | TraceStore, traceStore | class / accessor | In-memory + SQLite-backed trace store (all, push, clear, subscribe, dispose). | | DevtoolsConfig | config | Typed config/devtools.ts factory. Type: DevtoolsConfigShape. | | traceSink, traceChannels | sink / registry | The devtools.trace surface other packages contribute through. | | redactBindings | function | Mask the bindings of a statement. Type: RedactionOptions. | | Trace types | types | RequestTrace, QuerySpan, NPlusOneWarning, MailEntry, CacheEntry, JobEntry, TraceChannelDescriptor. |

@zerotal/devtools/client (./client)

| Export | Description | | ---------- | --------------------------------------------------------------------- | | DevTools | Browser-side panel; call DevTools.start() from your frontend entry. |

Documentation