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 3000Interactive Dashboard (TUI)
The CLI includes a full-featured Text User Interface for visual webhook management:
bash
hookbase dashboardDashboard 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:
| Key | Action |
|---|---|
1-6 | Quick switch between tabs |
Tab | Next tab |
↑/↓ | Navigate lists |
Enter | Select item |
n | Create new resource |
d | Delete resource |
Esc | Go back |
q | Quit |
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-subdomainCI/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 \
--yesEvent 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_abc123API 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_abc123Bulk Operations
Replay multiple failed deliveries at once:
bash
# Interactive selection
hookbase deliveries bulk-replay
# Replay all failed deliveries
hookbase deliveries bulk-replay --status failed --yesOutput 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
- Installation - Detailed installation instructions
- Commands - Complete command reference
- Tunnels Guide - Using tunnels for local development