inbox-zero
Use the Inbox Zero API CLI (inbox-zero-api) in Cursor: inspect OpenAPI, list rules, read stats, and create or update rules. Install @inbox-zero/api. Set INBOX_ZERO_API_KEY for rules and stats; openapi --json works without a key.
cursor.directory·↓ 1
规则
inbox-zero-api-cli
Inspect or update Inbox Zero rules and analytics through the public API CLI.
# Inbox Zero API CLI
Use `inbox-zero-api` with `--json` for stable output. Require `INBOX_ZERO_API_KEY` for authenticated commands.
1. Discover schema: `inbox-zero-api openapi --json`
2. Read before replace: `inbox-zero-api rules get <id> --json`
3. Apply full body: `inbox-zero-api rules update <id> --file rule.json --json`
Install: `npm install -g @inbox-zero/api`. See the **inbox-zero-api** skill (`skills/inbox-zero-api/references/cli-reference.md`) for the full mutation flow.Skill
inbox-zero-api
Use the Inbox Zero API CLI to manage rules and stats via the public API. Use when the task involves Inbox Zero rules, stats, or API automation.
# Inbox Zero API CLI
Use this skill when the task is to inspect or change Inbox Zero state through the public API.
## Workflow
1. Prefer `--json` so the output is stable and machine-readable.
2. Keep credentials in `INBOX_ZERO_API_KEY` or OpenClaw skill config. Avoid passing API keys as CLI flags unless there is no alternative.
3. Before creating or replacing a rule body, fetch the live schema with `inbox-zero-api openapi --json`.
4. For create and update flows, write JSON into a workspace file or pipe it on stdin.
5. Treat `rules update` as a full replacement. Read the current rule first if you only intend to change part of it.
## Quick Start
```bash
inbox-zero-api rules list --json
inbox-zero-api stats by-period --period week --json
inbox-zero-api openapi --json
```
If the CLI is not installed yet, install it with the OpenClaw installer or run `npm install -g @inbox-zero/api`.
## Cursor
Set `INBOX_ZERO_API_KEY` in your environment (shell profile, Cursor env, or a local env file—never commit keys). Install the CLI with `npm install -g @inbox-zero/api` or `npx @inbox-zero/api`.
## OpenClaw Config
Set the API key in `~/.openclaw/openclaw.json` under `skills.entries.inboxZeroApi.apiKey`, or export `INBOX_ZERO_API_KEY` in the host environment.
Use `INBOX_ZERO_BASE_URL` or `inbox-zero-api config set base-url <url>` only for self-hosted or nonstandard deployments.
## Reference
For exact command patterns and a safe mutation flow, read `references/cli-reference.md`.