CLI

Install, log in, and use the CLI as your operational control plane for workspaces, channels, sandbox, and webhooks.

Install

npm install -g @gethookmyapp/cli

Authenticate

Running hookmyapp login opens a browser tab to complete OAuth. After sign-in, the CLI writes a token to your OS credential store.

hookmyapp login
hookmyapp workspace list

Browser step required.

If you are running inside an agent that cannot open tabs, the CLI prints a URL for you or the agent's human operator to open manually.

Command Families

  • auth: login, logout. Manages credentials in your OS credential store.
  • workspace: list, use, new, and member management. Tenancy boundary for every other command.
  • channels: connect, list, show, enable, disable, disconnect. Manages WABA connections.
  • sandbox: start, status, stop, env, listen, send. Pin a sandbox session to your phone and stream webhooks to localhost.
  • env: prints production credentials for a connected WABA. Feeds .env files.
  • token: prints the current long-lived access token for a WABA. Refresh-aware.
  • webhook: set and show the production override URL Meta calls when messages arrive.
  • health: reports the WhatsApp health status, phone status, and quality rating for a WABA.
  • config: set, get, unset, show. Manages CLI-local config like default workspace.
  • billing: status, manage, upgrade. Opens Stripe Customer Portal or a pricing page.

Global Flags

  • --json: machine-readable output. Default is human-formatted.
  • --human: force human-formatted output even if stdout is not a TTY.
  • --workspace <slug>: override the default workspace for this command.
  • --env <name>: override the default environment (staging or production) for this command.
  • --debug: verbose logging including the HTTP requests the CLI makes.
  • --help: command-specific help text. Every command supports it.

Common Recipes

The commands you will run most days.

# List workspaces and pick one
hookmyapp workspace list
hookmyapp workspace use acme
 
# Start a sandbox session pinned to your phone
hookmyapp sandbox start --phone +15551234567
hookmyapp sandbox env --write .env
 
# Pull production env for a connected WABA
hookmyapp env 1276334778010256
 
# Set a production webhook URL
hookmyapp webhook set 1276334778010256 \
  --url https://api.acme.com/whatsapp/webhook \
  --verify-token $(openssl rand -hex 32)
 
# Check health after setup
hookmyapp health 1276334778010256

Next Steps

  • Sandbox: Start a sandbox session and pull env values.
  • Connect WABA: Connect a production WABA via embedded signup.