Installation
Hookdeck CLI is available for macOS, Windows, Linux, and Docker.
NPM & Yarn
Install Hookdeck CLI on any platofmr using NPM
Or using Yarn
$ npm install hookdeck-cli -g
$ yarn install hookdeck-cli -g
macOS
Install Hookdeck CLI on macOS using Homebrew:
$ brew install hookdeck/hookdeck/hookdeck
Windows
Install Hookdeck CLI on Windows using the Scoop package manager:
$ 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:
# 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:
$ 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.
$ hookdeck {command} <arguments> [flags]
Color
Enable or disable color output.
Setting | Description |
---|---|
on | Enable color output |
off | Disable color output |
auto | Use the default output color based on global settings |
--color <setting>
Config
Set the file path for the CLI's configuration file.
Default path: $HOME/.config/hookdeck/config.toml
--config <config_filepath>
Device Name
Run the command on behalf of another device.
--device-name <name>
Help
Get documentation for a given command, including any supported flags and arguments.
-h
--help
Log Level
Set the level of detail for log messages.
Default level: info
Level | Description |
---|---|
debug | Useful for development purposes |
info | Shows standard logs |
warn | Shows any warnings detected |
error | Shows everything, including errors |
--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
-p <name>
--project-name <name>
Version
Print the version of Hookdeck CLI. This flag should be run without any other flags or arguments set.
-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.
$ 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.
$ hookdeck login -i
Enter your CLI API key:
Logout
hookdeck logout [flags]
Clear your credentials.
$ 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.
Argument | Type | Description |
---|---|---|
port | number | Port to forward the webhooks to on your local server. The forward URL will be http://localhost:$PORT/$DESTINATION_PATH |
domain | string | Domain to forward the webhooks to from your local server. The forward URL will be http://domain/$DESTINATION_PATH |
source | string | Optional. 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-query | string | Optional. 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
ordomain
is required.
$ 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...
$ 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.
$ hookdeck version
Whoami
Print your current username and workspace, if logged in.
$ 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.
$ hookdeck completion