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

@pi-unipi/utility

v2.20.5

Published

Utility commands and tools for Pi coding agent — lifecycle, diagnostics, cache, analytics, display, batch execution

Readme

@pi-unipi/utility

Environment info, diagnostics, cleanup, and the session name badge. The grab-bag package for maintaining your development environment and keeping an eye on provider cache behavior.

Commands

| Command | Description | |---------|-------------| | /unipi:env | Show environment info (Node, Pi, OS, paths) | | /unipi:doctor | Run diagnostics across all modules | | /unipi:status | Show immediate guidance to the live /unipi:info dashboard and /unipi:doctor diagnostics | | /unipi:cleanup | Clean stale DBs, temp files, old sessions | | /unipi:reload | Explain how to reload extensions | | /unipi:name-badge | Toggle name badge overlay | | /unipi:badge-gen | Generate session name via LLM and enable badge | | /unipi:badge-name | Set the session name shown in the badge | | /unipi:badge-settings | Configure badge behavior | | /unipi:util-settings | Unified settings TUI (badge) | | /unipi:prefix-cache | Show privacy-safe request-prefix transitions and provider cache token counters |

Examples

/unipi:env                 # Show environment
/unipi:doctor              # Run diagnostics
/unipi:cleanup             # Clean stale files
/unipi:cleanup --dry-run   # Preview what would be cleaned
/unipi:name-badge          # Toggle the session name badge
/unipi:badge-gen           # Generate a session name via LLM

Special Triggers

Utility registers with the info-screen dashboard, showing module status and diagnostic results. The footer subscribes to utility events for its extension status segment. When Herdr is present, the badge module syncs the session name to the pane title.

Provider prefix-cache diagnostics

/unipi:prefix-cache observes Pi's provider-native request payloads without modifying them. It reports session-local cache epochs, exact structural prefix extensions, retries, request-envelope/history boundaries, and provider-reported cacheRead/cacheWrite token totals.

The fingerprints are keyed HMAC-SHA-256 values using a random in-memory key that is discarded on reload. Raw prompts, messages, tool arguments, tool schemas, and provider payloads are never retained or logged by this diagnostic. Fingerprints therefore cannot be compared across process lifetimes. A reported prefix extension means the request is structurally eligible for reuse; provider TTL, routing, and cache policy still decide whether a hit occurs.

/unipi:cleanup includes private ~/.unipi/tool-results/ artifacts in the normal temporary-file retention policy (7 days by default). Use dry-run mode to review candidates before deletion.

Agent Tools

| Tool | Description | |------|-------------| | ctx_env | Environment inspection for debugging | | set_session_name | Set the session name for badge display (when badge agent-tool is enabled) |

Configurables

Name Badge

/unipi:util-settings        # Open unified settings TUI

Or edit .unipi/config/util-settings.json directly (migrated automatically from the legacy .unipi/config/badge.json on first read):

{
  "badge": {
    "badgeEnabled": true
  }
}

The badge is a persistent HUD overlay in the top-right corner showing the current session name. It auto-restores visibility on session restart.

Skill Startup Discovery

Controls whether Unipi's built-in skills are cataloged in the agent's system prompt at startup (default: on). Your own skills — global, project, settings-mounted, and third-party packages — always stay cataloged.

/unipi:skills-settings        # Interactive toggle (or /unipi:skills-settings on|off)

Or edit ~/.pi/agent/settings.json directly:

{
  "unipi": {
    "skills": { "discovery": false }
  }
}

When off, Unipi's bundled skills are removed from the <available_skills> catalog, so their metadata never populates agent context. They remain invocable via /skill:name — pi expands those commands by reading the skill file directly, independent of the prompt catalog. The filter is applied consistently every turn, so provider prefix caching is unaffected.

Programmatic API

| Module | Path | Description | |--------|------|-------------| | ProcessLifecycle | lifecycle/process | Parent PID polling, orphan detection, signal handlers | | cleanupStale | lifecycle/cleanup | Stale DB/temp/session cleanup with dry-run | | AnalyticsCollector | analytics/collector | Privacy-respecting event collection with daily rollup | | runDiagnostics | diagnostics/engine | Cross-module health checks with plugin architecture |

Privacy

The analytics collector is privacy-respecting:

  • No file contents recorded
  • No sensitive data (API keys, tokens, passwords) — redacted automatically
  • Strings truncated to 500 characters
  • All data stays local

License

MIT