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-roasts

v1.0.1

Published

A pi extension that roasts you while you code.

Readme

🔥 pi-roast

A pi extension that roasts you while you code.

Every time you run a command, edit a file, switch models, or just sitting there waiting for 5 o'clock to come around, get a fresh roast in your widget area.

Features

  • Curated insults — 129 general, 20 failure-specific, and 17 contextual categories covering rm -rf, sudo, force push, .env files, YAML, and more
  • Context-aware roasts — detects what you're doing and serves a targeted insult: editing .env? rm -rf? git push --force? Precision strikes
  • Model-switch roasts — switching models with /model or Ctrl+P triggers a roast about your life choices (12-entry pool)
  • Failure roasts — when a tool fails, you get roasted harder (50% chance)
  • Shuffle bag — Fisher-Yates shuffle with draw-without-replacement and cross-cycle repeat prevention
  • Tool-triggered roastsbash, write, edit always roast; read roasts 30% of the time; unclassified tools roast 15% of the time
  • Turn-aware idle timer — pauses during active agent turns, resumes when idle; random insults every 45–120 seconds of inactivity
  • Widget display — insults appear in the widget area above the editor
  • /roast command — toggle roasting on/off, state persisted within the session via appendEntry
  • /roast-me command — on-demand insult (works even when muted!)
  • /roast-color command — change the roast text color to any theme color
  • Minimal dependency design — single TypeScript entry point plus insults.json in the extensions/ directory, no npm packages needed

Installation

Option 1: Auto-discovery (recommended)

Copy the extension to pi's global extensions directory:

cp extensions/pi-roast.ts ~/.pi/agent/extensions/pi-roast.ts

Copy the insult file:

cp extensions/insults.json ~/.pi/agent/extensions/insults.json

Pi will auto-discover it on startup. Use /reload in pi to pick it up without restarting.

Option 2: npm package

npm install pi-roasts

Then configure pi to load the extension. Pi loads TypeScript directly (no build step needed), so you can reference the entry point from package.json's main field or copy the extensions/ directory into ~/.pi/agent/extensions/.

Option 3: One-off test

pi -e ./extensions/pi-roast.ts

Option 4: Project-local

Create .pi/extensions/ in your project root and place extensions/pi-roast.ts there.

Commands

| Command | Description | | --------- | ------------- | | /roast | Toggle pi-roast on/off | | /roast-me | Get roasted on demand (works even when muted!) | | /roast-color <color> | Set roast text color (see theme color options below) |

/roast-color options

Valid theme color names: text, accent, muted, dim, success, error, warning, border, borderAccent, borderMuted

/roast-color error    # red roasts
/roast-color accent   # default
/roast-color muted    # subtle

How It Works

| Trigger | Behavior | | --------- | ---------- | | Session starts | Notification: "🔥 pi-roast activated" + first insult in widget | | bash / write / edit | 100% chance of a roast; context-aware insult if pattern matches | | read | 30% chance of a roast | | Other tools | 15% chance of a roast | | Tool failure | 50% chance of a failure-specific roast | | Model switch | 100% chance of a model-switch roast | | Idle time | Random roast every 45–120s of inactivity (paused during agent turns) | | /roast | Toggle on/off; clears widget when off | | /roast-me | Immediate roast, bypasses mute | | Session ends / switch | Timer cleanup, widget cleared |

Context-Aware Insults

The extension detects specific patterns in your tool calls and serves targeted insults:

