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

roastttp

v0.1.0

Published

HTTP status codes with attitude. A CLI + Express middleware that roasts your responses.

Readme

roastttp

HTTP status codes with attitude. A tiny CLI and Express middleware that roasts your responses so your terminal feels a little more alive.

GET /api/v1/nothing  → 404 NOT FOUND · 67ms

   ┌───────────────┐
   │    MISSING    │
   │               │
   │    [ ? ? ]    │
   │               │
   │  HAVE YOU     │
   │  SEEN THIS    │
   │  ENDPOINT?    │
   └───────────────┘

  🥛  NOT FOUND ¯\_(ツ)_/¯
  "check the path. check it again. it's still wrong."
  • Zero runtime dependencies
  • Works in any terminal (colors, emoji, and ASCII art all have graceful fallbacks)
  • 28 status codes, 160+ roasts, 10 hand-drawn ASCII scenes for the heroes
  • CLI + Express middleware in the same package

install

# try it without installing
npx roastttp https://httpbin.org/status/500

# install globally
npm install -g roastttp

# or add to your project for the middleware
npm install roastttp

Node 18+ required (we use native fetch).

CLI

# hit a URL, get a reaction
roastttp https://httpbin.org/status/418

# other methods
roastttp -X POST -d '{"x":1}' -H "content-type: application/json" https://httpbin.org/post

# render a specific code without a network call
roastttp --code 503

# see every reaction in one scroll
roastttp --preview

# list every code we have a reaction for
roastttp --list

Flags:

  • --minimal — hide the ASCII art blocks, keep emoji + roast
  • --no-color — disable ANSI colors (also honored via NO_COLOR=1)
  • --no-emoji — strict ASCII mode for old terminals
  • -X, --method <verb> — HTTP method (default GET)
  • -H, --header "key: value" — add a header (repeatable)
  • -d, --data <body> — request body
  • --code <n> — render the reaction for a given code, no request
  • --preview — sample gallery across tiers
  • --list — list supported codes
  • -h, --help — help
  • -v, --version — version

Exit codes follow convention: 0 for 2xx/3xx responses, 1 for 4xx/5xx (so you can use roastttp in CI checks).

Express middleware

import express from 'express';
import { roastttp } from 'roastttp/express';

const app = express();
app.use(roastttp());

app.get('/hello', (_req, res) => res.send('hi'));
app.get('/oops', (_req, res) => res.status(500).send('bad day'));

Now your terminal prints a reaction line beneath every 4xx/5xx response, right after your existing access logs. Your logs stay exactly as they were — this just appends.

options

app.use(roastttp({
  reactOn: [404, 500],          // only react to specific codes
  // reactOn: (code) => code >= 400,  // or a predicate
  rarity: 0.3,                  // 30% chance of reacting (prevents habituation)
  silent2xx: true,              // don't roast successes (default: true)
  minimal: false,               // hide ASCII art
  noColor: false,               // disable colors
  noEmoji: false,               // strict ASCII mode
  stream: process.stdout,       // where to write (default: stdout)
}));

how it picks reactions

Every known status code has 3–6 roast lines. Each request picks one at random, so running the same failing endpoint a few times doesn't show the same joke every time. Hero codes (500, 404, 418, 503, 429, and a few others) get a multi-line ASCII art block above the roast.

Colors follow status class: green for 2xx, cyan for 3xx, yellow for 4xx, red for 5xx.

adding your own roasts

The catalog lives at src/data/reactions.json. PRs welcome — see CONTRIBUTING.md for the house style and examples. One-line PRs are the fastest path.

demos

Runnable examples live in demo/:

  • demo/cli.sh — CLI walkthrough
  • demo/express-server.js — Express middleware demo
  • demo/library-usage.js — using render() directly in your own code

Next.js, Fastify, Hono adapters?

Planned. Express first because its middleware API is stable and obvious. Next.js needs logger monkey-patching which gets fragile; a fetch-wrapper style integration is likely coming first. Fastify and Hono should land soon.

license

MIT. See CHANGELOG.md for release history.