The Hookdeck CLI

The Hookdeck CLI supports the following functionality:

  • Forward webhook events to a local web server
  • Quickly replay and inspect data of events forwarded to your local web server
  • Use in combination with the Hookdeck Console as a free alternative to ngrok
  • Use with the Hookdeck Event Gateway to support your local development workflows and to manage Hookdeck projects in CI/CD for testing
  • Manage connections (sources, destinations, and rules) directly from the CLI

Why use the CLI

With the CLI, you can develop, test, and troubleshoot your integration with Hookdeck – all without interfering with your production setup. It functions as a free replacement for ngrok and other tunnel solutions when working with event-driven application events such as webhooks.

Getting started with the CLI

  1. Install the CLI:

      npm install hookdeck-cli -g
      
      
      yarn global add hookdeck-cli
      
      
        brew install hookdeck/hookdeck/hookdeck
        
        
    1.     scoop bucket add hookdeck https://github.com/hookdeck/scoop-hookdeck-cli.git
          
          
    2.   scoop install hookdeck
        
        
    1. Download the latest release's tar.gz file.

    2.     tar -xvf hookdeck_X.X.X_linux_x86_64.tar.gz
          
          
    3.   ./hookdeck
        
        
  2. Run the hookdeck command in your shell to ensure the CLI is installed.

  3. Optionally, log in using hookdeck login. Otherwise, a temporary guest account is created for you when running commands.

  4. Start a session to forward your webhooks to a local HTTP server using: hookdeck listen <port> <source-name?> <connection-query?> [--path? /path] [--output? mode]

    Where:

    • <port> defines the localhost port to listen on. Webhooks will be forwarded to http://localhost:$PORT/$DESTINATION_PATH.
    • <source-name> defines a specific source to listen on, if any. By default, the CLI will start listening on all eligible connections for that source.
    • <connection-query> defines which connection to listen for on the specified source. Valid inputs are the name of the connection, or the path of the associated destination.
    • [--path] optionally specifies the path ($DESTINATION_PATH) events will be forwarded to.
    • [--output] optionally controls output verbosity: interactive (default with keyboard shortcuts), compact (simple logs), or quiet (fatal errors only).

Interactive mode (default) uses a full-screen TUI with an alternative screen buffer, preserving your terminal history when you exit. The interface includes a collapsible connection header, scrollable event list (up to 1000 events), status bar with shortcuts, and detailed event inspection. You can navigate events with arrow keys, retry requests, open events in the dashboard, and view full request/response data. Use --output compact for simple logging or --output quiet for minimal output.

Events sent to your CLI are available on your CLI Events page, where they can be viewed, filtered, or bookmarked for future use. You can also retry CLI events to replay them locally.

Installation

Hookdeck CLI is available for macOS, Windows, Linux, and Docker.

NPM & Yarn

Install Hookdeck CLI on any platform using NPM or Yarn

macOS

Install Hookdeck CLI on macOS using Homebrew

Windows

Install Hookdeck CLI on Windows using the Scoop package manager

Linux

Install Hookdeck CLI on Linux without a package manager by downloading the latest release's tar.gz file:

Docker

Install Hookdeck CLI on Docker by pulling the hookdeck/hookdeck-cli image:

Global Flags

Hookdeck CLI supports a number of global flags that can be appended to any command.

Color

Enable or disable color output.

SettingDescription
onEnable color output
offDisable color output
autoUse the default output color based on global settings

Config

Set the file path for the CLI's configuration file.

Default path: $HOME/.config/hookdeck/config.toml

Device Name

Run the command on behalf of another device.

Help

Get documentation for a given command, including any supported flags and arguments.

Log Level

Set the level of detail for log messages.

Default level: info

LevelDescription
debugUseful for development purposes
infoShows standard logs
warnShows any warnings detected
errorShows everything, including errors

Project Name

Define a project name for the CLI's current configuration. Enables multiple configurations across Hookdeck accounts, stored within one configuration file.

