Docs

FastHook CLI

FastHook CLI is the command-line interface for FastHook. Use it to manage sources, destinations, connections, transformations, requests, events, attempts, metrics, and project secrets without leaving the terminal.

The CLI also runs authenticated outbound tunnels for CLI destinations. Resource management and local tunneling are separate workflows: this page covers the shared installation, authentication, configuration, and command surface, then points to the focused guide for each workflow.

Choose A CLI Workflow

  • Manage FastHook resources from a terminal or deployment script.
  • Inspect requests, events, attempts, and metrics during debugging or incident recovery.
  • Run repeatable route changes from reviewed JSON files.
  • Open an authenticated tunnel that delivers a CLI destination to localhost.
  • Use the raw API command when a FastHook API route does not need a dedicated wrapper.

Install

On Windows, download the released fasthook.exe binary. You can also clone fasthook-cli and build it with Node.js 20 or newer. The examples below use fasthook; use .\fasthook.exe when running the downloaded executable from the current PowerShell directory.

PowerShell
# Windows release
Invoke-WebRequest `
  -Uri "https://github.com/alencmanis/fasthook-cli/releases/latest/download/fasthook.exe" `
  -OutFile ".\fasthook.exe"

.\fasthook.exe --help

# Build from source
git clone https://github.com/alencmanis/fasthook-cli.git
cd fasthook-cli
npm install
npm run build
npx . --help

Authenticate And Configure

Authenticate with the API Key from Project Secrets, not a webhook delivery signing secret. The CLI stores the credential in ~/.fasthook/config.json by default and can store a default team and CLI destination.

Use environment variables or FASTHOOK_CONFIG when credentials should not be written to the default user config, such as CI jobs or isolated project environments.

Configuration
fasthook login --api-key fhp_xxx
fasthook config --team tm_xxx
fasthook config --destination des_local_cli
fasthook auth me
fasthook config

# Optional environment overrides
FASTHOOK_CONFIG=C:\Users\you\.fasthook\project.json
FASTHOOK_API_KEY=fhp_xxx
FASTHOOK_TEAM_ID=tm_xxx
FASTHOOK_DESTINATION_ID=des_local_cli
FASTHOOK_LOCAL_URL=http://localhost:8080

Command Surface

Resource commands map to the public FastHook API and print JSON responses. List and read operations accept filters as flags; write operations accept a JSON string or a reviewed JSON file.

Commands
fasthook sources <list|get|create|upsert|update|delete|enable|disable>
fasthook destinations <list|get|create|upsert|update|delete|enable|disable>
fasthook connections <list|get|create|upsert|update|delete|pause|unpause|enable|disable|latest-input>
fasthook transformations <list|get|create|upsert|update|delete|run|executions|execution>
fasthook requests <list|count|get|retry|events|ignored-events|bulk-operations>
fasthook events <list|count|get|retry|bulk-operations>
fasthook attempts <list|get>
fasthook metrics <requests|events>
fasthook project-secrets <get|update|rotate>
fasthook auth <me|logout>
fasthook api <method> <path> [--json '{...}' | --json-file file.json]
fasthook tunnel [--destination des_xxx] [--to http://localhost:8080]

Resource And Automation Commands

Use dedicated resource commands for normal operations and fasthook api for a direct API call. For repeatable environments, keep resource payloads in JSON files, create or upsert dependencies in source-destination-connection order, and store the returned ids.

Open the CLI connection management guide

Use the operations guide for route JSON, inspection, incident runbooks, retries, and bulk recovery.

Examples
fasthook sources list --limit 20 --dir desc
fasthook destinations create --json-file destination.json
fasthook connections upsert --json-file connection.json
fasthook connections pause web_xxx
fasthook requests retry req_xxx
fasthook events bulk-operations create --json-file replay.json
fasthook metrics events --from 2026-05-29T10:00:00Z --to 2026-05-29T10:30:00Z
fasthook api GET /sources --limit 20

Local Tunneling

A CLI destination keeps its route configuration in FastHook while fasthook tunnel supplies the localhost target at runtime. The tunnel is outbound from your terminal, so you do not expose localhost or replace the provider's stable FastHook source URL.

Set up CLI tunneling

Follow the complete localhost delivery, verification, reconnect, timeout, and troubleshooting workflow.

Local tunnel
fasthook tunnel --destination des_local_cli --to http://127.0.0.1:8080

Security

  • Store project API keys in secret storage and keep them out of screenshots and logs.
  • Use a dedicated config path or environment variables for CI jobs.
  • Rotate a project API key if it is exposed.
  • Use CLI destinations for local development and controlled debugging, not as public production receivers.
  • Review JSON files before applying route updates or bulk retry filters.

Next