| Pattern | Example Insult | | --------- | --------------- | | rm -rf | "rm -rf? I hope you meant that." | | sudo | "sudo: because normal permissions are for normal code." | | git push --force / git push -f | "Force push? Bold move. Your teammates will love that." | | git commit (bash or GitHub/Git wrapper tools) | "I hope that commit message is more than just 'fix'." | | npm install / yarn add / pnpm add | "Another dependency. Your node_modules is already a small country." | | curl | "Curling that URL like you know what it returns." | | chmod | "chmod: when in doubt, make everything executable." | | docker | "Docker: because 'it works on my machine' wasn't enough." | | kill | "kill: the developer's way of saying 'I give up.'" | | .env files | "Touching .env? What could possibly go wrong." | | package.json | "Touching package.json? This ends with npm install, doesn't it." | | .yaml / .yml files | "YAML: yet another massive headache. Good luck with the indentation." | | temp/tmp/hack/wip/fix files | "That file name is already an apology." | | README | "Reading the README? First time?" | | config files (excl. node_modules) | "Touching config files? Living dangerously." | | node_modules | "You're reading node_modules. That's a cry for help." | | Test files (.test. / .spec.) | "A test file! Proof that miracles still happen." |

Model-Switch Roasts

Switching models triggers a roast from a dedicated pool of 12:

Switching models? Running from your problems again.
New model, same mistakes.
Good luck with that one. It'll need it.
The model changed but your code didn't.
Maybe this one can fix what you broke.
Different model, same skill issues.
A new model won't save you from yourself.
Opus called. They want their tokens back.
New model, same dev. Try harder.
No. No. Don't change models. Change developers!
What? You're calling ALL the models to help you.
New model? Have you tried baking instead of coding?

Sample Insults

Your code is why AI was invented. To do it properly.
That function has more arguments than your last relationship.
Another `sudo`? What are you, the root of all problems?
Your git history is a cry for help.
I've seen better state management in a goldfish.
That regex is a crime scene.
You write code like someone paying by the semicolon.
Love the confidence with which you wrote that bug.

Failure Insults

When a tool command fails, you get special treatment:

That command failed. Just like the last three.
Error: skill issue.
The process exited with sadness.
Even the stack trace is embarrassed.
Error 404: competence not found.

Customization

Edit insults.json or pi-roast.ts:

  • Add/remove insults — edit insults.json under general, failures, or contextual
  • Add new contextual categories — add a key to contextual in insults.json and a matching pattern in getContextInsult()
  • Change idle timing — edit idleMinMs and idleMaxMs in DEFAULT_CONFIG (default: 45s–120s)
  • Change read roast chance — edit readInsultChance in DEFAULT_CONFIG (default: 0.3)
  • Change failure roast chance — edit failureInsultChance in DEFAULT_CONFIG (default: 0.5)
  • Change unclassified tool roast chance — edit unclassifiedToolChance in DEFAULT_CONFIG (default: 0.15)
  • Add model-switch roasts — add entries to the MODEL_ROASTS array in pi-roast.ts
  • Change roast color — use /roast-color <name> at runtime, or edit color in DEFAULT_CONFIG

Implementation Details

  • ShuffleBag — Fisher-Yates shuffle with draw-without-replacement and cross-cycle repeat prevention
  • Turn-aware idle — idle timer pauses on turn_start, resumes on turn_end/agent_end; avoids roasts while the agent is actively working
  • Widget display — each roast is shown in the widget area above the editor via setWidget()
  • Context-aware roasts — pattern matching on bash commands and file paths; also detects commits via GitHub/Git wrapper tools; falls back to generic shuffle bag
  • Failure detection — checks event.isError and event.result.isError on tool results
  • Model-switch roasts — random selection from MODEL_ROASTS on model_select
  • Session persistence — enabled state saved via pi.appendEntry() and restored from sessionManager.getBranch() on session start
  • Context lifecyclelastCtx invalidated on session_before_switch and session_shutdown to prevent stale references; idle timer guard checks lastCtx before firing
  • Theme color validation/roast-color validates against the known ThemeFgColor union at runtime
  • Hooked eventssession_start, turn_start, turn_end, agent_end, tool_call, tool_result, model_select, session_before_switch, session_shutdown

Uninstall

rm ~/.pi/agent/extensions/pi-roast.ts

Then /reload in pi or restart.

Contributing

See CONTRIBUTION.md for guidelines on adding insults, contextual categories, and submitting PRs.

License

MIT