Hookdeck

Installation

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

NPM & Yarn

Install Hookdeck CLI on any platform using NPM

Or using Yarn

Terminal
$ npm install hookdeck-cli -g
Terminal
$ yarn global add hookdeck-cli

macOS

Install Hookdeck CLI on macOS using Homebrew:

Terminal
$ brew install hookdeck/hookdeck/hookdeck

Windows

Install Hookdeck CLI on Windows using the Scoop package manager:

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

Linux

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

Terminal
# Unzip the file:
$ tar -xvf hookdeck_X.X.X_linux_x86_64.tar.gz
# Run the executable:
$ ./hookdeck

Docker

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

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

Global Flags

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

Terminal
$ hookdeck {command} <arguments> [flags]

Color

Enable or disable color output.

SettingDescription
onEnable color output
offDisable color output
autoUse the default output color based on global settings
Flag
--color <setting>

Config

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

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

Flag
--config <config_filepath>

Device Name

Run the command on behalf of another device.

Flag
--device-name <name>

Help

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

Flag
-h
--help

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
Flag
--log-level <level>

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

Flag
-p <name>
--project-name <name>

Version

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

Flag
-v
--version

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.

Terminal
$ hookdeck login

Press Enter to open the browser (^C to quit)

Login Flags

-i, --interactive

Use interactive configuration mode if you cannot open a browser and would like to manually provide an API key.

Terminal
$ hookdeck login -i

Enter your CLI API key:

Logout

hookdeck logout [flags]

Clear your credentials.

Terminal
$ hookdeck logout

Logging out...
Credentials have been cleared for the default project.

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 the source to listen to. If left empty, the CLI will prompt you with a list of sources to choose from.
connection-querystringOptional. By default, all connections associated with the source will be listened on. Use this argument to filter the list of connections. Valid inputs are the name of the connection, or the path of the associated destination.

Only one of port or domain is required.

Terminal
$ hookdeck listen 3000 shopify

Dashboard
šŸ‘‰ Inspect and replay webhooks: https://dashboard.hookdeck.io/cli/events

Shopify Source
šŸ”Œ Webhook URL: https://events.hookdeck.com/e/src_xxx

Connections
Inventory forwarding to /webhooks/shopify/inventory
Orders forwarding to /webhooks/shopify/orders

⣾ Getting ready...

Terminal
$ hookdeck listen 3000 shopify orders

Dashboard
šŸ‘‰ Inspect and replay webhooks: https://dashboard.hookdeck.io/cli/events

Shopify Source
šŸ”Œ Webhook URL: https://events.hookdeck.com/e/src_xxx

Connections
Orders forwarding to /webhooks/shopify/orders

⣾ Getting ready...

Version

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

Terminal
$ hookdeck version

Whoami

Print your current username and workspace, if logged in.

Terminal
$ hookdeck whoami

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.

Terminal
$ hookdeck completion

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 Workspace 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.
Terminal
$ hookdeck ci --api-key $HOOKDECK_API_KEY
Done! The Hookdeck CLI is configured in workspace MyWorkspace

$ hookdeck listen 3000 shopify orders

šŸ‘‰  Inspect and replay webhooks: https://dashboard.hookdeck.com/cli/events

Shopify Source
šŸ”Œ Webhook URL: https://events.hookdeck.com/e/src_DAjaFWyyZXsFdZrTOKpuHnOH

Connections
Inventory Service forwarding to /webhooks/shopify/inventory


⣾ Getting ready...

Workspace

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

Terminal
$ hookdeck workspace list
My Workspace (current)
Another Workspace
Yet Another One

$ hookdeck workspace use
Use the arrow keys to navigate: ↓ ↑ → ←
? Select Workspace:
    My Workspace
    Another Workspace
  ā–ø Yet Another One

Selecting workspace Yet Another One

$ hookdeck whoami
Using profile default
Logged in as Me in workspace Yet Another One

List

hookdeck workspace list

Terminal
$ hookdeck workspace list
My Workspace (current)
Another Workspace
Yet Another One

Use

hookdeck workspace use [flags]

FlagsTypeDescription
localbooleanOptional. Pin active workspace to the current directory
Terminal
$ hookdeck workspace use
Use the arrow keys to navigate: ↓ ↑ → ←
? Select Workspace:
    My Workspace
    Another Workspace
  ā–ø Yet Another One

Selecting workspace Yet Another One

# Or use this command to pin the workspace to the current directory

$ hookdeck workspace use --local
Use the arrow keys to navigate: ↓ ↑ → ←
? Select Workspace:
    My Workspace
    Another Workspace
  ā–ø Yet Another One

Pinning workspace Yet Another One to current directory