Skip to content

CLI Overview

The Hookbase CLI provides command-line access to manage sources, destinations, routes, tunnels, and more. It includes both traditional CLI commands and an interactive TUI (Text User Interface) dashboard.

Features

  • Full API Access: Create and manage all webhook resources from the command line
  • Interactive TUI Dashboard: Visual interface with keyboard navigation
  • Localhost Tunnels: Expose local servers to receive webhooks during development
  • Live Event Streaming: Watch webhook events in real-time
  • CI/CD Friendly: JSON output and environment variable support for automation
  • Delivery Management: View, debug, and replay failed webhook deliveries

Quick Start

bash
# Install the CLI
npm install -g @hookbase/cli

# Login to your account
hookbase login

# Launch the interactive dashboard
hookbase dashboard

# Or start a tunnel directly
hookbase tunnels start 3000

Interactive Dashboard (TUI)

The CLI includes a full-featured Text User Interface for visual webhook management:

bash
hookbase dashboard

Dashboard Views:

  • Overview: Quick stats showing sources, destinations, routes, and recent activity
  • Sources: Browse, create, and delete webhook sources
  • Destinations: Manage delivery targets
  • Tunnels: View tunnel status, connect, and monitor traffic
  • Events: Browse recent webhook events
  • Live: Real-time analytics with auto-refresh

Keyboard Navigation:

KeyAction
1-6Quick switch between tabs
TabNext tab
↑/↓Navigate lists
EnterSelect item
nCreate new resource
dDelete resource
EscGo back
qQuit

Use Cases

Local Development

Receive webhooks on your local machine during development:

bash
# Start your local server
npm run dev  # localhost:3000

# In another terminal, start a tunnel
hookbase tunnels start 3000

# Your public URL: https://api.hookbase.app/t/your-subdomain

CI/CD Integration

Automate webhook configuration in pipelines:

bash
# Set credentials via environment
export HOOKBASE_API_KEY="whr_live_xxx"
export HOOKBASE_ORG_ID="org_xxx"

# Create resources programmatically
hookbase sources create \
  --name "GitHub CI" \
  --provider github \
  --yes

hookbase destinations create \
  --name "Build Server" \
  --url "https://build.example.com/webhook" \
  --yes

hookbase routes create \
  --name "GitHub to Build" \
  --source src_xxx \
  --destination dst_xxx \
  --yes

Event Debugging

Inspect and replay webhook events:

bash
# List recent events
hookbase events list --limit 10

# View event details with payload
hookbase events get evt_abc123

# Stream live events
hookbase events follow

# Replay failed deliveries
hookbase deliveries list --status failed
hookbase deliveries replay del_abc123

API Key Management

Create and manage API keys for programmatic access:

bash
# List existing keys
hookbase api-keys list

# Create a new key for CI/CD
hookbase api-keys create --name "GitHub Actions" --scopes read,write

# Revoke a compromised key
hookbase api-keys revoke key_abc123

Bulk Operations

Replay multiple failed deliveries at once:

bash
# Interactive selection
hookbase deliveries bulk-replay

# Replay all failed deliveries
hookbase deliveries bulk-replay --status failed --yes

Output Formats

All commands support JSON output for scripting:

bash
# Table output (default)
hookbase sources list

# JSON output
hookbase sources list --json

# Use with jq
hookbase sources list --json | jq '.[0].id'

System Requirements

  • Node.js 18.0 or later
  • macOS, Linux, or Windows
  • Internet connection

Next Steps

Released under the MIT License.