Skip to content

Install & quick start

The HookNexus CLI is the official command-line tool for your account: manage endpoints, stream webhooks in the terminal, inspect stored requests, and forward live traffic to a local URL.

Open-source repository: github.com/hooknexus/hooknexus-cli

Requirements

  • Node.js 18 or newer
  • npm, pnpm, or yarn for global installs

Install

Terminal window
npm install -g hooknexus

After a global install, run hooknexus in your terminal. Some installs also expose the hnx alias (see the package bin field).

Verify:

Terminal window
hooknexus --version
hooknexus --help

Sign in

login currently uses GitHub OAuth only. The CLI opens a browser flow and stores a JWT locally after success.

  1. Run:

    Terminal window
    hooknexus login
  2. Complete sign-in in the browser.

  3. Return to the terminal when the CLI reports success.

If you are already logged in, the CLI may ask whether you want to switch accounts.

Quick start

Terminal window
# 1. Sign in
hooknexus login
# 2. Create an endpoint
hooknexus endpoints create
# 3. Stream webhooks in the terminal
hooknexus listen
# 4. Forward to your machine (replace PORT/PATH — full URL including path)
hooknexus forward --to http://localhost:PORT/PATH

Update

Terminal window
npm update -g hooknexus

(Use your package manager’s equivalent if you did not install with npm.)

Uninstall

Terminal window
npm uninstall -g hooknexus

How the CLI connects to HookNexus

  • Business API (default): https://api.hooknexus.com
  • Auth / billing API (default): https://api.infra-hub.hooknexus.com
  • After login, credentials are stored locally as a JWT.
  • WebSocket connections send both an Authorization header and a query token.

Override URLs with hooknexus config (see Command reference) — keys apiUrl, webUrl — when needed (for example self-hosted or staging).

Next steps

Source & contributing