Skip to content

Webhooks CLI

Webhooks CLI is a monitoring and debugging developer tool for Flute webhooks.

It is a command-line and terminal UI application that can display call statuses, inspect delivery logs, manage endpoints, and forward live webhook payloads. The tool can initiate and test webhook calls, including creating new webhooks and using existing ones. It supports all Flute webhook endpoints.

Download and Installation

Download and install the application for your platform. It does not require a global installation and runs from any directory.

macOS / Linux (curl)

curl -LsSf https://github.com/getflute/flute-webhooks-cli/releases/latest/download/flute-webhooks-cli-installer.sh | sh

macOS / Linux (Homebrew)

brew install getflute/flute-webhooks-cli/flute-webhooks-cli

Windows (x64, PowerShell)

irm https://github.com/getflute/flute-webhooks-cli/releases/latest/download/flute-webhooks-cli-installer.ps1 | iex

Updating

When launched, the application automatically checks for a newer version. When a newer version exists, a non-blocking notice displays.

To update, run:

flute-webhooks-cli update

Then launch the application again.

Configuration

An optional configuration file is automatically created at ~/.flute/config.toml.

SettingDefaultDescription
default_profilesandboxDefault environment profile. Valid values: sandbox or production.
auto_update_checktrueChecks for updates on each launch, at most once every 24 hours.
poll_interval_seconds5Polling interval in seconds. Valid range: 5 to 60. Out-of-range values fall back to 5 with a warning.

Profiles

ProfileAPI Base URLOAuth URL
sandbox (default)https://sandbox.api.flute.comhttps://sandbox.oauth.api.flute.com/oauth2/token
production (alias prod)https://api.flute.comhttps://oauth.api.flute.com/oauth2/token

Use --profile to select a profile (global flag, accepted before or after the subcommand). The active profile is shown in the dashboard title.

Authenticating

flute-webhooks-cli auth login

You will be prompted for your client_id and client_secret. The secret prompt is hidden. Credentials are stored in your OS keychain and never written to disk in plaintext.

By default, credentials are stored for the sandbox profile. To set up production:

flute-webhooks-cli --profile production auth login

Verifying

To print the current bearer token (useful for curl smoke tests):

flute-webhooks-cli auth token

Running Webhooks CLI

Webhooks CLI runs in two modes: TUI (terminal user interface) and command line.

TUI Mode

The TUI is an interactive interface that runs in a terminal window. Use arrow keys to navigate rows, expand items, and toggle checkboxes.

Webhooks example

To start the TUI:

flute-webhooks-cli tui

TUI Key Bindings

ContextControls
Top levelTab switch tabs, q quit, Ctrl-C quit anywhere
Endpoints tab↑↓ / jk navigate, c create, e / Enter edit, d delete, p ping
Delivery Logs tab↑↓ / jk navigate, PgUp / PgDn / Home / End jump, v / Enter view details, t trigger forward, r retry (failed only), l listener config, 1 cycle endpoint filter, 2 cycle event-type filter, 3 cycle status filter, s toggle sort, x clear filters
Form modal (create/edit)Tab / ↑↓ move between fields, ←→ swap Cancel/Submit, Space / Enter toggle controls, PgUp / PgDn scroll event list, Esc cancel
Listener modalTab / ↑↓ move between fields, type the URL, Space toggle Enabled, Enter activate, Esc cancel
Delete confirmy / Enter delete, n / Esc cancel
Details modal↑↓ / jk scroll, PgUp / PgDn page, Esc / Enter / q close
Error modalEnter / Esc dismiss
Update-available modalEnter / Esc dismiss

While typing in a text field (URL or Name), single-character keys such as q, c, d, e, p, r, l, and t are treated as literal characters and will not trigger TUI commands.

Command Line Mode

The CLI mode issues instructions through the terminal and is scriptable. For example:

flute-webhooks-cli webhooks endpoints list
flute-webhooks-cli --output json webhooks deliveries list --limit 15 | jq

CLI Reference

Endpoints

flute-webhooks-cli webhooks endpoints list
flute-webhooks-cli webhooks endpoints get <id>
flute-webhooks-cli webhooks endpoints create --url https://… --events transaction.card.captured,refund.completed [--name "My Hook"]
flute-webhooks-cli webhooks endpoints update <id> [--url …] [--events …] [--name …] [--status active|inactive]
flute-webhooks-cli webhooks endpoints delete <id> --yes
flute-webhooks-cli webhooks endpoints ping <id>

Event types

flute-webhooks-cli webhooks event-types list

Delivery logs

flute-webhooks-cli webhooks deliveries list [--endpoint-id <id>] [--status success|failed] [--limit 50]
flute-webhooks-cli webhooks deliveries get <id>
flute-webhooks-cli webhooks deliveries retry <id>

Headless listener

Forwards every new successful delivery's headers and body to a local URL. Runs in the foreground until Ctrl-C.

flute-webhooks-cli listen --forward-to http://127.0.0.1:3000/webhook

Global flags (accepted on every subcommand)

--profile <sandbox|production>
--debug
--output table|json

--output json works on every CLI subcommand, producing pretty-printed JSON for piping into jq. Use --output json >> output.json to save output to a file.

Capabilities

Every documented Webhook API call is reachable from both TUI and CLI:

ActionTUICLI
List endpointsEndpoints tabwebhooks endpoints list
Get one endpointimplicit (table shows all fields)webhooks endpoints get <id>
Create endpointc → form modalwebhooks endpoints create
Update endpointe / Enter → form modalwebhooks endpoints update <id>
Delete endpointd → confirm modalwebhooks endpoints delete <id> --yes
Ping endpointp (toast on result)webhooks endpoints ping <id>
List event typesused to populate the formwebhooks event-types list
List delivery logsDelivery Logs tabwebhooks deliveries list
Get delivery log detailv / Enter → details modalwebhooks deliveries get <id>
Retry failed deliveryr on a failed rowwebhooks deliveries retry <id>
Listen and forward locallyl → listener modalflute-webhooks-cli listen --forward-to <url>
Manual one-shot forwardt on a successful row(listen covers it; manual one-shot deferred)

Debugging HTTP Traffic

Pass --debug to log every HTTP request and response (status, URL, body):

flute-webhooks-cli --debug auth token   # traces print to stdout
flute-webhooks-cli --debug tui          # traces go to ~/.flute/flute-webhooks-cli.log

For non-TUI commands, traces print to stdout so you can pipe them through jq or grep. For the TUI, stdout is owned by the terminal renderer, so traces are appended to ~/.flute/flute-webhooks-cli.log. Open a second terminal and run tail -f ~/.flute/flute-webhooks-cli.log to watch live.

Response bodies are logged in full with no truncation, so server stack traces are captured intact. The bearer token is never logged.

Without --debug, default tracing is INFO/WARN. Non-TUI commands write to stderr; the TUI writes to the log file.

Troubleshooting

IssueResolution
No credentials for the sandboxRun flute-webhooks-cli auth login.
Terminal looks broken after a crashThe panic hook should restore it automatically. If it did not, run reset or stty sane.
Busy: "try again in a moment"The action queue is briefly saturated by an in-flight API call. The next keypress will go through.
Polling cadence seems slow after an errorThis is exponential backoff. On consecutive 401, 403, 404, or 5xx failures the poll interval doubles each time, capped at 30 seconds. The counter resets on the first successful poll.
Token refreshBearer tokens are cached in memory and proactively refreshed 60 seconds before expiry. If the server returns a 401 anyway, the client invalidates the cache, fetches a fresh token, and retries the original request once. Only requests that fail twice in a row are surfaced as errors.

License

MIT.