← Back

CLI Documentation

What is the webhook.build CLI?

The webhook.build CLI tool allows you to forward webhooks from your webhook.build endpoint directly to your local development server. This is perfect for testing webhook integrations without deploying your code or exposing your localhost to the internet.

When a webhook is received at your webhook.build endpoint, it's instantly forwarded to your local server via a secure realtime connection.

Installation

Note: This is a temporary distribution method. We're working on package managers and install scripts for easier installation.

Download from GitHub Releases

  1. Visit the GitHub Releases page
  2. Download the binary for your operating system:
    • whb-linux-amd64 - Linux (64-bit)
    • whb-darwin-amd64 - macOS (Intel)
    • whb-darwin-arm64 - macOS (Apple Silicon)
    • whb-windows-amd64.exe - Windows (64-bit)
  3. Rename the binary to whb (or whb.exe on Windows)
  4. Make it executable (Linux/macOS only):
    chmod +x whb
  5. Move it to a directory in your PATH (optional but recommended):
    sudo mv whb /usr/local/bin/

Usage

Basic Command

whb -e <endpoint-uuid> -f <forward-url>

Example

whb -e 552540da-50fe-4c1c-a0b9-1be540c690c3 -f http://localhost:3000/webhook

This will forward all webhooks received at your webhook.build endpoint to http://localhost:3000/webhook.

Command-Line Flags

-e, --endpoint <uuid>

Required. Your webhook.build endpoint UUID. You can find this in your endpoint URL or on the endpoint page.

-f, --forward <url>

Required. The local URL where webhooks should be forwarded. This is typically your local development server.

-p, --password <string>

Optional password for password-protected endpoints.

--version

Display the CLI version.

--help

Display help information.

How It Works

  1. The CLI establishes a secure realtime connection to webhook.build
  2. When a webhook is received at your endpoint, it's instantly pushed to the CLI
  3. The CLI forwards the webhook to your local server with the same headers, body, and method
  4. Your local server processes the webhook as if it came directly from the source
  5. The CLI displays the forwarding status and any errors

Tip: When the CLI is connected, you'll see a purple "CLI" badge on your endpoint page!

More Examples

Forward to a different port

whb -e your-endpoint-uuid -f http://localhost:8080/webhooks

Connecting to a password protected endpoint

whb -e your-endpoint-uuid -f http://localhost:8080/webhooks -p your-password

Enable verbose logging

whb -e your-endpoint-uuid -f http://localhost:3000 -v

Forward to a specific path

whb -e your-endpoint-uuid -f http://localhost:3000/api/webhooks/stripe

Troubleshooting

Connection failed

Make sure your endpoint UUID is correct and that you have an active internet connection.

Webhooks not being forwarded

Verify that your local server is running and accessible at the forward URL. Use the -v flag to see detailed logs.

Permission denied (Linux/macOS)

Make sure the binary is executable: chmod +x whb