Installation
No global installation required. Run the CLI on-demand withnpx.
Commands
| Command | Description |
|---|---|
login | Store your Posthook API key |
logout | Clear stored API keys |
listen | Receive webhooks on localhost via WebSocket |
init | Pull remote config into a local posthook.toml |
pull | Download remote config, overwriting the local file |
apply | Push local config to the remote project |
diff | Show pending changes between local and remote |
status | Display project info, signing key, and masked API key |
validate | Check TOML syntax locally without an API call |
Common flags
| Flag | Applies to | Description |
|---|---|---|
-k, --api-key <key> | listen, init, pull, apply, diff | Override the stored API key |
-c, --config <name> | init, pull, apply, diff, status, validate | Use a named config file (posthook.<name>.toml) |
POSTHOOK_API_KEY environment variable instead of using --api-key.