Getting Started with the CLI

Last updated January 14, 20265 min read
TL;DR
  1. Install the CLI: brew install hooklistener/tap/hooklistener
  2. Authenticate: hooklistener login
  3. Start a tunnel: hooklistener tunnel --port 3000
  4. Use the public HTTPS URL for your webhook integrations.

The Hooklistener CLI is a powerful terminal tool for webhook development. It lets you create secure tunnels to your localhost, browse and debug webhook requests in a rich TUI, and forward webhooks from your endpoints to your local server.

Whether you're integrating with Stripe, GitHub, Slack, or any other webhook provider, the CLI gives you everything you need to develop and test locally without deploying.

Installation

macOS (Homebrew)

The recommended way to install on macOS:

brew install hooklistener/tap/hooklistener

Linux / Windows / Manual

Download the latest binary for your platform from our GitHub releases page.

From Source (Cargo)

If you have Rust installed, you can build from source:

cargo install hooklistener

Verify the installation by checking the version:

hooklistener --version

Quick Start

1. Authenticate

First, log in to link the CLI to your Hooklistener account:

hooklistener login

This opens your browser where you'll approve the device. The CLI securely stores your token for future sessions.

2. Start a Tunnel

Create a public HTTPS URL that forwards to your local server:

hooklistener tunnel --port 3000

You'll get a URL like https://abc123.hook.events that you can use with any webhook provider.

3. Configure Your Webhook Provider

Copy the tunnel URL and paste it into your webhook provider's settings. For example:

  • Stripe: Dashboard → Developers → Webhooks → Add endpoint
  • GitHub: Repository → Settings → Webhooks → Add webhook
  • Slack: App Settings → Event Subscriptions → Request URL

Tip:Keep the tunnel running while developing. All requests to the public URL are forwarded to your local server in real-time.

Commands

The CLI provides six commands for different workflows. Click any command to see detailed documentation.

Global Options

These options are available for all commands:

OptionDescription
--log-level <LEVEL>Set logging level: trace, debug, info, warn, error (default: info)
--log-dir <PATH>Custom directory for log files
--log-stdoutOutput logs to stdout in addition to files
--helpShow help information
--versionShow version information

Example with debug logging:

hooklistener --log-level debug tunnel --port 3000

Configuration

The CLI stores configuration and logs in your home directory:

  • Config: ~/.config/hooklistener/config.json
  • Logs: ~/.config/hooklistener/logs/

Environment Variables

For advanced usage or self-hosting, you can override defaults:

VariableDescription
HOOKLISTENER_API_URLBase URL for API requests
HOOKLISTENER_WS_URLBase URL for WebSocket connections
HOOKLISTENER_DEVICE_PORTAL_URLURL for device code activation

Next Steps

Now that you've installed the CLI, explore these guides: