CLI for Hookdeck: forward webhooks to localhost (ngrok alternative), manage and query Event Gateway resources (sources, connections, destinations, events), run
CLI for Hookdeck: forward webhooks to localhost (ngrok alternative), manage and query Event Gateway resources (sources, connections, destinations, events), run
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.
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
Hookdeck CLI is available for macOS, Windows, and Linux for distros like Ubuntu, Debian, RedHat, and CentOS.
Hookdeck CLI is distributed as an NPM package:
npm install hookdeck-cli -gTo install a beta (pre-release) version:
npm install hookdeck-cli@beta -gHookdeck CLI is available on macOS via Homebrew in homebrew-core:
brew install hookdeckNew 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:
brew install hookdeck/hookdeck/hookdeck-beta[!NOTE] When
HOMEBREW_REQUIRE_TAP_TRUSTbecomes 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:brew trust --formula hookdeck/hookdeck/hookdeck-betaThe stable
hookdeckformula lives in homebrew-core and is not affected.
Hookdeck CLI is available on Windows via the Scoop package manager:
scoop bucket add hookdeck https://github.com/hookdeck/scoop-hookdeck-cli.git
scoop install hookdeckTo install a beta (pre-release) version:
scoop install hookdeck-betaTo install the Hookdeck CLI on Linux without a package manager:
For beta (pre-release) versions, download the .deb or .rpm packages from the GitHub releases page (look for releases marked as "Pre-release").
The CLI is also available as a Docker image: hookdeck/hookdeck-cli.
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:
docker run --rm -it hookdeck/hookdeck-cli:v1.2.3-beta.1 versionNote: 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:
docker run --rm -it -v $HOME/.config/hookdeck:/root/.config/hookdeck hookdeck/hookdeck-cli loginThen 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.
docker run --rm -it -v $HOME/.config/hookdeck:/root/.config/hookdeck hookdeck/hookdeck-cli listen http://host.docker.internal:1234Installing the CLI provides access to the hookdeck command.
hookdeck [command]
# Run `--help` for detailed information about CLI commands
hookdeck [command] helpLogin with your Hookdeck account. This will typically open a browser window for authentication.
hookdeck loginIf 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:
hookdeck login --interactiveTo authenticate with a CLI client key from the Hookdeck product (no browser step when the key is already associated with your account and project):
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 loginwithout--cli-key, not product copy-paste keys. If you do not log in, a temporary guest account is created when you run commands such ashookdeck 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:
# 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-URLparam is mandatory, events will be forwarded to http://localhost:$PORT/$DESTINATION_PATH when inputing a valid port or your provided URL.
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:
i to expand/collapse connection detailsWhile 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 evento - Open the selected event in the Hookdeck dashboardd - Show detailed request/response information for the selected event (press d or ESC to close)↑ / ↓ scroll through content, PgUp / PgDown for page navigationC to copy the complete request, H for request headers, or B for the request body; off-screen content is includedq - Quit the application (terminal state is restored)Ctrl+C - Also quits the applicationThe 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
xcliporxselto be installed; without one of them the copy shortcuts report an error.
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.
…source-alias can be a comma-separated list of source names (for example, `str
No open issues yet, or sync has not completed.