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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@unhook/client

v0.6.2

Published

<div align="center">

Readme

Unhook

npm version License: MIT Build Status PRs Welcome

Features

  • 🚀 Instant Setup: Get started in seconds with a simple CLI command
  • 👥 Team-Friendly: Share one webhook URL across your entire team
  • 🔀 Smart Distribution: Automatically routes webhooks to the right developer
  • 🔒 Secure by Default: End-to-end encryption for all webhook traffic
  • 🌍 Cross-Platform: Works seamlessly on Windows, macOS, and Linux (x64/ARM64)
  • 📊 Beautiful Dashboard: Real-time monitoring of webhook requests
  • 🔄 Request Replay: Easily replay webhook requests for testing
  • 🎯 Smart Routing: Route webhooks to different local ports
  • 📝 Request Logging: Detailed logs of all webhook requests
  • 🛠️ Built for Developers: Works with popular webhook providers:
    • Stripe
    • GitHub
    • Clerk
    • Discord
    • And many more!

Quick Start

Option 1: VS Code Extension (Recommended)

The fastest way to get started with Unhook is using our VS Code extension:

  1. Install Extension

    • Open VS Code
    • Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
    • Search for "Unhook - Webhook Development"
    • Click Install
  2. Authenticate

    • Click the Unhook icon in the Activity Bar
    • Click "Sign in to Unhook" in the status bar
    • Complete the OAuth flow in your browser
  3. Configure

    • Create an unhook.yml file in your workspace:

webhookUrl: https://unhook.sh/your-org/your-webhook-name destination: - name: local url: http://localhost:3000/api/webhooks delivery: - source: "*" destination: local


