Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

hookdeck-cli

> 开发工具
Open source

CLI for Hookdeck: forward webhooks to localhost (ngrok alternative), manage and query Event Gateway resources (sources, connections, destinations, events), run

358 stars0 likes1 views
WebsiteGitHub

About

CLI for Hookdeck: forward webhooks to localhost (ngrok alternative), manage and query Event Gateway resources (sources, connections, destinations, events), run

Hookdeck CLI

slack-badge

Using the Hookdeck CLI, you can forward your events (e.g. webhooks) to your local web server with unlimited free and permanent event URLs. Your event history is preserved between sessions and can be viewed, replayed, or used for testing by you and your teammates.

Hookdeck CLI is compatible with most of Hookdeck's features, such as filtering and fan-out delivery. You can use Hookdeck CLI to develop or test your event (e.g. webhook) integration code locally.

You can also manage Hookdeck Event Gateway resources—sources, destinations, connections, events, transformations—from the CLI. For AI and agent workflows, the Event Gateway MCP server (hookdeck gateway mcp) exposes these capabilities as tools in MCP-compatible clients (e.g. Cursor, Claude).

Although it uses a different approach and philosophy, it's a replacement for ngrok and alternative HTTP tunnel solutions.

Hookdeck for development is completely free, and we monetize the platform with our production offering.

For a complete reference of all commands and flags, see REFERENCE.md.

Table of contents

  • Installation
    • NPM
    • macOS
    • Windows
    • Linux Or without package managers
    • Docker
  • Usage
  • Commands
    • Login
    • Listen
    • Logout
    • Skip SSL validation
    • Disable health checks
    • Version
    • Completion
    • Running in CI
    • Event Gateway
    • Event Gateway MCP
    • Manage connections
    • Transformations
    • Requests, events, and attempts
    • Manage active project
    • Telemetry
  • Configuration files
  • Global Flags
  • Troubleshooting
  • Developing
  • Testing
  • Releasing
  • Repository Setup
  • CLI authentication keys
  • License

Quick links: Local development (Listen) · Resource management (CLI) / Manage connections · AI / agent integration (Event Gateway MCP)

https://github.com/user-attachments/assets/7a333c5b-e4cb-45bb-8570-29fafd137bd2

Installation

Hookdeck CLI is available for macOS, Windows, and Linux for distros like Ubuntu, Debian, RedHat, and CentOS.

NPM

Hookdeck CLI is distributed as an NPM package:

bash
npm install hookdeck-cli -g

To install a beta (pre-release) version:

bash
npm install hookdeck-cli@beta -g

macOS

Hookdeck CLI is available on macOS via Homebrew in homebrew-core:

bash
brew install hookdeck

New stable versions are picked up automatically by Homebrew's autobump after each release — brew upgrade will pull them in.

To install a beta (pre-release) version from our tap:

bash
brew install hookdeck/hookdeck/hookdeck-beta

[!NOTE] When HOMEBREW_REQUIRE_TAP_TRUST becomes the default in Homebrew 5.2.0 / 6.0.0, installing the beta formula from a third-party tap will require an explicit trust step:

bash
brew trust --formula hookdeck/hookdeck/hookdeck-beta

The stable hookdeck formula lives in homebrew-core and is not affected.

Windows

Hookdeck CLI is available on Windows via the Scoop package manager:

bash
scoop bucket add hookdeck https://github.com/hookdeck/scoop-hookdeck-cli.git
scoop install hookdeck

To install a beta (pre-release) version:

bash
scoop install hookdeck-beta

Linux Or without package managers

To install the Hookdeck CLI on Linux without a package manager:

  1. Download the latest linux tar.gz file from https://github.com/hookdeck/hookdeck-cli/releases/latest
  2. Unzip the file: tar -xvf hookdeck_X.X.X_linux_amd64.tar.gz
  3. Run the executable: ./hookdeck

For beta (pre-release) versions, download the .deb or .rpm packages from the GitHub releases page (look for releases marked as "Pre-release").

Docker

The CLI is also available as a Docker image: hookdeck/hookdeck-cli.

bash
docker run --rm -it hookdeck/hookdeck-cli version
hookdeck version x.y.z (beta)

To use a specific version (including beta releases), specify the version tag:

bash
docker run --rm -it hookdeck/hookdeck-cli:v1.2.3-beta.1 version

