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

@realvendex/pi-log

v1.0.0

Published

Structured logging and monitoring for pi.dev extensions — log piping, tailing, and rotation

Downloads

32

Readme

@realvendex/pi-log

Structured logging and monitoring for pi.dev extensions — log piping, tailing, and rotation.

Installation

pi install npm:@realvendex/pi-log

What It Does

pi-log provides structured logging tools for pi.dev extensions. It manages an in-memory log buffer with configurable severity levels, multiple output transports, and retention policies — perfect for debugging, monitoring, and audit trails in your pi.dev workflows.

Integration points: pi-config (log level config), pi-env-guard (audit trail), pi-perf (performance logging).

Tools

log-pipe

Write a structured log entry with configurable level, transport, and format.

Parameters:

  • level (string, required) — Severity: debug, info, warn, error
  • message (string, required) — The log message to record
  • transport (string, optional) — Where to write: memory (buffer only), file, console (default: memory)
  • format (string, optional) — Output format: json or pretty (default: pretty)
  • meta (object, optional) — Metadata key-value pairs to attach
  • source (string, optional) — Source label (e.g. tool name, module)
  • filePath (string, optional) — File path for file transport (default: pi-log.jsonl)

Example:

Use the log-pipe tool with level="info", message="User authenticated", source="auth", meta={"userId": "abc"}

log-tail

Review recent log entries from the in-memory buffer with filtering.

Parameters:

  • level (string, optional) — Minimum level to include: debug, info, warn, error
  • since (string, optional) — ISO timestamp — only entries after this time
  • until (string, optional) — ISO timestamp — only entries before this time
  • search (string, optional) — Case-insensitive text search across message and source
  • limit (number, optional) — Max entries to return (default: 50, max: 500)
  • format (string, optional) — Output format: json or pretty (default: pretty)

Example:

Use the log-tail tool with level="warn", limit=10

log-clear

Manage log storage by clearing entries from the in-memory buffer.

Parameters:

  • strategy (string, required) — Clearing strategy:
    • all — Clear everything
    • level — Remove entries below a severity threshold
    • older-than — Remove entries older than a duration (e.g. 30s, 5m, 2h, 7d)
    • keep-last — Keep only the N most recent entries
  • minLevel (string, optional) — For level strategy: entries below this are removed (default: info)
  • olderThan (string, optional) — For older-than strategy: duration string (default: 1h)
  • keepLast (number, optional) — For keep-last strategy: entries to keep (default: 100)

Example:

Use the log-clear tool with strategy="keep-last", keepLast=50

Resources

License

MIT