4. **Start Receiving Webhooks**
- Create a webhook URL at [unhook.sh/app](https://unhook.sh/app)
- Configure your provider to use the Unhook URL
- View events in the VS Code sidebar as they arrive

### Option 2: CLI

1. **Install CLI**
```bash
# Using npx (recommended)
npx @unhook/cli init

# Using bunx
bunx @unhook/cli init

# Using pnpm
pnpm dlx @unhook/cli init

# Using deno
deno run --allow-net --allow-read --allow-write npm:@unhook/cli init
  1. Initialize Project

    npx @unhook/cli init

    This will:

    • Open your browser to authenticate with Unhook
    • Create an unhook.yml file in your project
    • Configure your webhook endpoints
  2. Start the Webhook

    npx @unhook/cli listen

    This will create a secure webhook endpoint that delivers requests to your local server based on the configuration.

  3. Configure Your Webhook Provider Use the webhook URL in your provider's settings:

    https://unhook.sh/your-org/your-webhook-name

Configuration

Configuration File

The unhook.yml file is the primary way to configure Unhook. It supports the following structure:

# Required: Your unique webhook URL
webhookUrl: https://unhook.sh/your-org/your-webhook-name

# Optional: Enable debug mode
debug: false

# Optional: Enable telemetry
telemetry: true

# Required: Array of destination endpoints
destination:
  - name: local
    url: http://localhost:3000/api/webhooks
    ping: true  # Optional: Health check configuration

# Optional: Array of webhook sources
source:
  - name: stripe
  - name: github

# Required: Array of delivery rules
delivery:
  - source: "*"  # Optional: Source filter (defaults to *)
    destination: local  # Name of the destination from 'destination' array

Environment Variables

All configuration options can be set via environment variables:

# Core settings
WEBHOOK_URL=https://unhook.sh/your-org/your-webhook-name
WEBHOOK_DEBUG=true
WEBHOOK_TELEMETRY=true

# Destination settings
WEBHOOK_DESTINATION_0_NAME=local
WEBHOOK_DESTINATION_0_URL=http://localhost:3000/api/webhooks
WEBHOOK_DESTINATION_0_PING=true

# Source settings
WEBHOOK_SOURCE_0_NAME=stripe
WEBHOOK_SOURCE_1_NAME=github

# Delivery settings
WEBHOOK_DELIVERY_0_SOURCE=*
WEBHOOK_DELIVERY_0_DESTINATION=local

CLI Commands

Core Commands

| Command | Description | |---------|-------------| | unhook init | Authenticate with Unhook and set up your project | | unhook listen | Start the Unhook relay to receive and forward webhooks | | unhook login | Authenticate your CLI with your Unhook account |

Command Options

unhook init

unhook init [options]

Options:
  -c, --code         Authentication code for direct login (advanced)
  -t, --destination  Set the local destination URL to forward webhooks to
  -s, --source       Set the source name for incoming webhooks
  -w, --webhook      Specify a webhook ID to use
  -v, --verbose      Enable verbose debug logging

unhook listen

unhook listen [options]

Options:
  -c, --config       Path to a custom unhook.yml configuration file
  --path             Directory to watch for config changes (default: ".")
  -v, --verbose      Enable verbose debug logging

Team Development

Shared Configuration

Teams can share a single webhook configuration:

webhookUrl: https://unhook.sh/your-org/your-team-webhook
destination:
  - name: dev1
    url: http://localhost:3000/api/webhooks
    ping: true
  - name: dev2
    url: http://localhost:3001/api/webhooks
    ping: true
source:
  - name: clerk
  - name: stripe
delivery:
  - source: clerk
    destination: dev1
  - source: stripe
    destination: dev2

Team Features

  • Shared Webhook URL: All team members use the same webhook URL
  • Individual Routing: Each developer can receive specific webhook types
  • Request History: View and replay requests across the team
  • Real-time Monitoring: See incoming requests in real-time
  • Team Dashboard: Monitor team activity and webhook status

Cross-Platform Installation

Unhook CLI automatically downloads and installs the correct platform-specific binary for your system during installation. This ensures optimal performance and eliminates the need for compilation or build tools.

Supported Platforms

  • Windows: x64 (64-bit)
  • macOS: Intel (x64) and Apple Silicon (ARM64)
  • Linux: x64 and ARM64 with both glibc and musl (Alpine Linux) support

How It Works

  1. Platform Detection: Automatically detects your OS, architecture, and C library variant
  2. Binary Download: Downloads the appropriate pre-compiled binary from GitHub releases
  3. Smart Caching: Stores binaries locally in ~/.unhook/bin/{version}/ for fast access
  4. Transparent Execution: CLI wrapper seamlessly executes the native binary
  5. Version Management: Automatically cleans up old versions during updates

Package Manager Support

Works with all major JavaScript package managers:

# npm
npm install -g @unhook/cli

# yarn
yarn global add @unhook/cli

# pnpm
pnpm add -g @unhook/cli

# bun
bun add -g @unhook/cli

For detailed technical information about the cross-platform implementation, see our Cross-Platform CLI Setup Guide.

Provider Setup

Stripe

  1. Go to your Stripe Dashboard
  2. Click "Add Endpoint"
  3. Enter your Unhook URL:
    https://unhook.sh/your-org/your-webhook-name

GitHub

  1. Go to your repository settings
  2. Navigate to "Webhooks"
  3. Click "Add webhook"
  4. Enter your Unhook URL:
    https://unhook.sh/your-org/your-webhook-name

Clerk

  1. Go to your Clerk Dashboard
  2. Navigate to "Webhooks"
  3. Click "Add Endpoint"
  4. Enter your Unhook URL:
    https://unhook.sh/your-org/your-webhook-name

Security Features

  • API key authentication for private webhooks
  • Method restrictions
  • Source restrictions
  • Request body size limits
  • Header filtering
  • End-to-end encryption

Authentication

Authentication data is stored locally at ~/.unhook/auth-storage.json:

  • Authentication state
  • User tokens
  • Organization ID
  • Basic user info

To clear auth data:

rm ~/.unhook/auth-storage.json

Deployment

Unhook can be deployed both as a self-hosted solution or on cloud infrastructure.

Self-Hosted Deployment

Deploy Unhook on your own infrastructure using Docker:

# Quick start
make deploy-local

# Production deployment with nginx
make deploy-prod

Cloud Deployment

Deploy to Kubernetes or cloud providers:

# Deploy to Kubernetes
make deploy-k8s

# Or use cloud-specific deployment guides

For detailed deployment instructions, see our Deployment Guide.

Key Features for Self-Hosting

  • Complete Control: Run on your own infrastructure
  • Data Privacy: Keep all webhook data within your organization
  • Custom Configuration: Adapt to your specific needs
  • Docker & Kubernetes: Production-ready deployment options
  • High Availability: Built for scale with Redis and PostgreSQL

Documentation

Support

Contributing

We welcome contributions! See our Contributing Guide for details.

License

Unhook is open source software licensed under the MIT License.