Nahook CLI
The official Nahook command-line tool — trigger events, inspect deliveries, and manage endpoints from your terminal.
The Nahook CLI (nahook) is the fastest way to interact with Nahook from a terminal. Trigger events, inspect deliveries, debug failed webhooks, and manage endpoints without leaving your shell.
The CLI also ships an embedded Model Context Protocol server as the nahook mcp serve subcommand — see the MCP server docs for installing it in Claude Desktop, Cursor, and other AI assistants.
How to install the Nahook CLI on macOS, Linux, and Windows
brew install getnahook/tap/nahookcurl -fsSL https://cli.nahook.com/install.sh | shgo install github.com/getnahook/nahook-cli/cmd/nahook@latestThe install script verifies the SHA-256 checksum of the release archive and offers to install shell completions for bash, zsh, and fish. Set NAHOOK_NO_COMPLETION=1 to skip the completion step.
Windows binaries are published to GitHub Releases but no Windows installer is available yet. Download nahook_<version>_windows_amd64.zip, extract nahook.exe, and add it to PATH.
How to authenticate the CLI: nahook login
The CLI uses a browser-based device authorization flow — no need to manually copy API keys.
nahook loginThis opens your browser, prompts you to pick a workspace, and writes credentials to ~/.nahook/config.toml. The CLI token expires after 90 days of inactivity; daily use keeps it alive automatically.
To verify:
nahook whoamiTo log out:
nahook logoutAuthentication: CLI token vs ingestion key
The CLI uses two separate credentials for distinct surfaces:
| Token | Used by | How to provide |
|---|---|---|
CLI token (nhc_…) | endpoints, events, dashboard-equivalent operations | nahook login (stored automatically) |
Ingestion key (nhk_…) | nahook send, nahook trigger | NAHOOK_INGESTION_KEY env var, or ingestion_key = "nhk_..." in ~/.nahook/config.toml |
The ingestion key is the same one your SDKs use — copy it from any environment in your dashboard.
Quickstart: send your first webhook in 5 minutes
# 1. Install
brew install getnahook/tap/nahook
# 2. Authenticate
nahook login
# 3. See what's in the workspace
nahook endpoints list
# 4. Send a test webhook to one endpoint
export NAHOOK_INGESTION_KEY=nhk_us_your_key
nahook send ep_your_endpoint --data '{"order_id": "ord_42"}'
# 5. Trace what happened
nahook events list --endpoint ep_your_endpoint
nahook events get del_xxxxx --include-payload
nahook events attempts del_xxxxxNahook CLI command reference
nahook login
Authorize this device against a Nahook workspace via browser-based device grant.
nahook loginnahook logout
Revoke the local CLI token and remove stored credentials.
nahook logoutnahook whoami
Show the current CLI token, workspace, and region. Reads local config only — no network call.
nahook whoaminahook endpoints
Manage webhook endpoints in the current workspace.
nahook endpoints list
nahook endpoints get ep_xxx
nahook endpoints create --url https://example.com/hook --type webhook
nahook endpoints update ep_xxx --is-active=false
nahook endpoints delete ep_xxxnahook events
Inspect and replay webhook deliveries.
# List deliveries for an endpoint
nahook events list --endpoint ep_xxx
# Filter by status, paginate
nahook events list --endpoint ep_xxx --status failed --limit 100
nahook events list --endpoint ep_xxx --all # walk every page
# Inspect one delivery
nahook events get del_xxx
nahook events get del_xxx --include-payload # also fetch the original body
# See per-attempt logs
nahook events attempts del_xxx
# Re-enqueue a failed or dead-lettered delivery
nahook events resend del_xxxnahook send
Send a webhook directly to one endpoint, bypassing event-type fan-out.
nahook send ep_xxx --data '{"orderId":"o_1"}'
nahook send ep_xxx --data @body.json
cat body.json | nahook send ep_xxx --data -
nahook send ep_xxx --data '{...}' --idempotency-key key_123nahook trigger
Fire an event and let Nahook fan it out to every endpoint subscribed to the given event type.
nahook trigger order.created --data '{"orderId":"o_1"}'
nahook trigger order.created --data @body.json
cat body.json | nahook trigger order.created --data -nahook mcp serve
Run the embedded Model Context Protocol server over stdio. Meant to be launched as a subprocess by an MCP client (Claude Desktop, Cursor, Cline, …), not run directly. This local server exposes the full toolset, including the production event-firing tools.
Prefer zero install? Nahook also runs a hosted MCP server at https://mcp.nahook.com/ that connects over OAuth — no binary, no keys. See the MCP server docs for both options and client-specific setup.
Output format: tables, JSON, and piping to jq
The CLI is TTY-aware: tables when stdout is a terminal, JSON when piped, and --json to force JSON in either case.
nahook endpoints list # table
nahook endpoints list | jq # JSON (auto-detected pipe)
nahook endpoints list --json | jq # explicit JSONConfiguration: ~/.nahook/config.toml and environment variables
Credentials and settings live in ~/.nahook/config.toml. Override the directory for CI, sandboxed environments, or per-project credentials:
NAHOOK_CONFIG_DIR=$PWD/.nahook nahook loginTo point at a non-default API host (self-hosted or staging):
NAHOOK_API_URL=https://api-staging.nahook.com nahook loginSource code
getnahook/nahook-cli
GitHub repository, install script, release notes
Ingestion SDKs
Official client libraries for sending webhooks with Nahook
MCP Server (Claude, ChatGPT, Cursor)
Drive Nahook from your AI assistant. Connect the hosted Nahook MCP server over OAuth — no install, no API keys — from Claude, ChatGPT, Cursor, and any MCP-compatible client, or run the local CLI server for the full toolset.