Note: Beta releases do not update the latest tag. Only stable releases update latest.

If you want to login to your Hookdeck account with the CLI and persist credentials, you can bind mount the ~/.config/hookdeck directory:

bash
docker run --rm -it -v $HOME/.config/hookdeck:/root/.config/hookdeck hookdeck/hookdeck-cli login

Then you can listen on any of your sources. Don't forget to use host.docker.internal to reach a port on your host machine, otherwise that port will not be accessible from localhost inside the container.

bash
docker run --rm -it -v $HOME/.config/hookdeck:/root/.config/hookdeck hookdeck/hookdeck-cli listen http://host.docker.internal:1234

Usage

Installing the CLI provides access to the hookdeck command.

bash
hookdeck [command]

# Run `--help` for detailed information about CLI commands
hookdeck [command] help

Commands

Login

Login with your Hookdeck account. This will typically open a browser window for authentication.

bash
hookdeck login

If you are in an environment without a browser (e.g., a TTY-only terminal), you can use the --interactive (or -i) flag to log in by pasting your API key:

bash
hookdeck login --interactive

To authenticate with a CLI client key from the Hookdeck product (no browser step when the key is already associated with your account and project):

bash
hookdeck login --cli-key 

The CLI validates the key via the API and writes your config, replacing a guest Console profile if one exists. For example, Hookdeck may show this command during Event Gateway onboarding or when authorizing the CLI as a Console destination.

Guest sandbox upgrade (keeping Console data) requires hookdeck login without --cli-key, not product copy-paste keys. If you do not log in, a temporary guest account is created when you run commands such as hookdeck listen.

Listen

Start a session to forward your events to an HTTP server.

…

By default listen uses the credentials saved by hookdeck login. To authenticate a single invocation without logging in first — for example in CI or when switching accounts — pass a key directly:

bash
# User-scoped CLI key (created by `hookdeck login`; can access all your projects)
$ hookdeck listen 3000 stripe --cli-key 

# Project-scoped key (e.g. a Project API key or a key from `hookdeck ci`)
$ hookdeck listen 3000 stripe --api-key 

Which key you hold decides what the CLI can do. The supported ways to supply one are hookdeck login for a CLI key, hookdeck login --cli-key to paste an existing one, and hookdeck ci --api-key for a project API key:

Key Where it comes from Reach project list / project use
CLI key hookdeck login, or hookdeck login --cli-key every project in every organization you belong to yes
Project API key dashboard, or hookdeck ci --api-key the one project it belongs to no
Organization API key dashboard its organization's projects, given the projects.read scope no

Only a CLI key can list or switch projects. The others are scoped below the level that question is asked at, so hookdeck project list answers this credential is scoped to a single project, and you need hookdeck login for account-wide access.

hookdeck ci --api-key takes a project API key specifically. It exchanges it for a project-scoped CLI key, which is why keys minted that way cannot list projects either. An organization API key is rejected by hookdeck ci and by every other CLI sign-in path, so it cannot be used to authenticate the CLI at all — use it against the REST API directly.

See also Credential Types for how each is stored.

The Event Gateway routes events received for a given source (e.g. Shopify, GitHub) to a destination via a connection. hookdeck listen is a standalone command that works with whichever product you're authenticated with — Hookdeck Console or the Event Gateway — receiving events for a given connection and forwarding them to your localhost at the specified port or any valid URL.

Each source is assigned an Event URL, which you can use to receive events. When starting with a fresh account, the CLI will prompt you to create your first source. Each CLI process can listen to one source at a time.

The port-or-URL param is mandatory, events will be forwarded to http://localhost:$PORT/$DESTINATION_PATH when inputing a valid port or your provided URL.

Interactive Mode

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

  • Connection Header: Shows your 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 information (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
    • Press C to copy the complete request, H for request headers, or B for the request body; off-screen content is included
  • q - Quit the application (terminal state is restored)
  • Ctrl+C - Also quits the application

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

Note: Copying to the clipboard works out of the box on macOS and Windows. On Linux and other BSD/Unix systems it requires either xclip or xsel to be installed; without one of them the copy shortcuts report an error.

Listen to all your connections for a given source

The second param, source-alias is used to select a specific source to listen on. By default, the CLI will start listening on all eligible connections for that source.

…

Listen to multiple sources

source-alias can be a comma-separated list of source names (for example, `str

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goclihookdecklocaltunnelmcp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具