Skip to content

CLI Commands

Complete reference for all WebhookRelay CLI commands.

Global Options

These options are available for all commands:

OptionDescription
--api-key <key>API key for authentication
--org <id>Organization ID
--output <format>Output format: table, json, yaml
--quietSuppress non-essential output
--verboseEnable verbose logging
--helpShow help
--versionShow version

Authentication

login

Authenticate with your WebhookRelay account.

bash
webhookrelay login

Opens a browser for OAuth authentication. After successful login, credentials are stored in ~/.webhookrelay/config.json.

logout

Log out and clear stored credentials.

bash
webhookrelay logout

whoami

Display current user and organization.

bash
webhookrelay whoami

Output:

User: john@example.com
Organization: My Company (org_abc123)
Plan: Pro

Organizations

orgs list

List organizations you have access to.

bash
webhookrelay orgs list

orgs switch

Switch to a different organization.

bash
webhookrelay orgs switch org_xyz789

Sources

sources list

List all sources.

bash
webhookrelay sources list
webhookrelay sources list --output json

sources create

Create a new source.

bash
webhookrelay sources create \
  --name "GitHub Production" \
  --slug "github-prod" \
  --verification github \
  --secret "your-webhook-secret"

Options:

OptionDescription
--nameDisplay name (required)
--slugURL slug (required)
--descriptionOptional description
--verificationType: github, stripe, slack, hmac, none
--secretVerification secret
--disabledCreate in disabled state

sources show

Show source details.

bash
webhookrelay sources show src_abc123
webhookrelay sources show --slug github-prod

sources update

Update a source.

bash
webhookrelay sources update src_abc123 --name "New Name"
webhookrelay sources update src_abc123 --disabled

sources delete

Delete a source.

bash
webhookrelay sources delete src_abc123
webhookrelay sources delete --slug github-prod --force

Destinations

destinations list

List all destinations.

bash
webhookrelay destinations list

destinations create

Create a new destination.

bash
webhookrelay destinations create \
  --name "Production API" \
  --url "https://api.myapp.com/webhooks" \
  --header "Authorization: Bearer token123"

Options:

OptionDescription
--nameDisplay name (required)
--urlDestination URL (required)
--descriptionOptional description
--headerCustom header (can be repeated)
--max-retriesMax retry attempts
--initial-delayInitial retry delay (ms)
--disabledCreate in disabled state

destinations show

Show destination details.

bash
webhookrelay destinations show dst_xyz789

destinations update

Update a destination.

bash
webhookrelay destinations update dst_xyz789 \
  --url "https://api.myapp.com/webhooks/v2"

destinations delete

Delete a destination.

bash
webhookrelay destinations delete dst_xyz789

Routes

routes list

List all routes.

bash
webhookrelay routes list
webhookrelay routes list --source src_abc123

routes create

Create a new route.

bash
webhookrelay routes create \
  --name "GitHub to Slack" \
  --source src_abc123 \
  --destination dst_xyz789

Options:

OptionDescription
--nameDisplay name (required)
--sourceSource ID or slug (required)
--destinationDestination ID (can be repeated)
--transformTransform ID
--filterFilter ID
--disabledCreate in disabled state

routes show

Show route details.

bash
webhookrelay routes show rte_abc123

routes update

Update a route.

bash
webhookrelay routes update rte_abc123 --disabled

routes delete

Delete a route.

bash
webhookrelay routes delete rte_abc123

Events

events list

List recent events.

bash
webhookrelay events list
webhookrelay events list --source src_abc123 --limit 50
webhookrelay events list --status failed

Options:

OptionDescription
--sourceFilter by source ID
--statusFilter by status: pending, delivered, failed
--limitNumber of events (default: 20)
--fromStart date (ISO 8601)
--toEnd date (ISO 8601)

events show

Show event details.

bash
webhookrelay events show evt_abc123
webhookrelay events show evt_abc123 --include-payload

events replay

Replay an event.

bash
webhookrelay events replay evt_abc123
webhookrelay events replay evt_abc123 --destination dst_xyz789

Tunnels

tunnel

Start a tunnel to forward webhooks to your local machine.

bash
webhookrelay tunnel --port 3000

Options:

OptionDescription
--portLocal port to forward to (required)
--hostLocal host (default: localhost)
--subdomainCustom subdomain (paid plans)
--local-httpsUse HTTPS for local connection
--inspectEnable request inspection UI

Examples:

bash
# Basic tunnel
webhookrelay tunnel --port 3000

# Custom subdomain
webhookrelay tunnel --port 3000 --subdomain myapp

# HTTPS locally
webhookrelay tunnel --port 443 --local-https

# With inspection
webhookrelay tunnel --port 3000 --inspect

tunnels list

List active tunnels.

bash
webhookrelay tunnels list

tunnels stop

Stop a tunnel.

bash
webhookrelay tunnels stop abc123
webhookrelay tunnels stop --all

Configuration

config show

Show current configuration.

bash
webhookrelay config show

config set

Set a configuration value.

bash
webhookrelay config set organization org_xyz789
webhookrelay config set apiUrl https://api.webhookrelay.com

config export

Export all resources as JSON.

bash
webhookrelay config export > webhookrelay.json
webhookrelay config export --only sources,destinations

config import

Import resources from JSON.

bash
webhookrelay config import webhookrelay.json
webhookrelay config import webhookrelay.json --dry-run

Examples

Complete Setup

bash
# Login
webhookrelay login

# Create source
webhookrelay sources create \
  --name "GitHub" \
  --slug "github" \
  --verification github \
  --secret "$GITHUB_SECRET"

# Create destination
webhookrelay destinations create \
  --name "My App" \
  --url "https://myapp.com/webhook"

# Create route
webhookrelay routes create \
  --name "GitHub to App" \
  --source github \
  --destination dst_xyz789

# Start tunnel for local development
webhookrelay tunnel --port 3000 --subdomain dev

CI/CD Pipeline

bash
#!/bin/bash
set -e

# Configure
export WEBHOOKRELAY_API_KEY="${WEBHOOKRELAY_API_KEY}"
export WEBHOOKRELAY_ORG_ID="${WEBHOOKRELAY_ORG_ID}"

# Ensure source exists
webhookrelay sources create \
  --name "CI/CD" \
  --slug "cicd" \
  --verification none \
  2>/dev/null || true

# Update destination URL
webhookrelay destinations update dst_build \
  --url "${BUILD_SERVER_URL}/webhook"

Debug Failed Webhooks

bash
# List failed events
webhookrelay events list --status failed --limit 10

# Show details
webhookrelay events show evt_abc123 --include-payload

# Replay after fix
webhookrelay events replay evt_abc123

Released under the MIT License.