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

autowebhook

v3.0.7

Published

Automatic ngrok tunnel manager with health checking for webhooks

Readme

AutoWebhook

npm version License: GPL-3.0-only Powered by Bun GitHub

AutoWebhook is a library for Node.js and Bun that automatically creates and manages tunnels using services like ngrok and localhost.run. It provides stable public URLs for your local server, which is ideal for developing and testing webhooks.

The library runs your chosen tunnel provider in the background, monitors its status, automatically restarts it in case of failures, and provides a simple API to manage one or multiple tunnels simultaneously.

Why AutoWebhook?

When developing services that use webhooks, you need a public HTTPS URL. Tunneling services are excellent for this, but often require manual startup and management.

AutoWebhook automates this entire process:

  • Automatic Start: Runs tunnel providers alongside your application.
  • Multi-Provider: Supports ngrok and localhost.run out of the box.
  • Multi-Tunnel: Run and manage multiple tunnels at the same time.
  • Monitoring and Restart: A built-in health checker monitors each tunnel and automatically restarts it on failure.
  • Simplicity: Eliminates the need for manual steps and extra scripts.

Core Features

  • Automatic Tunnel Management: Start, stop, and restart in the background.
  • Multi-Provider Support: Use ngrok, localhost.run, or other future providers.
  • Multi-Tunnel Management: Run multiple tunnels simultaneously for high availability or A/B testing.
  • Health Check: Optional component to monitor the status of each tunnel.
  • Reliability: Automatic restart on connection loss or failures.
  • Flexible Configuration: Configure multiple tunnels, each with its own provider, port, and provider-specific settings.
  • Event-driven Architecture: Get real-time notifications for each tunnel's status.
  • TypeScript Support: Fully typed for robust development.

Installation

npm install autowebhook
# or with bun
bun add autowebhook
# or with yarn
yarn add autowebhook

Quick Start

Here's how you can get a public URL for your local server in just a few lines:

// index.ts
import { AutoWebhook } from 'autowebhook';

// 1. Configure a tunnel
const webhook = new AutoWebhook({
  tunnels: [{ name: 'my-app', provider: 'ngrok', port: 3000 }]
});

// 2. Start the tunnel(s)
const [url] = await webhook.start(); // .start() returns an array of URLs

console.log(`App running at: ${url}`);

// Your local server logic that will listen on port 3000
// ...

Requirements

  • Node.js: >= 18.0.0
  • Bun: >= 1.0.0 (optional)
  • TypeScript: >= 5.0.0 (optional, but recommended)

For ngrok tunnels, you may need to install ngrok separately or provide an auth token for advanced features.

Documentation

For detailed configuration, API methods, and events, see the API Reference.

For more complex use cases, including how to set up a Telegram bot or manage multiple tunnels, see the Usage Examples.

Package Contents

This package is published as compiled JavaScript with TypeScript definitions:

  • ESM: dist/index.js (ES modules)
  • CommonJS: dist/index.cjs (CommonJS modules)
  • Types: dist/index.d.ts (TypeScript definitions)

The package supports both import and require syntax:

// ESM
import { AutoWebhook } from 'autowebhook';

// CommonJS
const { AutoWebhook } = require('autowebhook');

Development

# Clone the repository
gh repo clone rozeraf/autowebhook

# Install dependencies
bun install

# Run tests
bun test

# Build the package
bun run build

# Run linting
bun run lint

Changelog

All changes are documented in the CHANGELOG.md file.

License

This project is distributed under the GPL-3.0-only license. See the LICENSE file for more information.