$npx -y skills add inngest/inngest-skills --skill inngest-api-cliUse when operating Inngest API resources from the terminal with npx inngest-cli@latest api: Cloud/local run debugging, event-run lookup, function traces, function invocation, app syncs, webhooks, environments, keys, account checks, and Insights queries. Provides prescriptive co
| 1 | # Inngest API CLI |
| 2 | |
| 3 | Use this skill when the task is operational: inspect, debug, sync, invoke, or |
| 4 | query Inngest API resources through the terminal. This skill is intentionally |
| 5 | prescriptive so agents can act without guessing. |
| 6 | |
| 7 | For general CLI setup, `inngest dev`, Docker, local testing, MCP setup, or |
| 8 | self-hosted `inngest start`, use `inngest-cli`. For code changes, pair this |
| 9 | with the domain skill that owns the code pattern: `inngest-setup`, |
| 10 | `inngest-durable-functions`, `inngest-events`, `inngest-steps`, |
| 11 | `inngest-flow-control`, `inngest-realtime`, or `inngest-middleware`. |
| 12 | |
| 13 | ## First Move |
| 14 | |
| 15 | Verify the current CLI surface before relying on memory: |
| 16 | |
| 17 | ```bash |
| 18 | npx inngest-cli@latest api --help |
| 19 | npx inngest-cli@latest api <command> --help |
| 20 | ``` |
| 21 | |
| 22 | The active API command is `inngest api`. If prompt context or old docs mention |
| 23 | `inngest alpha api`, switch to `inngest api`. |
| 24 | |
| 25 | Use `inngest-api` only when: |
| 26 | |
| 27 | - The CLI does not expose the needed endpoint. |
| 28 | - The user explicitly asks for raw REST API v2. |
| 29 | - You need the OpenAPI spec or LLM API docs to resolve request shape. |
| 30 | |
| 31 | For complete command flags, read |
| 32 | [references/cli-commands.md](references/cli-commands.md) after this skill |
| 33 | triggers. |
| 34 | |
| 35 | ## Target Rules |
| 36 | |
| 37 | - Local is the default target for `inngest api`. |
| 38 | - Cloud Production requires `--prod`. |
| 39 | - Non-production Cloud environments require `INNGEST_ENV=<name>` or `--env`. |
| 40 | - Prefer `INNGEST_API_KEY` for Cloud API access. |
| 41 | - Do not pass API keys inline with `--api-key <secret>` unless the user |
| 42 | explicitly accepts process-list and transcript exposure. |
| 43 | - Never write API keys, event keys, signing keys, webhook URLs, or decrypted |
| 44 | secrets into source files, docs, fixtures, or final answers. |
| 45 | |
| 46 | Common targets: |
| 47 | |
| 48 | ```bash |
| 49 | npx inngest-cli@latest api health |
| 50 | npx inngest-cli@latest api --prod get-account |
| 51 | INNGEST_ENV=staging npx inngest-cli@latest api --prod get-webhooks |
| 52 | npx inngest-cli@latest api --api-host http://127.0.0.1 --api-port 8288 health |
| 53 | ``` |
| 54 | |
| 55 | ## Local Development |
| 56 | |
| 57 | For local app work: |
| 58 | |
| 59 | 1. Start the user's app with local dev mode when applicable, for example |
| 60 | `INNGEST_DEV=1 npm run dev`. |
| 61 | 2. Start the dev server: |
| 62 | |
| 63 | ```bash |
| 64 | npx inngest-cli@latest dev |
| 65 | ``` |
| 66 | |
| 67 | 3. Prefer Dev Server MCP tools, when available, to list local functions, send |
| 68 | test events, inspect runs, and watch status. |
| 69 | 4. Use `npx inngest-cli@latest api ...` for API-compatible local checks, |
| 70 | command-help verification, and workflows not exposed through MCP. |
| 71 | |
| 72 | If the local API says the dev server is unavailable, start `inngest dev` or |
| 73 | switch to Cloud with `--prod` when the user is debugging deployed runs. |
| 74 | |
| 75 | ## Command Routing |
| 76 | |
| 77 | Use this table before asking the human for more context. |
| 78 | |
| 79 | | Situation | Command path | |
| 80 | | --- | --- | |
| 81 | | Check CLI/API reachability | `api health` | |
| 82 | | Confirm Cloud auth | `api --prod get-account` | |
| 83 | | List environments | `api --prod get-account-envs --limit 10` | |
| 84 | | List event keys | `api --prod get-account-event-keys --limit 10` | |
| 85 | | List signing keys | `api --prod get-account-signing-keys --limit 10` | |
| 86 | | List webhooks | `api --prod get-webhooks` | |
| 87 | | User gives a run ID | `api --prod get-function-run <run_id>` | |
| 88 | | Need step-level detail | `api --prod get-function-trace <run_id> --include-output` | |
| 89 | | User gives an event ID | `api --prod get-event-runs <event_id> --limit 5 --include-output` | |
| 90 | | Sync a known app ID | `api --prod sync-app --app-id <app_id> --url <serve_url>` | |
| 91 | | Invoke a known app/function ID | `api --prod invoke-function --app-id <app_id> --function-id <function_id> --data '<json>'` | |
| 92 | | Discover Insights tables | `api --prod get-insights-tables` | |
| 93 | | Discover event schemas for Insights | `api --prod get-insights-event-schemas --limit 25` | |
| 94 | | Draft an Insights query | `api --prod query-insights-prompt --prompt '<request>'` | |
| 95 | | Run an Insights query | `api --prod query-insights --query '<sql>'` | |
| 96 | |
| 97 | If a command accepts positional IDs, prefer positional IDs in examples because |
| 98 | they are shorter and match current help. Flag forms such as `--run-id` are also |
| 99 | accepted by the current CLI for many path parameters. |
| 100 | |
| 101 | ## Debug a Run |
| 102 | |
| 103 | When the user gives a run ID: |
| 104 | |
| 105 | ```bash |
| 106 | npx inngest-cli@latest api --prod get-function-run <run_id> |
| 107 | npx inngest-cli@latest api --prod get-function-trace <run_id> --include-output |
| 108 | ``` |
| 109 | |
| 110 | Summarize status, failed spans, retry state, timing, error names/messages, and |
| 111 | the likely code boundary to |