Skip to content

Latest commit

 

History

History
1938 lines (1464 loc) · 68.1 KB

File metadata and controls

1938 lines (1464 loc) · 68.1 KB

Hookdeck CLI Reference

The Hookdeck CLI provides comprehensive webhook infrastructure management including authentication, project management, resource management, event and attempt querying, and local development tools. This reference covers all available commands and their usage.

Table of Contents

Global Options

All commands support these global options:

Flag Type Description
--color string turn on/off color output (on, off, auto)
--device-name string device name
--hookdeck-config string path to CLI config file (default is $HOME/.config/hookdeck/config.toml)
--insecure bool Allow invalid TLS certificates
--log-level string log level (debug, info, warn, error) (default "info")
-p, --profile string profile name (default "default")
-v, --version bool Get the version of the Hookdeck CLI

Authentication

Login

Login to your Hookdeck account to setup the CLI

Usage:

hookdeck login [flags]

Flags:

Flag Type Description
-i, --interactive bool Run interactive configuration mode if you cannot open a browser
--local bool Save credentials to current directory (.hookdeck/config.toml)

Examples:

$ hookdeck login
$ hookdeck login -i  # interactive mode (no browser)
$ hookdeck login --local  # save credentials to .hookdeck/config.toml

Logout

Logout of your Hookdeck account to setup the CLI

Usage:

hookdeck logout [flags]

Flags:

Flag Type Description
-a, --all bool Clear credentials for all projects you are currently logged into.

Examples:

$ hookdeck logout
$ hookdeck logout -a  # clear all projects

Whoami

Show the logged-in user

Usage:

hookdeck whoami

Examples:

$ hookdeck whoami

Projects

hookdeck project list

List and filter projects by organization and project name substrings

Usage:

hookdeck project list [<organization_substring>] [<project_substring>] [flags]

Flags:

Flag Type Description
--output string Output format: json
--type string Filter by project type: gateway, outpost, console

Examples:

$ hookdeck project list
Acme / Ecommerce Production (current) | Gateway
Acme / Ecommerce Staging | Gateway
$ hookdeck project list --output json
$ hookdeck project list --type gateway

hookdeck project use

Set the active project for future commands

Usage:

hookdeck project use [<organization_name> [<project_name>]] [flags]

Flags:

Flag Type Description
--local bool Save project to current directory (.hookdeck/config.toml)

Examples:

$ hookdeck project use
Use the arrow keys to navigate: ↓ ↑ → ←
? Select Project:
▸ Acme / Ecommerce Production (current) | Gateway
Acme / Ecommerce Staging | Gateway

$ hookdeck project use --local
Pinning project to current directory

Local Development

Listen

Forward events for a source to your local server.

This command will create a new Hookdeck Source if it doesn't exist.

By default the Hookdeck Destination will be named "{source}-cli", and the Destination CLI path will be "/". To set the CLI path, use the "--path" flag.

Usage:

hookdeck listen [port or forwarding URL] [source] [connection] [flags]

Arguments:

Argument Type Description
port or forwarding URL string Required. Port (e.g. 3000) or full URL (e.g. http://localhost:3000) to forward events to. The forward URL will be http://localhost:$PORT/$DESTINATION_PATH or http://domain/$DESTINATION_PATH. Only one of port or domain is required.
source string Optional. The name of a source to listen to, a comma-separated list of source names, or '*' (with quotes) to listen to all. If empty, the CLI prompts you to choose.
connection string Optional. Filter connections by connection name or path.

Flags:

Flag Type Description
--filter-body string Filter events by request body using Hookdeck filter syntax (JSON)
--filter-headers string Filter events by request headers using Hookdeck filter syntax (JSON)
--filter-path string Filter events by request path using Hookdeck filter syntax (JSON)
--filter-query string Filter events by query parameters using Hookdeck filter syntax (JSON)
--max-connections int Maximum concurrent connections to local endpoint (default: 50, increase for high-volume testing) (default "50")
--no-healthcheck bool Disable periodic health checks of the local server
--output string Output mode: interactive (full UI), compact (simple logs), quiet (errors and warnings only) (default "interactive")
--path string Sets the path to which events are forwarded e.g., /webhooks or /api/stripe

Gateway

Gateway

Commands for managing Event Gateway sources, destinations, connections, transformations, events, requests, metrics, and MCP server.

The gateway command group provides full access to all Event Gateway resources.

Usage:

hookdeck gateway

Examples:

# List connections
hookdeck gateway connection list

# Create a source
hookdeck gateway source create --name my-source --type WEBHOOK

# Query event metrics
hookdeck gateway metrics events --start 2026-01-01T00:00:00Z --end 2026-02-01T00:00:00Z

# Start the MCP server for AI agent access
hookdeck gateway mcp

Connections

hookdeck gateway connection list

List all connections or filter by source/destination.

Usage:

hookdeck gateway connection list [flags]

Flags:

Flag Type Description
--destination-id string Filter by destination ID
--disabled bool Include disabled connections
--limit int Limit number of results (default "100")
--name string Filter by connection name
--output string Output format (json)
--source-id string Filter by source ID

Examples:

# List all connections
hookdeck gateway connection list

# Filter by connection name
hookdeck gateway connection list --name my-connection

# Filter by source ID
hookdeck gateway connection list --source-id src_abc123

# Filter by destination ID
hookdeck gateway connection list --destination-id dst_def456

# Include disabled connections
hookdeck gateway connection list --disabled

# Limit results
hookdeck gateway connection list --limit 10

hookdeck gateway connection create

Create a connection between a source and destination.

You can either reference existing resources by ID or create them inline.

Usage:

hookdeck gateway connection create [flags]

Flags:

Flag Type Description
--description string Connection description
--destination-api-key string API key for destination authentication
--destination-api-key-header string Key/header name for API key authentication
--destination-api-key-to string Where to send API key: 'header' or 'query' (default "header")
--destination-auth-method string Authentication method for HTTP destinations (hookdeck, bearer, basic, api_key, custom_signature, oauth2_client_credentials, oauth2_authorization_code, aws, gcp)
--destination-aws-access-key-id string AWS access key ID
--destination-aws-region string AWS region
--destination-aws-secret-access-key string AWS secret access key
--destination-aws-service string AWS service name
--destination-basic-auth-pass string Password for destination Basic authentication
--destination-basic-auth-user string Username for destination Basic authentication
--destination-bearer-token string Bearer token for destination authentication
--destination-cli-path string CLI path for CLI destinations (default: /) (default "/")
--destination-custom-signature-key string Key/header name for custom signature
--destination-custom-signature-secret string Signing secret for custom signature
--destination-description string Destination description
--destination-gcp-scope string GCP scope for service account authentication
--destination-gcp-service-account-key string GCP service account key JSON for destination authentication
--destination-http-method string HTTP method for HTTP destinations (GET, POST, PUT, PATCH, DELETE)
--destination-id string Use existing destination by ID
--destination-name string Destination name for inline creation
--destination-oauth2-auth-server string OAuth2 authorization server URL
--destination-oauth2-auth-type string OAuth2 Client Credentials authentication type: 'basic', 'bearer', or 'x-www-form-urlencoded' (default "basic")
--destination-oauth2-client-id string OAuth2 client ID
--destination-oauth2-client-secret string OAuth2 client secret
--destination-oauth2-refresh-token string OAuth2 refresh token (required for Authorization Code flow)
--destination-oauth2-scopes string OAuth2 scopes (comma-separated)
--destination-path-forwarding-disabled string Disable path forwarding for HTTP destinations (true/false)
--destination-rate-limit int Rate limit for destination (requests per period) (default "0")
--destination-rate-limit-period string Rate limit period (second, minute, hour, concurrent)
--destination-type string Destination type (CLI, HTTP, MOCK)
--destination-url string URL for HTTP destinations
--name string Connection name (required)
--output string Output format (json)
--rule-deduplicate-exclude-fields string Comma-separated list of fields to exclude for deduplication
--rule-deduplicate-include-fields string Comma-separated list of fields to include for deduplication
--rule-deduplicate-window int Time window in seconds for deduplication (default "0")
--rule-delay int Delay in milliseconds (default "0")
--rule-filter-body string Filter on request body using Hookdeck filter syntax (JSON)
--rule-filter-headers string Filter on request headers using Hookdeck filter syntax (JSON)
--rule-filter-path string Filter on request path using Hookdeck filter syntax (JSON)
--rule-filter-query string Filter on request query parameters using Hookdeck filter syntax (JSON)
--rule-retry-count int Number of retry attempts (default "0")
--rule-retry-interval int Interval between retries in milliseconds (default "0")
--rule-retry-response-status-codes string Comma-separated HTTP status codes to retry on
--rule-retry-strategy string Retry strategy (linear, exponential)
--rule-transform-code string Transformation code (if creating inline)
--rule-transform-env string JSON string representing environment variables for transformation
--rule-transform-name string Name or ID of the transformation to apply
--rules string JSON string representing the entire rules array
--rules-file string Path to a JSON file containing the rules array
--source-allowed-http-methods string Comma-separated list of allowed HTTP methods (GET, POST, PUT, PATCH, DELETE)
--source-api-key string API key for source authentication
--source-basic-auth-pass string Password for Basic authentication
--source-basic-auth-user string Username for Basic authentication
--source-config string JSON string for source authentication config
--source-config-file string Path to a JSON file for source authentication config
--source-custom-response-body string Custom response body (max 1000 chars)
--source-custom-response-content-type string Custom response content type (json, text, xml)
--source-description string Source description
--source-hmac-algo string HMAC algorithm (SHA256, etc.)
--source-hmac-secret string HMAC secret for signature verification
--source-id string Use existing source by ID
--source-name string Source name for inline creation
--source-type string Source type (WEBHOOK, STRIPE, etc.)
--source-webhook-secret string Webhook secret for source verification (e.g., Stripe)

Examples:

# Create with inline source and destination
hookdeck gateway connection create \
--name "test-webhooks-to-local" \
--source-type WEBHOOK --source-name "test-webhooks" \
--destination-type CLI --destination-name "local-dev"

# Create with existing resources
hookdeck gateway connection create \
--name "github-to-api" \
--source-id src_abc123 \
--destination-id dst_def456

# Create with source configuration options
hookdeck gateway connection create \
--name "api-webhooks" \
--source-type WEBHOOK --source-name "api-source" \
--source-allowed-http-methods "POST,PUT,PATCH" \
--source-custom-response-content-type "json" \
--source-custom-response-body '{"status":"received"}' \
--destination-type CLI --destination-name "local-dev"

hookdeck gateway connection get

Get detailed information about a specific connection.

You can specify either a connection ID or name.

Usage:

hookdeck gateway connection get <connection-id-or-name> [flags]

Arguments:

Argument Type Description
connection-id-or-name string Required. Connection ID or name

Flags:

Flag Type Description
--include-destination-auth bool Include destination authentication credentials in the response
--include-source-auth bool Include source authentication credentials in the response
--output string Output format (json)

Examples:

# Get connection by ID
hookdeck gateway connection get conn_abc123

# Get connection by name
hookdeck gateway connection get my-connection

hookdeck gateway connection update

Update an existing connection by its ID.

Unlike upsert (which uses name as identifier), update takes a connection ID and allows changing any field including the connection name.

Usage:

hookdeck gateway connection update <connection-id> [flags]

Arguments:

Argument Type Description
connection-id string Required. Connection ID

Flags:

Flag Type Description
--description string Connection description
--destination-id string Update destination by ID
--name string New connection name
--output string Output format (json)
--rule-deduplicate-exclude-fields string Comma-separated list of fields to exclude for deduplication
--rule-deduplicate-include-fields string Comma-separated list of fields to include for deduplication
--rule-deduplicate-window int Time window in seconds for deduplication (default "0")
--rule-delay int Delay in milliseconds (default "0")
--rule-filter-body string Filter on request body using Hookdeck filter syntax (JSON)
--rule-filter-headers string Filter on request headers using Hookdeck filter syntax (JSON)
--rule-filter-path string Filter on request path using Hookdeck filter syntax (JSON)
--rule-filter-query string Filter on request query parameters using Hookdeck filter syntax (JSON)
--rule-retry-count int Number of retry attempts (default "0")
--rule-retry-interval int Interval between retries in milliseconds (default "0")
--rule-retry-response-status-codes string Comma-separated HTTP status codes to retry on
--rule-retry-strategy string Retry strategy (linear, exponential)
--rule-transform-code string Transformation code (if creating inline)
--rule-transform-env string JSON string representing environment variables for transformation
--rule-transform-name string Name or ID of the transformation to apply
--rules string JSON string representing the entire rules array
--rules-file string Path to a JSON file containing the rules array
--source-id string Update source by ID

Examples:

# Rename a connection
hookdeck gateway connection update web_abc123 --name "new-name"

# Update description
hookdeck gateway connection update web_abc123 --description "Updated description"

# Change the source on a connection
hookdeck gateway connection update web_abc123 --source-id src_def456

# Update rules
hookdeck gateway connection update web_abc123 \
--rule-retry-strategy linear --rule-retry-count 5

# Update with JSON output
hookdeck gateway connection update web_abc123 --name "new-name" --output json

hookdeck gateway connection delete

Delete a connection.

Usage:

hookdeck gateway connection delete <connection-id> [flags]

Arguments:

Argument Type Description
connection-id string Required. Connection ID

Flags:

Flag Type Description
--force bool Force delete without confirmation

Examples:

# Delete a connection (with confirmation)
hookdeck gateway connection delete conn_abc123

# Force delete without confirmation
hookdeck gateway connection delete conn_abc123 --force

hookdeck gateway connection upsert

Create a new connection or update an existing one by name (idempotent).

This command is idempotent - it can be safely run multiple times with the same arguments.

When the connection doesn't exist:
	 - Creates a new connection with the provided properties
	 - Requires source and destination to be specified

When the connection exists:
	 - Updates the connection with the provided properties
	 - Only updates properties that are explicitly provided
	 - Preserves existing properties that aren't specified

Use `--dry-run` to preview changes without applying them.

Usage:

hookdeck gateway connection upsert <name> [flags]

Arguments:

Argument Type Description
name string Required. Connection name (create or update by name)

Flags:

Flag Type Description
--description string Connection description
--destination-api-key string API key for destination authentication
--destination-api-key-header string Key/header name for API key authentication
--destination-api-key-to string Where to send API key: 'header' or 'query' (default "header")
--destination-auth-method string Authentication method for HTTP destinations (hookdeck, bearer, basic, api_key, custom_signature, oauth2_client_credentials, oauth2_authorization_code, aws, gcp)
--destination-aws-access-key-id string AWS access key ID
--destination-aws-region string AWS region
--destination-aws-secret-access-key string AWS secret access key
--destination-aws-service string AWS service name
--destination-basic-auth-pass string Password for destination Basic authentication
--destination-basic-auth-user string Username for destination Basic authentication
--destination-bearer-token string Bearer token for destination authentication
--destination-cli-path string CLI path for CLI destinations (default: / for new connections)
--destination-custom-signature-key string Key/header name for custom signature
--destination-custom-signature-secret string Signing secret for custom signature
--destination-description string Destination description
--destination-gcp-scope string GCP scope for service account authentication
--destination-gcp-service-account-key string GCP service account key JSON for destination authentication
--destination-http-method string HTTP method for HTTP destinations (GET, POST, PUT, PATCH, DELETE)
--destination-id string Use existing destination by ID
--destination-name string Destination name for inline creation
--destination-oauth2-auth-server string OAuth2 authorization server URL
--destination-oauth2-auth-type string OAuth2 Client Credentials authentication type: 'basic', 'bearer', or 'x-www-form-urlencoded' (default "basic")
--destination-oauth2-client-id string OAuth2 client ID
--destination-oauth2-client-secret string OAuth2 client secret
--destination-oauth2-refresh-token string OAuth2 refresh token (required for Authorization Code flow)
--destination-oauth2-scopes string OAuth2 scopes (comma-separated)
--destination-path-forwarding-disabled string Disable path forwarding for HTTP destinations (true/false)
--destination-rate-limit int Rate limit for destination (requests per period) (default "0")
--destination-rate-limit-period string Rate limit period (second, minute, hour, concurrent)
--destination-type string Destination type (CLI, HTTP, MOCK)
--destination-url string URL for HTTP destinations
--dry-run bool Preview changes without applying them
--output string Output format (json)
--rule-deduplicate-exclude-fields string Comma-separated list of fields to exclude for deduplication
--rule-deduplicate-include-fields string Comma-separated list of fields to include for deduplication
--rule-deduplicate-window int Time window in seconds for deduplication (default "0")
--rule-delay int Delay in milliseconds (default "0")
--rule-filter-body string Filter on request body using Hookdeck filter syntax (JSON)
--rule-filter-headers string Filter on request headers using Hookdeck filter syntax (JSON)
--rule-filter-path string Filter on request path using Hookdeck filter syntax (JSON)
--rule-filter-query string Filter on request query parameters using Hookdeck filter syntax (JSON)
--rule-retry-count int Number of retry attempts (default "0")
--rule-retry-interval int Interval between retries in milliseconds (default "0")
--rule-retry-response-status-codes string Comma-separated HTTP status codes to retry on
--rule-retry-strategy string Retry strategy (linear, exponential)
--rule-transform-code string Transformation code (if creating inline)
--rule-transform-env string JSON string representing environment variables for transformation
--rule-transform-name string Name or ID of the transformation to apply
--rules string JSON string representing the entire rules array
--rules-file string Path to a JSON file containing the rules array
--source-allowed-http-methods string Comma-separated list of allowed HTTP methods (GET, POST, PUT, PATCH, DELETE)
--source-api-key string API key for source authentication
--source-basic-auth-pass string Password for Basic authentication
--source-basic-auth-user string Username for Basic authentication
--source-config string JSON string for source authentication config
--source-config-file string Path to a JSON file for source authentication config
--source-custom-response-body string Custom response body (max 1000 chars)
--source-custom-response-content-type string Custom response content type (json, text, xml)
--source-description string Source description
--source-hmac-algo string HMAC algorithm (SHA256, etc.)
--source-hmac-secret string HMAC secret for signature verification
--source-id string Use existing source by ID
--source-name string Source name for inline creation
--source-type string Source type (WEBHOOK, STRIPE, etc.)
--source-webhook-secret string Webhook secret for source verification (e.g., Stripe)

Examples:

# Create or update a connection with inline source and destination
hookdeck gateway connection upsert "my-connection" \
--source-name "stripe-prod" --source-type STRIPE \
--destination-name "my-api" --destination-type HTTP --destination-url https://api.example.com

# Update just the rate limit on an existing connection
hookdeck gateway connection upsert my-connection \
--destination-rate-limit 100 --destination-rate-limit-period minute

# Update source configuration options
hookdeck gateway connection upsert my-connection \
--source-allowed-http-methods "POST,PUT,DELETE" \
--source-custom-response-content-type "json" \
--source-custom-response-body '{"status":"received"}'

# Preview changes without applying them
hookdeck gateway connection upsert my-connection \
--destination-rate-limit 200 --destination-rate-limit-period hour \
--dry-run

hookdeck gateway connection enable

Enable a disabled connection.

Usage:

hookdeck gateway connection enable <connection-id>

Arguments:

Argument Type Description
connection-id string Required. Connection ID

hookdeck gateway connection disable

Disable an active connection. It will stop receiving new events until re-enabled.

Usage:

hookdeck gateway connection disable <connection-id>

Arguments:

Argument Type Description
connection-id string Required. Connection ID

hookdeck gateway connection pause

Pause a connection temporarily.

The connection will queue incoming events until unpaused.

Usage:

hookdeck gateway connection pause <connection-id>

Arguments:

Argument Type Description
connection-id string Required. Connection ID

hookdeck gateway connection unpause

Resume a paused connection.

The connection will start processing queued events.

Usage:

hookdeck gateway connection unpause <connection-id>

Arguments:

Argument Type Description
connection-id string Required. Connection ID

Sources

hookdeck gateway source list

List all sources or filter by name or type.

Usage:

hookdeck gateway source list [flags]

Flags:

Flag Type Description
--disabled bool Include disabled sources
--limit int Limit number of results (default "100")
--name string Filter by source name
--output string Output format (json)
--type string Filter by source type (e.g. WEBHOOK, STRIPE)

Examples:

hookdeck gateway source list
hookdeck gateway source list --name my-source
hookdeck gateway source list --type WEBHOOK
hookdeck gateway source list --disabled
hookdeck gateway source list --limit 10

hookdeck gateway source create

Create a new source.

Requires --name and --type. Use --config or --config-file for authentication (e.g. webhook_secret, api_key).

Usage:

hookdeck gateway source create [flags]

Flags:

Flag Type Description
--allowed-http-methods string Comma-separated allowed HTTP methods (GET, POST, PUT, PATCH, DELETE)
--api-key string API key for source authentication
--basic-auth-pass string Password for Basic authentication
--basic-auth-user string Username for Basic authentication
--config string JSON object for source config (overrides individual flags if set)
--config-file string Path to JSON file for source config (overrides individual flags if set)
--custom-response-body string Custom response body (max 1000 chars)
--custom-response-content-type string Custom response content type (json, text, xml)
--description string Source description
--hmac-algo string HMAC algorithm (SHA256, etc.)
--hmac-secret string HMAC secret for signature verification
--name string Source name (required)
--output string Output format (json)
--type string Source type (e.g. WEBHOOK, STRIPE) (required)
--webhook-secret string Webhook secret for source verification (e.g., Stripe)

Examples:

hookdeck gateway source create --name my-webhook --type WEBHOOK
hookdeck gateway source create --name stripe-prod --type STRIPE --config '{"webhook_secret":"whsec_xxx"}'

hookdeck gateway source get

Get detailed information about a specific source.

You can specify either a source ID or name.

Usage:

hookdeck gateway source get <source-id-or-name> [flags]

Flags:

Flag Type Description
--include-auth bool Include source authentication credentials in the response
--output string Output format (json)

Examples:

hookdeck gateway source get src_abc123
hookdeck gateway source get my-source --include-auth

hookdeck gateway source update

Update an existing source by its ID.

Usage:

hookdeck gateway source update <source-id> [flags]

Flags:

Flag Type Description
--allowed-http-methods string Comma-separated allowed HTTP methods (GET, POST, PUT, PATCH, DELETE)
--api-key string API key for source authentication
--basic-auth-pass string Password for Basic authentication
--basic-auth-user string Username for Basic authentication
--config string JSON object for source config (overrides individual flags if set)
--config-file string Path to JSON file for source config (overrides individual flags if set)
--custom-response-body string Custom response body (max 1000 chars)
--custom-response-content-type string Custom response content type (json, text, xml)
--description string New source description
--hmac-algo string HMAC algorithm (SHA256, etc.)
--hmac-secret string HMAC secret for signature verification
--name string New source name
--output string Output format (json)
--type string Source type (e.g. WEBHOOK, STRIPE)
--webhook-secret string Webhook secret for source verification (e.g., Stripe)

Examples:

hookdeck gateway source update src_abc123 --name new-name
hookdeck gateway source update src_abc123 --description "Updated"
hookdeck gateway source update src_abc123 --config '{"webhook_secret":"whsec_new"}'

hookdeck gateway source delete

Delete a source.

Usage:

hookdeck gateway source delete <source-id> [flags]

Flags:

Flag Type Description
--force bool Force delete without confirmation

Examples:

hookdeck gateway source delete src_abc123
hookdeck gateway source delete src_abc123 --force

hookdeck gateway source upsert

Create a new source or update an existing one by name (idempotent).

Usage:

hookdeck gateway source upsert <name> [flags]

Flags:

Flag Type Description
--allowed-http-methods string Comma-separated allowed HTTP methods (GET, POST, PUT, PATCH, DELETE)
--api-key string API key for source authentication
--basic-auth-pass string Password for Basic authentication
--basic-auth-user string Username for Basic authentication
--config string JSON object for source config (overrides individual flags if set)
--config-file string Path to JSON file for source config (overrides individual flags if set)
--custom-response-body string Custom response body (max 1000 chars)
--custom-response-content-type string Custom response content type (json, text, xml)
--description string Source description
--dry-run bool Preview changes without applying
--hmac-algo string HMAC algorithm (SHA256, etc.)
--hmac-secret string HMAC secret for signature verification
--output string Output format (json)
--type string Source type (e.g. WEBHOOK, STRIPE)
--webhook-secret string Webhook secret for source verification (e.g., Stripe)

Examples:

hookdeck gateway source upsert my-webhook --type WEBHOOK
hookdeck gateway source upsert stripe-prod --type STRIPE --config '{"webhook_secret":"whsec_xxx"}'
hookdeck gateway source upsert my-webhook --description "Updated" --dry-run

hookdeck gateway source enable

Enable a disabled source.

Usage:

hookdeck gateway source enable <source-id>

hookdeck gateway source disable

Disable an active source. It will stop receiving new events until re-enabled.

Usage:

hookdeck gateway source disable <source-id>

hookdeck gateway source count

Count sources matching optional filters.

Usage:

hookdeck gateway source count [flags]

Flags:

Flag Type Description
--disabled bool Count disabled sources only (when set with other filters)
--name string Filter by source name
--type string Filter by source type

Examples:

hookdeck gateway source count
hookdeck gateway source count --type WEBHOOK
hookdeck gateway source count --disabled

Destinations

hookdeck gateway destination list

List all destinations or filter by name or type.

Usage:

hookdeck gateway destination list [flags]

Flags:

Flag Type Description
--disabled bool Include disabled destinations
--limit int Limit number of results (default "100")
--name string Filter by destination name
--output string Output format (json)
--type string Filter by destination type (HTTP, CLI, MOCK_API)

Examples:

hookdeck gateway destination list
hookdeck gateway destination list --name my-destination
hookdeck gateway destination list --type HTTP
hookdeck gateway destination list --disabled
hookdeck gateway destination list --limit 10

hookdeck gateway destination create

Create a new destination.

Requires --name and --type. For HTTP destinations, --url is required. Use --config or --config-file for auth and rate limiting.

Usage:

hookdeck gateway destination create [flags]

Flags:

Flag Type Description
--api-key string API key for destination auth
--api-key-header string Header/key name for API key
--api-key-to string Where to send API key (header or query) (default "header")
--auth-method string Auth method (hookdeck, bearer, basic, api_key, custom_signature)
--basic-auth-pass string Password for Basic auth
--basic-auth-user string Username for Basic auth
--bearer-token string Bearer token for destination auth
--cli-path string Path for CLI destinations (default "/")
--config string JSON object for destination config (overrides individual flags if set)
--config-file string Path to JSON file for destination config (overrides individual flags if set)
--custom-signature-key string Key/header name for custom signature
--custom-signature-secret string Signing secret for custom signature
--description string Destination description
--http-method string HTTP method for HTTP destinations (GET, POST, PUT, PATCH, DELETE)
--name string Destination name (required)
--output string Output format (json)
--rate-limit int Rate limit (requests per period) (default "0")
--rate-limit-period string Rate limit period (second, minute, hour, concurrent)
--type string Destination type (HTTP, CLI, MOCK_API) (required)
--url string URL for HTTP destinations (required for type HTTP)

Examples:

hookdeck gateway destination create --name my-api --type HTTP --url https://api.example.com/webhooks
hookdeck gateway destination create --name local-cli --type CLI --cli-path /webhooks
hookdeck gateway destination create --name my-api --type HTTP --url https://api.example.com --bearer-token token123

hookdeck gateway destination get

Get detailed information about a specific destination.

You can specify either a destination ID or name.

Usage:

hookdeck gateway destination get <destination-id-or-name> [flags]

Flags:

Flag Type Description
--include-auth bool Include authentication credentials in the response
--output string Output format (json)

Examples:

hookdeck gateway destination get des_abc123
hookdeck gateway destination get my-destination --include-auth

hookdeck gateway destination update

Update an existing destination by its ID.

Usage:

hookdeck gateway destination update <destination-id> [flags]

Flags:

Flag Type Description
--api-key string API key for destination auth
--api-key-header string Header/key name for API key
--api-key-to string Where to send API key (header or query) (default "header")
--auth-method string Auth method (hookdeck, bearer, basic, api_key, custom_signature)
--basic-auth-pass string Password for Basic auth
--basic-auth-user string Username for Basic auth
--bearer-token string Bearer token for destination auth
--cli-path string Path for CLI destinations
--config string JSON object for destination config (overrides individual flags if set)
--config-file string Path to JSON file for destination config (overrides individual flags if set)
--custom-signature-key string Key/header name for custom signature
--custom-signature-secret string Signing secret for custom signature
--description string New destination description
--http-method string HTTP method for HTTP destinations
--name string New destination name
--output string Output format (json)
--rate-limit int Rate limit (requests per period) (default "0")
--rate-limit-period string Rate limit period (second, minute, hour, concurrent)
--type string Destination type (HTTP, CLI, MOCK_API)
--url string URL for HTTP destinations

Examples:

hookdeck gateway destination update des_abc123 --name new-name
hookdeck gateway destination update des_abc123 --description "Updated"
hookdeck gateway destination update des_abc123 --url https://api.example.com/new

hookdeck gateway destination delete

Delete a destination.

Usage:

hookdeck gateway destination delete <destination-id> [flags]

Flags:

Flag Type Description
--force bool Force delete without confirmation

Examples:

hookdeck gateway destination delete des_abc123
hookdeck gateway destination delete des_abc123 --force

hookdeck gateway destination upsert

Create a new destination or update an existing one by name (idempotent).

Usage:

hookdeck gateway destination upsert <name> [flags]

Flags:

Flag Type Description
--api-key string API key for destination auth
--api-key-header string Header/key name for API key
--api-key-to string Where to send API key (header or query) (default "header")
--auth-method string Auth method (hookdeck, bearer, basic, api_key, custom_signature)
--basic-auth-pass string Password for Basic auth
--basic-auth-user string Username for Basic auth
--bearer-token string Bearer token for destination auth
--cli-path string Path for CLI destinations
--config string JSON object for destination config (overrides individual flags if set)
--config-file string Path to JSON file for destination config (overrides individual flags if set)
--custom-signature-key string Key/header name for custom signature
--custom-signature-secret string Signing secret for custom signature
--description string Destination description
--dry-run bool Preview changes without applying
--http-method string HTTP method for HTTP destinations
--output string Output format (json)
--rate-limit int Rate limit (requests per period) (default "0")
--rate-limit-period string Rate limit period (second, minute, hour, concurrent)
--type string Destination type (HTTP, CLI, MOCK_API)
--url string URL for HTTP destinations

Examples:

hookdeck gateway destination upsert my-api --type HTTP --url https://api.example.com/webhooks
hookdeck gateway destination upsert local-cli --type CLI --cli-path /webhooks
hookdeck gateway destination upsert my-api --description "Updated" --dry-run

hookdeck gateway destination count

Count destinations matching optional filters.

Usage:

hookdeck gateway destination count [flags]

Flags:

Flag Type Description
--disabled bool Count disabled destinations only (when set with other filters)
--name string Filter by destination name
--type string Filter by destination type (HTTP, CLI, MOCK_API)

Examples:

hookdeck gateway destination count
hookdeck gateway destination count --type HTTP
hookdeck gateway destination count --disabled

hookdeck gateway destination enable

Enable a disabled destination.

Usage:

hookdeck gateway destination enable <destination-id>

hookdeck gateway destination disable

Disable an active destination. It will stop receiving new events until re-enabled.

Usage:

hookdeck gateway destination disable <destination-id>

Transformations

hookdeck gateway transformation list

List all transformations or filter by name or id.

Usage:

hookdeck gateway transformation list [flags]

Flags:

Flag Type Description
--dir string Sort direction (asc, desc)
--id string Filter by transformation ID(s)
--limit int Limit number of results (default "100")
--name string Filter by transformation name
--next string Pagination cursor for next page
--order-by string Sort key (name, created_at, updated_at)
--output string Output format (json)
--prev string Pagination cursor for previous page

Examples:

hookdeck gateway transformation list
hookdeck gateway transformation list --name my-transform
hookdeck gateway transformation list --order-by created_at --dir desc
hookdeck gateway transformation list --limit 10

hookdeck gateway transformation create

Create a new transformation.

Requires --name and --code (or --code-file). Use --env for key-value environment variables.

Usage:

hookdeck gateway transformation create [flags]

Flags:

Flag Type Description
--code string JavaScript code string (required if --code-file not set)
--code-file string Path to JavaScript file (required if --code not set)
--env string Environment variables as KEY=value,KEY2=value2
--name string Transformation name (required)
--output string Output format (json)

Examples:

hookdeck gateway transformation create --name my-transform --code "addHandler(\"transform\", (request, context) => { return request; });"
hookdeck gateway transformation create --name my-transform --code-file ./transform.js --env FOO=bar,BAZ=qux

hookdeck gateway transformation get

Get detailed information about a specific transformation.

You can specify either a transformation ID or name.

Usage:

hookdeck gateway transformation get <transformation-id-or-name> [flags]

Flags:

Flag Type Description
--output string Output format (json)

Examples:

hookdeck gateway transformation get trn_abc123
hookdeck gateway transformation get my-transform

hookdeck gateway transformation update

Update an existing transformation by its ID.

Usage:

hookdeck gateway transformation update <transformation-id-or-name> [flags]

Flags:

Flag Type Description
--code string New JavaScript code string
--code-file string Path to JavaScript file
--env string Environment variables as KEY=value,KEY2=value2
--name string New transformation name
--output string Output format (json)

Examples:

hookdeck gateway transformation update trn_abc123 --name new-name
hookdeck gateway transformation update my-transform --code-file ./transform.js
hookdeck gateway transformation update trn_abc123 --env FOO=bar

hookdeck gateway transformation delete

Delete a transformation.

Usage:

hookdeck gateway transformation delete <transformation-id-or-name> [flags]

Flags:

Flag Type Description
--force bool Force delete without confirmation

Examples:

hookdeck gateway transformation delete trn_abc123
hookdeck gateway transformation delete trn_abc123 --force

hookdeck gateway transformation upsert

Create a new transformation or update an existing one by name (idempotent).

Usage:

hookdeck gateway transformation upsert <name> [flags]

Flags:

Flag Type Description
--code string JavaScript code string
--code-file string Path to JavaScript file
--dry-run bool Preview changes without applying
--env string Environment variables as KEY=value,KEY2=value2
--output string Output format (json)

Examples:

hookdeck gateway transformation upsert my-transform --code "addHandler(\"transform\", (request, context) => { return request; });"
hookdeck gateway transformation upsert my-transform --code-file ./transform.js --env FOO=bar
hookdeck gateway transformation upsert my-transform --code "addHandler(\"transform\", (request, context) => { return request; });" --dry-run

hookdeck gateway transformation run

Test run transformation code against a sample request.

Provide either inline --code/--code-file or --id to use an existing transformation. The --request or --request-file must be JSON with at least "headers" (can be {}). Optional: body, path, query.

Usage:

hookdeck gateway transformation run [flags]

Flags:

Flag Type Description
--code string JavaScript code string to run
--code-file string Path to JavaScript file
--connection-id string Connection ID for execution context
--env string Environment variables as KEY=value,KEY2=value2
--id string Use existing transformation by ID
--output string Output format (json)
--request string Request JSON (must include headers, e.g. {"headers":{}})
--request-file string Path to request JSON file

Examples:

hookdeck gateway transformation run --id trs_abc123 --request '{"headers":{}}'
hookdeck gateway transformation run --code "addHandler(\"transform\", (request, context) => { return request; });" --request-file ./sample.json
hookdeck gateway transformation run --id trs_abc123 --request '{"headers":{},"body":{"foo":"bar"}}' --connection-id web_xxx

hookdeck gateway transformation count

Count transformations matching optional filters.

Usage:

hookdeck gateway transformation count [flags]

Flags:

Flag Type Description
--name string Filter by transformation name
--output string Output format (json)

Examples:

hookdeck gateway transformation count
hookdeck gateway transformation count --name my-transform

hookdeck gateway transformation executions list

List executions for a transformation.

Usage:

hookdeck gateway transformation executions list <transformation-id-or-name> [flags]

Flags:

Flag Type Description
--connection-id string Filter by connection ID
--created-at string Filter by created_at (ISO date or operator)
--dir string Sort direction (asc, desc)
--issue-id string Filter by issue ID
--limit int Limit number of results (default "100")
--next string Pagination cursor for next page
--order-by string Sort key (created_at)
--output string Output format (json)
--prev string Pagination cursor for previous page

hookdeck gateway transformation executions get

Get a single execution by transformation ID and execution ID.

Usage:

hookdeck gateway transformation executions get <transformation-id-or-name> <execution-id> [flags]

Flags:

Flag Type Description
--output string Output format (json)

Events

hookdeck gateway event list

List events (processed webhook deliveries). Filter by connection ID, source, destination, or status.

Usage:

hookdeck gateway event list [flags]

Flags:

Flag Type Description
--attempts string Filter by number of attempts (integer or operators)
--body string Filter by body (JSON string)
--cli-id string Filter by CLI ID
--connection-id string Filter by connection ID
--created-after string Filter events created after (ISO date-time)
--created-before string Filter events created before (ISO date-time)
--destination-id string Filter by destination ID
--dir string Sort direction (asc, desc)
--error-code string Filter by error code
--headers string Filter by headers (JSON string)
--id string Filter by event ID(s) (comma-separated)
--issue-id string Filter by issue ID
--last-attempt-at-after string Filter by last_attempt_at after (ISO date-time)
--last-attempt-at-before string Filter by last_attempt_at before (ISO date-time)
--limit int Limit number of results (default "100")
--next string Pagination cursor for next page
--order-by string Sort key (e.g. created_at)
--output string Output format (json)
--parsed-query string Filter by parsed query (JSON string)
--path string Filter by path
--prev string Pagination cursor for previous page
--response-status string Filter by HTTP response status (e.g. 200, 500)
--source-id string Filter by source ID
--status string Filter by status (SCHEDULED, QUEUED, HOLD, SUCCESSFUL, FAILED, CANCELLED)
--successful-at-after string Filter by successful_at after (ISO date-time)
--successful-at-before string Filter by successful_at before (ISO date-time)

Examples:

hookdeck gateway event list
hookdeck gateway event list --connection-id web_abc123
hookdeck gateway event list --status FAILED --limit 20

hookdeck gateway event get

Get detailed information about an event by ID.

Usage:

hookdeck gateway event get <event-id> [flags]

Flags:

Flag Type Description
--output string Output format (json)

Examples:

hookdeck gateway event get evt_abc123

hookdeck gateway event retry

Retry delivery for an event by ID.

Usage:

hookdeck gateway event retry <event-id>

Examples:

hookdeck gateway event retry evt_abc123

hookdeck gateway event cancel

Cancel an event by ID. Cancelled events will not be retried.

Usage:

hookdeck gateway event cancel <event-id>

Examples:

hookdeck gateway event cancel evt_abc123

hookdeck gateway event mute

Mute an event by ID. Muted events will not trigger alerts or retries.

Usage:

hookdeck gateway event mute <event-id>

Examples:

hookdeck gateway event mute evt_abc123

hookdeck gateway event raw-body

Output the raw request body of an event by ID.

Usage:

hookdeck gateway event raw-body <event-id>

Examples:

hookdeck gateway event raw-body evt_abc123

Requests

hookdeck gateway request list

List requests (raw inbound webhooks). Filter by source ID.

Usage:

hookdeck gateway request list [flags]

Flags:

Flag Type Description
--body string Filter by body (JSON string)
--created-after string Filter requests created after (ISO date-time)
--created-before string Filter requests created before (ISO date-time)
--dir string Sort direction (asc, desc)
--headers string Filter by headers (JSON string)
--id string Filter by request ID(s) (comma-separated)
--ingested-at-after string Filter by ingested_at after (ISO date-time)
--ingested-at-before string Filter by ingested_at before (ISO date-time)
--limit int Limit number of results (default "100")
--next string Pagination cursor for next page
--order-by string Sort key (e.g. created_at)
--output string Output format (json)
--parsed-query string Filter by parsed query (JSON string)
--path string Filter by path
--prev string Pagination cursor for previous page
--rejection-cause string Filter by rejection cause
--source-id string Filter by source ID
--status string Filter by status
--verified string Filter by verified (true/false)

Examples:

hookdeck gateway request list
hookdeck gateway request list --source-id src_abc123 --limit 20

hookdeck gateway request get

Get detailed information about a request by ID.

Usage:

hookdeck gateway request get <request-id> [flags]

Flags:

Flag Type Description
--output string Output format (json)

Examples:

hookdeck gateway request get req_abc123

hookdeck gateway request retry

Retry a request by ID. By default retries on all connections. Use --connection-ids to retry only for specific connections.

Usage:

hookdeck gateway request retry <request-id> [flags]

Flags:

Flag Type Description
--connection-ids string Comma-separated connection IDs to retry (omit to retry all)

Examples:

hookdeck gateway request retry req_abc123
hookdeck gateway request retry req_abc123 --connection-ids web_1,web_2

hookdeck gateway request events

List events (deliveries) created from a request.

Usage:

hookdeck gateway request events <request-id> [flags]

Flags:

Flag Type Description
--limit int Limit number of results (default "100")
--next string Pagination cursor for next page
--output string Output format (json)
--prev string Pagination cursor for previous page

Examples:

hookdeck gateway request events req_abc123

hookdeck gateway request ignored-events

List ignored events for a request (e.g. filtered out or deduplicated).

Usage:

hookdeck gateway request ignored-events <request-id> [flags]

Flags:

Flag Type Description
--limit int Limit number of results (default "100")
--next string Pagination cursor for next page
--output string Output format (json)
--prev string Pagination cursor for previous page

Examples:

hookdeck gateway request ignored-events req_abc123

hookdeck gateway request raw-body

Output the raw request body of a request by ID.

Usage:

hookdeck gateway request raw-body <request-id>

Examples:

hookdeck gateway request raw-body req_abc123

Attempts

hookdeck gateway attempt list

List attempts for an event. Requires --event-id.

Usage:

hookdeck gateway attempt list [flags]

Flags:

Flag Type Description
--dir string Sort direction (asc, desc)
--event-id string Filter by event ID (required)
--limit int Limit number of results (default "100")
--next string Pagination cursor for next page
--order-by string Sort key
--output string Output format (json)
--prev string Pagination cursor for previous page

Examples:

hookdeck gateway attempt list --event-id evt_abc123

hookdeck gateway attempt get

Get detailed information about an attempt by ID.

Usage:

hookdeck gateway attempt get <attempt-id> [flags]

Flags:

Flag Type Description
--output string Output format (json)

Examples:

hookdeck gateway attempt get atm_abc123

Metrics

Query Event Gateway metrics (events, requests, attempts, queue depth, pending events, events by issue, transformations). All metrics commands require --start and --end (ISO 8601 date-time).

Use cases and examples:

Use case Example command
Event volume and failure rate over time hookdeck gateway metrics events --start 2026-02-01T00:00:00Z --end 2026-02-25T00:00:00Z --granularity 1d --measures count,failed_count,error_rate
Request acceptance vs rejection hookdeck gateway metrics requests --start 2026-02-01T00:00:00Z --end 2026-02-25T00:00:00Z --measures count,accepted_count,rejected_count
Delivery latency (attempts) hookdeck gateway metrics attempts --start 2026-02-01T00:00:00Z --end 2026-02-25T00:00:00Z --measures response_latency_avg,response_latency_p95
Queue backlog per destination hookdeck gateway metrics queue-depth --start 2026-02-01T00:00:00Z --end 2026-02-25T00:00:00Z --measures max_depth,max_age --destination-id dest_xxx
Pending events over time hookdeck gateway metrics pending --start 2026-02-01T00:00:00Z --end 2026-02-25T00:00:00Z --granularity 1h --measures count
Events grouped by issue (debugging) hookdeck gateway metrics events-by-issue iss_xxx --start 2026-02-01T00:00:00Z --end 2026-02-25T00:00:00Z --measures count
Transformation errors hookdeck gateway metrics transformations --start 2026-02-01T00:00:00Z --end 2026-02-25T00:00:00Z --measures count,failed_count,error_rate

Common flags (all metrics subcommands): --start, --end (required), --granularity (e.g. 1h, 5m, 1d), --measures, --dimensions, --source-id, --destination-id, --connection-id, --status, --output (json).

Utilities

Completion

Generate bash and zsh completion scripts. This command runs on install when using Homebrew or Scoop. You can optionally run it when using binaries directly or without a package manager.

Usage:

hookdeck completion [flags]

Flags:

Flag Type Description
--shell string The shell to generate completion commands for. Supports "bash" or "zsh"

Examples:

$ hookdeck completion --shell zsh
$ hookdeck completion --shell bash

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.

Usage:

hookdeck ci [flags]

Flags:

Flag Type Description
--api-key string Your Hookdeck Project API key. The CLI reads from HOOKDECK_API_KEY if not provided.
--local bool Save credentials to current directory (.hookdeck/config.toml)
--name string Name of the CI run (ex: GITHUB_REF) for identification in the dashboard

Examples:

$ hookdeck ci --api-key $HOOKDECK_API_KEY
Done! The Hookdeck CLI is configured in project MyProject

$ hookdeck listen 3000 shopify orders

●── HOOKDECK CLI ──●

Listening on 1 source • 1 connection • [i] Collapse

Shopify Source
│  Requests to → https://hkdk.events/src_DAjaFWyyZXsFdZrTOKpuHnOH
└─ Forwards to → http://localhost:3000/webhooks/shopify/orders (Orders Service)

💡 View dashboard to inspect, retry & bookmark events: https://dashboard.hookdeck.com/events/cli?team_id=...

Events • [↑↓] Navigate ──────────────────────────────────────────────────────────

> 2025-10-12 14:42:55 [200] POST http://localhost:3000/webhooks/shopify/orders (34ms) → https://dashboard.hookdeck.com/events/evt_...

───────────────────────────────────────────────────────────────────────────────
> ✓ Last event succeeded with status 200 | [r] Retry • [o] Open in dashboard • [d] Show data