The Nahook command-line tool — trigger events, inspect deliveries, manage endpoints.
Heads up:
nahookis pre-1.0. Commands and flags may change beforev1.0.0.
brew install getnahook/tap/nahookbrew upgrade nahook keeps you current. The formula is auto-published on
every tagged release from the getnahook/homebrew-tap repo.
curl -fsSL https://cli.nahook.com/install.sh | shPin a specific version or change the install location:
NAHOOK_VERSION=v0.1.0 \
NAHOOK_INSTALL_DIR=$HOME/.local/bin \
curl -fsSL https://cli.nahook.com/install.sh | shThe script verifies the SHA-256 checksum of the release archive before
installing and offers to install shell completions for bash, zsh, and
fish. Set NAHOOK_NO_COMPLETION=1 to skip the completion step.
go install github.com/getnahook/nahook-cli/cmd/nahook@latestnahook login # one-time browser-based authentication
nahook whoami # show the current workspace and CLI token
nahook --help # everything elseThe CLI stores its config in ~/.nahook/config.toml. To override the directory
(for CI, sandboxed environments, or per-project credentials), set
NAHOOK_CONFIG_DIR to any writable path.
NAHOOK_CONFIG_DIR=$PWD/.nahook nahook loginTo point the CLI at a non-default API host (for self-hosted or staging
environments), set NAHOOK_API_URL:
NAHOOK_API_URL=https://api-staging.nahook.com nahook loginThe nahook mcp serve subcommand runs a Model Context Protocol server
over stdio so an AI assistant can drive Nahook on your behalf, using the
credentials you already set up with nahook login.
Add the server to your MCP client. For Claude Desktop, run:
claude mcp add nahook -- nahook mcp serveFor Cursor, Cline, and other clients, point the command at the nahook
binary on your PATH with mcp serve as its argument.
| Tool | What it does |
|---|---|
whoami |
Local config sanity check — workspace, region, token id, expiry. |
list_endpoints |
List every endpoint in the current workspace. |
get_endpoint |
Fetch one endpoint by ep_xxx. |
create_endpoint |
Create a new endpoint. Resolves the default environment when environment_id is omitted; also accepts slugs like production. |
update_endpoint |
Partial patch — pause/resume, change URL, update description. |
list_environments |
List every environment in the workspace (use the id or slug with create_endpoint). |
list_deliveries |
Page through an endpoint's deliveries, newest-first. |
get_delivery |
Fetch one delivery by del_xxx. Pass include_payload=true to also fetch the original webhook body — useful for debugging failures. |
list_attempts |
List every attempt against a delivery (useful for debugging failures). |
retry_delivery |
Re-enqueue a failed or dead-lettered delivery. |
trigger_event |
Fire an event by type — backend fans out to every subscriber. |
send_to_endpoint |
Send a webhook directly to one endpoint. |
Read tools never modify anything. Write tools (create_endpoint,
update_endpoint, retry_delivery, trigger_event, send_to_endpoint)
are tagged so the MCP client surfaces an approval prompt before each
call.
The MCP server uses two separate credentials:
- The CLI login token (
nhc_…, written bynahook login) — powers the read tools and management operations on endpoints/deliveries. - The ingestion key (
nhk_…, the same key your SDKs use) — powerstrigger_eventandsend_to_endpoint. Set it in the MCP client's environment withNAHOOK_INGESTION_KEY=nhk_..., or addingestion_key = "nhk_..."to~/.nahook/config.toml. The server fails loudly if you try to use a write tool without one configured.
Requirements: Go 1.25+
go test ./...
go build -o bin/nahook ./cmd/nahook
./bin/nahook --version