Any command can be run in the context of a project.

Default project: default

Version

Print the version of Hookdeck CLI. This flag should be run without any other flags or arguments set.

Login

hookdeck login [flags]

Connect the CLI to your Hookdeck account by logging in.

If you do not log in, a temporary guest account is created for you when running commands.

Logout

hookdeck logout [flags]

Clear your credentials.

Logout Flags

--all

Log out of all project-specific configurations.

Listen

hookdeck listen <port or domain> <source?> <connection-query?> [flags]

Start a session to forward your webhooks to a local HTTP server, or to an external domain.

ArgumentTypeDescription
portnumberPort to forward the webhooks to on your local server. The forward URL will be http://localhost:$PORT/$DESTINATION_PATH
domainstringDomain to forward the webhooks to from your local server. The forward URL will be http://domain/$DESTINATION_PATH
sourcestringOptional. The name of a source to listen to, a comma-separated list of source names to listen to, or '*' (with quotes) to listen to all sources. If left empty, the CLI will prompt you with a list of sources to choose from.
connection-querystringOptional. Used to filter the list of connections the CLI will listen to. The connection query can either be the connection name or the path.

Only one of port or domain is required.

Interactive Mode

The default interactive mode uses a full-screen TUI (Terminal User Interface) with an alternative screen buffer, preserving your terminal history when you exit. The interface includes:

  • Connection Header: Shows sources, webhook URLs, and connection routing
    • Auto-collapses when the first event arrives to save space
    • Toggle with i to expand/collapse connection details
  • Event List: Scrollable history of all received events (up to 1000 events)
    • Auto-scrolls to show latest events as they arrive
    • Manual navigation pauses auto-scrolling
  • Status Bar: Shows event details and available keyboard shortcuts
  • Event Details View: Full request/response inspection with headers and body

Interactive Keyboard Shortcuts

While in interactive mode, you can use the following keyboard shortcuts:

  • / or k / j - Navigate between events (select different events)
  • i - Toggle connection header (expand/collapse connection details)
  • r - Retry the selected event
  • o - Open the selected event in the Hookdeck dashboard
  • d - Show detailed request/response information for the selected event (press d or ESC to close)
    • When details view is open: / scroll through content, PgUp / PgDown for page navigation
  • q or Ctrl+C - Quit the application (terminal state is restored)

The selected event is indicated by a > character at the beginning of the line. All actions work on the currently selected event, not just the latest one. Shortcuts are displayed in the status bar at the bottom of the screen.

Listen Flags

--path

An optional flag that allows you to specify localhost path ($DESTINATION_PATH) events will be forwarded to.

--output

Controls how events are displayed. Useful for reducing resource usage in high-throughput scenarios or when running in the background.

  • interactive (default) - Full-screen TUI with alternative screen buffer, event history, navigation, and keyboard shortcuts. Terminal history is preserved and restored when you exit.
  • compact - Simple one-line logs for all events without interactive features. Events are appended to your terminal history.
  • quiet - Only displays fatal connection errors (network failures, timeouts), not HTTP errors

All modes display connection information at startup and a connection status message.

Filter Flags

Filter flags allow you to filter events by request body, headers, query parameters, and path. Only events matching the filter will be forwarded to your local server. Filter follow Hookdeck's filter syntax. Filters only apply to the events for that specific session and is not reflected on the connection.

--filter-body

Filter events by request body.

--filter-headers

Filter events by request headers.

--filter-query

Filter events by query parameters. Query parameters as parsed and JSON and the filter will be applied to the parsed query parameters.

--filter-path

Filter events by request path.

Version

Print your CLI version, and check whether a new version is available.

Whoami

Print your current username and project, if logged in.

Completion

Configure auto-completion for Hookdeck CLI. This command is run on install when using Homebrew or Scoop. You can optionally run this command when using the binaries directly, or without a package manager.

CI

If you want to use Hookdeck in CI for tests or any other purposes, you can use your HOOKDECK_API_KEY to authenticate and start forwarding events.

