Skip to main content
Use the Inbox Zero API CLI when you want a thin wrapper around the public API for scripts, bots, or local automation. The package is published to npm as @inbox-zero/api, and the executable name is inbox-zero-api.

Run with npx

Requires Node.js 18+.
You can also install it globally:

Configure access

The CLI reads configuration in this order:
  1. Command flags
  2. Environment variables
  3. ~/.inbox-zero-api/config.json
Supported environment variables:
  • INBOX_ZERO_API_KEY
  • INBOX_ZERO_BASE_URL for self-hosted or custom API deployments
Example:
base-url is optional. The CLI defaults to https://www.getinboxzero.com and only needs an override for self-hosted or custom deployments. Set INBOX_ZERO_API_KEY in your shell or secret manager before running commands. Avoid passing API keys as CLI arguments because they can leak into shell history and process listings.

Common commands

List rules:
Get a rule:
Create a rule from JSON:
Update a rule from JSON:
Delete a rule:
Read stats:
Fetch the live OpenAPI document:
For bots, prefer --json so the output is stable and machine-readable.