Installation

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

macOS

Hookdeck CLI is available on macOS via Homebrew:

$ brew install hookdeck/hookdeck/hookdeck

Windows

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 hookdeck

Linux

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_x86_64.tar.gz
  3. Run the executable: ./hookdeck

Docker

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)

Global Flags

hookdeck {command} <arguments> [flags]

The Hookdeck CLI supports a number of flags for every command.

Flags

--color <setting> Enable or disable color output.

Value Type Description
on string Enable color output
off string Disable color output
auto string Use the default output color based on global settings

--config <config_filepath>

Use this file path for the CLI's configuration file (default: $HOME/.config/hookdeck/config.toml).

--device-name <name>

Run this command on behalf of another device.

-h, --help

Provides the help documentation for a given command, including the supported flags and arguments.

--log-level <level>

Set the level of detail for log messages (default: info)

Value Type Description
debug string Useful for development purposes
info string Shows standard logs that come up
warn string Shows warnings that are detected
error string Shows every log including errors that arise

-p, --project-name <name>

Define a project name for the CLI's current configuration. Using the --project-name flag enables multiple configurations across Hookdeck accounts (stored within one configuration file), and any command can run in the context of a project (default: "default").

-v, --version

Prints the version of the Hookdeck CLI. This flag is meant to run without any other flags or arguments set.

Login

hookdeck login [flags]

Connect the CLI to your Hookdeck account by logging in to persist your secret key locally.

The Hookdeck CLI runs commands using a global configuration or project-specific configurations. To configure the CLI globally, run:

hookdeck login You'll be redirected to the Dashboard to confirm that you want to give the CLI access to your account. After confirming, a new API key will be created for the CLI.

All configurations are stored in ~/.config/hookdeck/config.toml but you can use the XDG_CONFIG_HOME environment variable to override this location.

$ hookdeck login

Press Enter to open the browser (^C to quit)
$ hookdeck login -i

Enter your CLI API key:

Login Flags

-i, --interactive

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

--project-name=<project>

You can create project-specific configurations with the --project-name flag, which can be used in any context. If you do not provide the --project-name flag for a command, it will default to the global configuration.

Logout

hookdeck logout [flags]

Clear your credentials.

$ hookdeck logout

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

Logout Flags

--project-name=<project>

You can create project-specific configurations with the --project-name flag, which can be used in any context. If you do not provide the --project-name flag for a command, it will default to the global configuration.

--all

You can logout of all project-specific configurations with the --all flag.

Listen

Start a session to forward your webhooks to a local HTTP server.

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

$ hookdeck listen 3000 shopify

╭ Shopify ───────────────────────────────────────────────╮
│                                                        │
│  🔌 Webhook URL: https://events.hookdeck.io/e/src_xxx   │
│                                                        │
╰────────────────────────────────────────────────────────╯
Inventory forwarding to /webhooks/shopify/inventory
Orders forwarding to /webhooks/shopify/orders

👉  Inspect and replay webhooks: https://dashboard.hookdeck.io/events/cli

⣾ Getting ready...
$ hookdeck listen 3000 shopify orders

╭ Shopify ───────────────────────────────────────────────╮
│                                                        │
│  🔌 Webhook URL: https://events.hookdeck.io/e/src_xxx   │
│                                                        │
╰────────────────────────────────────────────────────────╯
Orders forwarding to /webhooks/shopify/orders

👉  Inspect and replay webhooks: https://dashboard.hookdeck.io/events/cli

⣾ Getting ready...

Listen Arguments

Port number

Port to forward the webhooks too on your local server. The forward URL will be http://localhost:$PORT/$DESTINATION_PATH

Source string optional

The alias of the source to listen to. If left empty, the CLI will prompt you with a list of your sources to choose from.

Connection Query string optional

By default, all connections associated with the source will be listened on. You can use the connection query to filter the list of connection. Valid inputs ate alias of the connection or path of the associated destination.

Version

Print your CLI version and whether or not a new version is available.

hookdeck version

Completion

Configure auto-completion for Hookdeck CLI. It 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.

hookdeck completion