Skip to content

Command reference

Run hooknexus <command> --help for the full option list. This page matches the current official CLI behavior. Repository: hooknexus/hooknexus-cli on GitHub · Package: hooknexus on npm.

Global options

Terminal window
hooknexus --help
hooknexus --version
hooknexus --no-color
hooknexus <command> --json

--json is supported where the command documents it (for example listen). HOOKNEXUS_NO_COLOR and HOOKNEXUS_DEBUG are also recognized by the CLI.

Authentication

Terminal window
hooknexus login
hooknexus logout
hooknexus whoami
  • login — GitHub OAuth in the browser.
  • logout — Clears the saved session locally.
  • whoami — Prints the current user when logged in.

If you are already logged in, login may prompt to confirm switching accounts.

Endpoints

Terminal window
hooknexus endpoints
hooknexus endpoints ls
hooknexus endpoints create
hooknexus endpoints create --permanent
hooknexus endpoints info <endpoint-id>
hooknexus endpoints delete <endpoint-id>

Notes:

  • Running hooknexus endpoints with no subcommand prints help for that group.
  • --permanent is a Plus feature.

Aliases include hooknexus ep for the endpoints group; use --help on subcommands for exact flags (for example --alias, TTL options on create).

Listen (realtime stream)

Terminal window
hooknexus listen
hooknexus listen <endpoint-id>
hooknexus listen <endpoint-id-1> <endpoint-id-2>
hooknexus listen --all
hooknexus listen --json
hooknexus listen --quiet

Notes:

  • With no endpoint argument, the CLI loads endpoints for your account.
  • One endpoint → selected automatically.
  • Several → interactive prompt in a TTY.
  • None → creates a normal endpoint and continues.

Forward to local

Terminal window
hooknexus forward --to http://localhost:PORT/PATH
hooknexus forward <endpoint-id> --to http://localhost:PORT/PATH
hooknexus forward --to http://localhost:3000 --preserve-path
hooknexus forward --to http://192.168.1.100:8080/webhook --allow-external

Notes:

  • --to must be a full URL including the path where your server receives the request; replace PORT / PATH with your values (see Local forwarding).
  • Available on Free and Plus.
  • By default only localhost, 127.0.0.1, and .local targets are allowed.
  • Use --allow-external for other hosts (use with care).
  • Endpoint selection matches listen when you omit the endpoint id.

See Local forwarding for behavior, headers, and options in depth.

For a higher-level walkthrough, see Forward webhooks to localhost on hooknexus.com.

Requests & replay

Terminal window
hooknexus requests
hooknexus requests ls <endpoint-id>
hooknexus requests show <request-id>
hooknexus requests body <request-id>
hooknexus requests replay <request-id> --to http://localhost:PORT/PATH

Notes:

  • hooknexus requests alone prints help for that group.
  • requests body pretty-prints JSON when the body parses as JSON.
  • Partial request ids → the CLI tells you to run requests ls for the full id.
  • requests replay --to uses the same full URL (with path) rule as forward.
  • requests replay is Plus only.

Account & billing

Terminal window
hooknexus account info
hooknexus account subscription
hooknexus upgrade

Config

Terminal window
hooknexus config ls
hooknexus config get apiUrl
hooknexus config set apiUrl https://api.hooknexus.com
hooknexus config set timeout 30000
hooknexus config reset
hooknexus config path

Configurable keys:

KeyPurpose
apiUrlHookNexus business API base URL
webUrlWeb app URL used by OAuth and links
outputFormatpretty, json, or minimal
colorBoolean color toggle
timeoutHTTP timeout in ms (allowed range enforced by CLI)

Plan limits relevant to the CLI

CapabilityFreePlus
Temporary endpoints310
Permanent endpoints1
WebSocket listeners2 per endpoint3 per endpoint
Forward to localYesYes
Request replayYes
Request retention48 hours30 days
API keyYes