Destination type

CLI Destination Configuration

Use CLI destinations to forward provider traffic, test events, and replayed events to a service running on your machine through fasthook-cli.

CLIAuthenticated fasthook-cli tunnelPOST, PUT, PATCH, DELETELocal development
CLI destination delivery flowFastHook routes accepted events through a connection to a CLI destination and stores delivery attempt evidence.AcceptedRequestsource verifiedConnectionRoute branchfilters and transformsretry policyCLICLIAuthenticated fasthook-cli tunnelPOST, PUT, PATCH, DELETEAttemptEvidencestatus + bodyDestination config owns target, auth, method, rate limit, disabled state, and delivery attempt evidence.
For CLI destinations, FastHook records the destination branch, then forwards delivery through an authenticated tunnel session to the local receiver supplied by fasthook-cli.

When to use this destination type

Choose CLI when the receiver target is Authenticated fasthook-cli tunnel. Destinations are outbound delivery targets: they do not decide whether a source request should be accepted, and they do not own connection filters or transformations. They own where the final delivery goes and how FastHook should authenticate, pace, disable, and inspect that delivery.

A CLI destination can be reused by multiple connections when several source branches should feed this receiver. Reuse keeps its capacity, credentials, and attempt evidence attached to one destination id.

FastHook dashboard fields

In the dashboard, create a destination, set Destination Type to CLI, then fill the fields below.

CLI path

Optional local path such as /webhooks/orders. Defaults to /.

HTTP method

Method used when the CLI forwards the delivery to localhost.

Max delivery rate

Optional pacing for local delivery during debugging or replay.

API config fields

The REST API stores CLI destination behavior under config. Use PATCH for focused edits and PUT only when the request contains the full config you want to keep.

config.path

Optional path appended to the local URL supplied by the active CLI tunnel.

config.http_method

Method FastHook asks the CLI tunnel to use for local delivery.

config.rate_limit

Optional pacing limit for local tunnel deliveries.

config.rate_limit_period

Rate-limit period: second, minute, or hour.

CLI destination config
{
  "name": "local-orders-api",
  "type": "CLI",
  "config": {
    "path": "/webhooks/orders",
    "http_method": "POST",
    "rate_limit": 10,
    "rate_limit_period": "second"
  }
}
Create CLI destination with cURL
curl -X POST "https://api.fasthook.io/v1/destinations" \
  -H "Authorization: Bearer $FASTHOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "local-orders-api",
  "type": "CLI",
  "config": {
    "path": "/webhooks/orders",
    "http_method": "POST",
    "rate_limit": 10,
    "rate_limit_period": "second"
  }
}'

Authentication

CLI destination authentication is outbound. It helps this receiver trust or accept FastHook delivery and remains separate from source authentication for the original webhook producer.

  • Authenticated FastHook CLI tunnel session

HTTP methods and rate limit

CLI uses the methods below for delivery attempts. Its destination rate limit is shared by every connection that targets this receiver.

POSTPUTPATCHDELETE

Rate limit: Optional. Useful when replaying many events into a local service.

Delivery behavior

  • A CLI destination does not store localhost host or port. The active CLI command supplies the local target with --to.
  • FastHook delivers the event to the tunnel service, and the authenticated CLI session forwards it to the local receiver.
  • The CLI sends local response status, headers, body, and errors back so FastHook can store attempt evidence.
  • More than one CLI can connect to the same destination, but separate destinations are easier to reason about for separate developers.

Setup checklist

  1. Create a destination and choose CLI as the destination type.
  2. Optionally set a CLI path. Leave it blank to use /.
  3. Create or edit a connection so accepted source events route to the CLI destination.
  4. Log in with fasthook-cli and start a tunnel with fasthook tunnel --destination des_xxx --to 8080.
  5. Send or replay events and inspect the local receiver response in FastHook attempts.

Troubleshooting

No delivery reaches localhost.

Start fasthook tunnel with the correct destination id and confirm the local --to URL is listening.

HTTP 502 Local Fetch Failed.

The CLI was connected, but the local receiver did not answer successfully. Check host, port, path, and local logs.

Events go to the wrong local route.

Check the destination path and the --to value. The path is stored on the destination; host and port come from the CLI session.

Related docs