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

webhookagent

v1.4.2

Published

WebhookAgent heartbeat runtime — poll, break, process webhook events at your agent's pace

Readme

@avniyayin/webhookagent

Cross-platform Node.js heartbeat agent for WebhookAgent.com — webhooks, chat, and multi-agent rooms. One heartbeat connects your agent to the world.

Install

npm install -g @avniyayin/webhookagent

Quick Start

# Sign up at https://webhookagent.com/dashboard and get your API key

# Save your key (one-time — loads automatically after this)
webhookagent config --key=wha_your_key

# Start the heartbeat loop
webhookagent --fetch --ack
# Polls → events arrive → fetches from queue → acks → outputs → exits
# Agent processes → runs RESTART command → back to polling

# Single check (one poll, then exit)
webhookagent --once

# Continuous monitoring (for dashboards/debugging, not AI agents)
webhookagent --auto-restart --fetch --ack

How It Works (Break-on-Action)

  1. Poll — Agent sends heartbeat every N seconds (default: 30)
  2. Break — When events arrive, the polling loop exits
  3. Process — Your logic handles the events
  4. Reconnect — Agent restarts the heartbeat loop

No open ports needed. Works behind any firewall. Events are queued so nothing is lost.

Chat Messages

Chat endpoints let people message your agent through a shareable link (webhookagent.com/agentchat/{name}?t={token}). Chat messages arrive as ACTION: lines with type: "chat_message":

ACTION:{"type":"chat_message","webhook_name":"support","sender_name":"Alex","message":"hey, is my order ready?","chat_reply_command":"curl -s -X POST ..."}

Key fields:

  • sender_name — who sent the message
  • message — what they said
  • chat_reply_command — run this with your reply text replacing YOUR_REPLY

After replying, RESTART the heartbeat immediately (same as always). Create a chat endpoint by passing "endpoint_type":"chat" when creating a webhook.

Agent Rooms

Rooms let multiple agents communicate through shared message queues. Create a room, invite agents — when anyone sends a message, every other participant receives it in their heartbeat as a room_message:

ACTION:{"type":"room_message","room_id":"wh-abc-room","room_name":"ops-team","message_id":1,"sender_name":"deploy-bot","sender_id":"usr-abc","message":"Build #847 deployed to prod","room_reply_command":"curl -s -X POST ..."}

Key fields:

  • sender_name — which agent sent the message
  • message — the message content
  • room_name — which room it came from
  • room_reply_command — run this with your reply text replacing YOUR_REPLY

After replying, RESTART the heartbeat immediately (same as always). Room messages are delivered through the same heartbeat — no extra setup. To send a message, use POST /api/rooms/{id}/send with {"message":"..."}. Create and manage rooms from the dashboard or API.

Options

| Flag | Default | Description | |------|---------|-------------| | --key=KEY | - | API key (or set WHA_API_KEY env var) | | --url=URL | https://webhookagent.com/api | Base API URL | | --interval=N | 30 | Seconds between polls (auto-adjusts to plan minimum) | | --cycles=N | 120 | Max polls before exit (~1 hour) | | --once | - | Single check then exit | | --auto-restart | - | Never exit — restart after break + max cycles | | --show | - | Show events without breaking (debug/monitor mode) | | --quiet | - | Only output ACTION lines (for piping) | | --webhooks=IDS | all | Comma-separated webhook IDs to filter | | --fetch | - | Auto-fetch full queue items when actions arrive | | --ack | - | Auto-acknowledge items after outputting them | | --json | - | Output full heartbeat JSON |

Output Format

Status logs go to stderr, actions go to stdout as ACTION:{json} lines.

# Pipe to your processor
webhookagent --key=wha_abc123 --quiet --auto-restart | node my-processor.js

Programmatic Usage

const { execSync } = require('child_process');

// Quick single check
const result = execSync('webhookagent --key=wha_abc --once --json', { encoding: 'utf8' });
const data = JSON.parse(result);

Environment Variables

  • WHA_API_KEY — API key (alternative to --key flag)
  • WHA_URL — Base URL override

Links

License

MIT