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

waf-shadow-tui

v1.0.12

Published

WAF Shadow Rules Monitoring TUI - Terminal dashboard for AWS WAF shadow rule analysis

Readme

WAF Shadow Rules Monitoring TUI

Terminal UI for exploring AWS WAF shadow-rule telemetry from either local JSON snapshots or live Athena queries.

Features

  • Offline mode backed by demo or exported JSON snapshots
  • Live Athena-backed manifest and per-system snapshot loading
  • Ink 5.x terminal UI with overview, drilldown, and sample views
  • Vim-style and arrow-key navigation
  • Optional interactive AWS credential prompt for Athena mode
  • Bun-based development, test, and compile workflow

Installation

Install globally:

npm install -g waf-shadow-tui

Run without installing:

npx waf-shadow-tui --folder ./demo-data

Usage

Offline mode with local JSON fixtures:

npx waf-shadow-tui --folder ./demo-data

Athena mode with a named AWS profile:

waf-shadow-tui --profile myprofile --region us-east-1

Athena mode without a profile:

waf-shadow-tui --region us-east-1

If you omit --folder, the CLI uses Athena. Credentials are resolved in this order:

  1. Explicit values entered in the interactive prompt
  2. --profile or AWS_PROFILE
  3. Standard AWS environment/default credential chain

CLI Flags

| Flag | Description | Default | |------|-------------|---------| | --folder <path> | Load manifest and snapshots from local JSON files instead of Athena | none | | --profile <name> | AWS shared config/credentials profile for Athena mode | current AWS SDK default chain | | --region <region> | AWS region for Athena queries | us-east-1 | | --help, -h | Print usage and exit | n/a |

Keyboard Shortcuts

| Shortcut | Context | Action | |----------|---------|--------| | j / Down | Overview, drilldown, samples | Move selection down | | k / Up | Overview, drilldown, samples | Move selection up | | Enter | Overview | Open selected system | | Enter | Drilldown | Open samples for selected rule when samples exist | | Tab | Drilldown | Cycle time period (24h, 7d, 30d) | | Esc | Drilldown, samples, error states | Go back / clear error | | q | Anywhere | Quit |

Demo Data Format

Offline mode expects a folder with a manifest plus per-system snapshots.

Manifest shape:

{
  "generated": "2026-05-20T15:00:00Z",
  "systems": [
    {
      "name": "payments-api",
      "environments": ["prod", "stage"],
      "totalRules": 14,
      "latestSnapshot": "2026-05-20T15:00:00Z",
      "dataPath": "systems/payments-api.json"
    }
  ]
}

Snapshot shape:

{
  "system": "payments-api",
  "generatedAt": "2026-05-20T15:00:00Z",
  "environments": [
    {
      "name": "prod",
      "ruleCount": 10,
      "totalHits": 2481
    }
  ],
  "periods": [
    {
      "name": "24h",
      "rules": [
        {
          "ruleId": "rule-1",
          "ruleName": "RateLimitRule",
          "action": "COUNT",
          "totalHits": 25,
          "environments": {
            "prod": 20,
            "stage": 5
          },
          "samples": []
        }
      ]
    }
  ]
}

Building From Source

Install dependencies:

bun install

Run the app in development:

bun run src/index.ts --folder ./demo-data

Build the standalone Bun executable:

bun run build

Useful validation commands:

bun test
bun run typecheck

Screenshots

Screenshots will be added here.

Architecture Overview

The application is layered as CLI entry -> App shell -> Ink components -> Data providers -> shared domain types. LocalLoader and AthenaDataProvider both implement the same DataProvider contract so the UI can switch between offline and live data without changing view logic.

License

MIT