hookdeck ci [flags]

FlagsTypeDescription
api-keystringOptional. Your Hookdeck Project API key. The CLI will read automatically checks HOOKDECK_API_KEY in the environment variable.
namestringOptional. The name of the CI (ex: GITHUB_REF) if you want to identify them in the dashboard later.

Project

If you are a part of multiple projects, you can switch between them using our project management commands.

Projects were previously known as "Workspaces" in the Hookdeck dashboard. The CLI command has been updated to reflect the terminology change.

List

hookdeck project list

Use

hookdeck project use [flags]

FlagsTypeDescription
localbooleanOptional. Pin active project to the current directory

Connection

Manage connections between sources and destinations. A connection links a source to a destination and defines how webhooks are routed. You can create connections with inline source and destination creation, or reference existing resources.

[BETA] This feature is in beta. Please share bugs and feedback via the Hookdeck CLI GitHub issues.

Connection Create

hookdeck connection create [flags]

Create a connection between a source and destination. You can either reference existing resources by ID or create them inline.

Key Flags:

FlagDescription
--nameRequired. Connection name
--source-idUse existing source by ID
--source-nameSource name for inline creation
--source-typeSource type (WEBHOOK, STRIPE, etc.)
--destination-idUse existing destination by ID
--destination-nameDestination name for inline creation
--destination-typeDestination type (CLI, HTTP, MOCK)
--destination-urlURL for HTTP destinations
--destination-auth-methodAuth method (bearer, basic, api_key, etc.)
--destination-rate-limitRate limit (requests per period)
--destination-rate-limit-periodPeriod (second, minute, hour, concurrent)
--rulesJSON string representing rules array
--rules-filePath to JSON file containing rules
--outputOutput format (json)

For complete list including authentication, source configuration, and rule options, see hookdeck connection create --help.

Connection Upsert

hookdeck connection upsert <name> [flags]

Create or update a connection using name as the unique identifier. This command is idempotent and recommended for CI/CD workflows.

When the connection doesn't exist:

  • Creates a new connection with the provided properties
  • Requires source and destination to be specified

When the connection exists:

  • Updates only properties that are explicitly provided
  • Preserves existing properties that aren't specified

Use --dry-run to preview changes before applying them.

Key Flags:

FlagDescription
--source-id / --source-name / --source-typeSource configuration
--destination-id / --destination-name / --destination-type / --destination-urlDestination configuration
--destination-rate-limit / --destination-rate-limit-periodRate limiting
--rules / --rules-fileConnection rules
--dry-runPreview changes without applying
--outputOutput format (json)

See hookdeck connection upsert --help for the complete list of flags.

Connection List

hookdeck connection list [flags]

List all connections or filter by source, destination, or state.

FlagDescription
--nameFilter by connection name
--source-idFilter by source ID
--destination-idFilter by destination ID
--disabledInclude disabled connections
--limitLimit number of results (default 100)
--outputOutput format (json)

Connection Get

hookdeck connection get <connection-id> [flags]

Get detailed information about a specific connection.

FlagDescription
--outputOutput format (json)

Connection Delete

hookdeck connection delete <connection-id> [flags]

Delete a connection permanently. Note: The delete command help output was unavailable, but the command supports a --force flag based on similar CLI patterns.

Connection Disable

hookdeck connection disable <connection-id>

Disable a connection. Disabled connections stop processing events entirely until re-enabled. This replaces the previous archive functionality.

Connection Enable

hookdeck connection enable <connection-id>

Enable a disabled connection. The connection will resume processing events. This replaces the previous unarchive functionality.

Connection Pause

hookdeck connection pause <connection-id>

Pause a connection temporarily. The connection will queue incoming events until unpaused.

Important: Paused connections queue events for later delivery. When unpaused, queued events will be processed. This is useful during maintenance windows or deployments. To stop processing completely, use disable.

Connection Unpause

hookdeck connection unpause <connection-id>

Resume a paused connection. The connection will start processing queued events.