Skip to main content

Listen Mode

The listen command forwards webhooks from an existing Hooklistener endpoint to your local server in real time. It opens a WebSocket connection and displays incoming requests in an interactive terminal UI (TUI).

Basic usage

# Forward to localhost:3000 (default)
hooklistener listen my-endpoint

# Forward to a custom URL
hooklistener listen my-endpoint --target http://localhost:8080

Options

FlagShortDefaultDescription
--target-thttp://localhost:3000Local URL to forward requests to
--ws-urlProduction serverWebSocket server URL (for self-hosting)

Interactive TUI

The listen command opens an interactive terminal interface with three views.

Request list

The main view shows all incoming requests:

KeyAction
/ Navigate request list
EnterView request details
/Activate search mode
q / EscQuit

Search mode

Press / to search. Searches across method, URL, path, body preview, and remote address.

KeyAction
Type textEnter search query
EnterConfirm search
BackspaceDelete character
EscExit search

Request detail view

Press Enter on a request to see full details with three tabs:

TabContent
InfoMethod, URL, remote IP, timestamp, content length, request ID
HeadersScrollable list of all request headers
BodySyntax-highlighted body (JSON formatting when applicable)

Navigation:

KeyAction
Tab / Next tab
Shift+Tab / Previous tab
/ / j / kScroll content
PageUp / PageDownPage scroll
Home / EndJump to top/bottom
fEnter forward URL input
rReplay request with last forward URL
eOpen export menu
b / EscBack to list
qQuit

Export menu

Press e in the detail view to export:

KeyAction
1 / cCopy as cURL command
2 / jCopy as JSON
EscCancel

Connection behavior

  • Auto-reconnect — automatically reconnects on connection drops with exponential backoff (up to 10 retries)
  • Heartbeat — sends a ping every 30 seconds to keep the connection alive
  • Real-time — requests appear in the TUI within milliseconds of arrival

Example workflow

# 1. Start your local server
npm run dev # or whatever starts your app on port 3000

# 2. Forward webhooks to it
hooklistener listen stripe-webhooks --target http://localhost:3000/api/webhooks

# 3. Trigger a webhook from your provider (e.g., Stripe)
# 4. See it appear in the TUI and hit your local server