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

@gtheys/pi-test-runner

v0.1.1

Published

Pi extension — non-blocking run_tests tool that discovers and runs JS/TS tests via an isolated subagent

Readme

pi-test-runner

⚠️ Experimental / Work in Progress — behaviour may change.

Pi extension that discovers and runs JS/TS test scripts from the nearest package.json, spawning an isolated subagent to execute them. Results are injected back into the session automatically when done — the tool is non-blocking.

How it works

  1. Scans up from the current directory to find the nearest package.json.
  2. Extracts scripts matching test patterns (test, test:*, jest, vitest, playwright, mocha, cypress, e2e, spec).
  3. If multiple scripts exist and no script param is given, shows a picker.
  4. Detects the package manager from lockfiles (yarn.lock, pnpm-lock.yaml, fallback to npm).
  5. Spawns an isolated pi subprocess as the subagent.
  6. Returns immediately — session is unlocked while tests run.
  7. Subagent sends contact_supervisor progress updates via pi-intercom.
  8. When done, pi.sendMessage({ triggerTurn: true }) re-engages the LLM with structured pass/fail results.

Tool parameters

| Parameter | Type | Description | |-----------|------|-------------| | script | string? | Script key from package.json (e.g. test:unit). Auto-detected if omitted. | | cwd | string? | Working directory to search. Defaults to current project directory. | | model | string? | Model ID for the subagent. Overrides the configured default. |

Commands

/run-tests                — run tests, truly non-blocking
/run-tests test:unit      — run a specific script

/test-runner              — show current config and active runs
/test-runner model <id>   — set default subagent model
/test-runner model        — show current default model
/test-runner reset        — clear all config
/test-runner back         — return to the previous session

/run-tests vs run_tests tool

| | /run-tests command | run_tests tool | |--|---------------------|------------------| | Triggered by | You (directly) | LLM | | LLM turn while running | None | One turn for "started", one for results | | Session stays idle? | ✓ Always | ✗ LLM responds twice | | When to use | Normal test runs | LLM-driven workflows |

Configuration

Global config: ~/.pi/agent/test-runner/config.json

| Option | Type | Default | Description | |---|---|---|---| | defaultModel | string | (pi default) | Model ID for the test-runner subagent |

{
  "$schema": "./.pi/agent/test-runner/config.schema.json",
  "defaultModel": "claude-haiku-4-5"
}