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-orca/debug

v0.0.5

Published

Debug log viewer and diagnostics overlay

Readme

pi-orca-debug

Debug log viewer overlay and logging control

Version: 0.0.3-dev
License: MIT

Overview

A diagnostic extension for Pi Orca that controls the shared structured JSONL logger from @pi-orca/core and provides an interactive full-screen overlay for browsing live log entries. Use the /debug slash command to open the log viewer, enable or disable logging, set the minimum log level, and toggle logging on and off. All other Pi Orca extensions use the shared logger instead of console.log, funneling all diagnostic data into a single append-only log file.

Features

Debug Log Viewer Overlay

Run /orca-debug (no arguments) or /orca-debug view to open a full-screen interactive overlay:

  • Scrollable log entry listSelectList with fuzzy search
  • Live polling — Refreshes every 2 seconds to show new entries in real time
  • Sort toggle — Press R to toggle between newest-first (default) and oldest-first
  • Metadata expand/collapse — Press Enter on any entry to expand its metadata block
  • Selection persistence — Cursor position is preserved across overlay rebuilds (sort toggles, live polls)
  • Keybindings: | Key | Action | |-----|--------| | / | Navigate entries | | Enter | Expand/collapse metadata | | R | Toggle sort order | | Esc | Close overlay |

Logging Control

  • Enable/disable logging — Toggle logging on and off via /debug on and /debug off
  • Configurable log levels — Set minimum log level (debug, info, warn, error) via /debug set <level>
  • Autocomplete — Full autocomplete for subcommands and log levels
  • Structured JSONL log — All entries include timestamp, level, source, message, and optional metadata
  • Log rotation — 10 MB default, keeps 3 rotated files (configurable via config.yaml)

Defaults

| Setting | Default | |---------|---------| | enabled | false (logging disabled) | | logLevel | info |

When logging is disabled, all log*() calls are no-ops — nothing is written to disk.

When logging is enabled, only entries at or above the configured log level are written:

| Level | Writes when logLevel is... | |-------|---------------------------| | debug | debug, info, warn, error | | info | info, warn, error | | warn | warn, error | | error | error only |

Log File

Location: ~/.pi/agent/orca/log.jsonl

Entry format:

{"ts":"2026-04-24T10:00:00.000Z","level":"info","source":"pi-orca-tasks","message":"Ready"}
{"ts":"2026-04-24T10:00:01.000Z","level":"debug","source":"pi-orca-models","message":"Resolved alias","meta":{"alias":"fast","resolved":"anthropic/claude-haiku-4-5"}}

Rotation: When the log exceeds 10 MB (configurable), it is rotated to log.jsonl.<ISO-timestamp>. Up to 3 rotated files are kept (configurable).

Configuration

Add to ~/.pi/agent/orca/config.yaml or <project>/.pi/orca/config.yaml:

logging:
  enabled: false                 # disable all logging (default)
  logLevel: info                 # minimum level: debug, info, warn, error
  maxFileSizeBytes: 10485760    # 10 MB (default)
  maxRotatedFiles: 3            # keep 3 rotated files (default)

Slash Commands

| Command | Description | |---------|-------------| | /orca-debug | Open the debug log viewer overlay | | /orca-debug view | Open the debug log viewer overlay (alias) | | /orca-debug on | Enable debug logging | | /orca-debug off | Disable debug logging | | /orca-debug set <level> | Set minimum log level (debug, info, warn, error) |

Autocomplete

All subcommands and log levels are autocompleted via tab completion:

  • /orca-debug → suggests on, off, set, view
  • /orca-debug set → suggests debug, info, warn, error

Architecture

src/
├── index.ts    # Extension entry: command registration, autocomplete, handlers
└── overlay.ts  # Full-screen debug log viewer overlay with live polling

Logger API

Extensions use the logger from @pi-orca/core instead of console.log:

import { logInfo, logWarn, logError, logDebug, getLogFile } from "@pi-orca/core";

logInfo("pi-orca-tasks", "Ready");
logWarn("pi-orca-models", "Alias not found", { alias: "fast" });
logError("pi-orca-cleanup", "Failed to sweep", { error: "permission denied" });
logDebug("pi-orca-debug", "Loaded 150 entries");

Dependencies

  • @pi-orca/core — Logger utility, debug config, autocomplete helpers, path resolution, selection persistence
  • @earendil-works/pi-coding-agent — DynamicBorder for overlay framing
  • @earendil-works/pi-tui — SelectList, Container, Text, Spacer for overlay UI

License

MIT License — see LICENSE for details.