Skip to content

edgefoundryinc/Relayze-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Posthook CLI

Command-line interface for observing webhook events in real-time from Posthook.

Overview

Posthook CLI provides real-time observability for webhook events without the overhead of a web interface. Connect directly to your webhook endpoint and see events as they arrive, with full request details including headers and payloads.

Features

  • Real-time WebSocket connection to Posthook endpoints
  • Historical event replay on connection
  • Formatted JSON payload display
  • Low-latency event streaming
  • Zero configuration required for basic usage

Installation

Prerequisites

  • Rust 1.70 or later

Build from Source

git clone <repository-url>
cd posthook-cli
cargo build --release

The compiled binary will be available at target/release/posthook-cli.

Usage

Listen to Webhook Events

Connect to a Posthook endpoint and stream events in real-time:

posthook-cli listen --slug <your-slug>

Example:

posthook-cli listen --slug abc123456

This connects to wss://posthook.app/h/abc123456 and displays all webhook events.

Getting a Slug

  1. Visit posthook.app
  2. Generate a new webhook URL
  3. Copy the slug from the URL (the part after /h/)
  4. Use it with the CLI

Output Format

When events are received, the CLI displays:

  • Timestamp in ISO 8601 format
  • HTTP method (GET, POST, etc.)
  • Trace ID for debugging
  • Request headers (filtered for relevance)
  • JSON payload (pretty-printed)

Development

Running in Development

cargo run -- listen --slug <your-slug>

Testing

Send test webhooks to your endpoint:

curl -X POST https://posthook.app/h/<your-slug> \
  -H "Content-Type: application/json" \
  -d '{"test": "data"}'

License

See LICENSE.md for details.

Apache License, Version 2.0

About

Command-line interface for observing webhook events in real-time from Posthook.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages