Reference
FlowRelay CLI Reference
JSON-first CLI wrapper over Agent Operations, including docs discovery and doctor commands.
What the CLI is for #
The CLI is a JSON-first wrapper over Agent Operations for docs discovery, environment checks, safe reads, and approved action previews. It points users and agents back to public docs for product meaning.
Install and first command #
The npm package and command name are both flowrelay-agent. Use npx when you do not want to install it globally.
npx flowrelay-agent docs --base-url https://api.flowrelay.app
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent doctor
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent plan-usage
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent events --limit 25
Configuration #
Set FLOWRELAY_AGENT_BASE_URL to https://api.flowrelay.app for production Agent Operations. Set FLOWRELAY_AGENT_TOKEN to the merchant-authorized Agent Access grant token. You can also pass --base-url for commands that do not need a token.
Common commands #
Use these documented commands for docs discovery, environment checks, plan usage, endpoint setup, scoped event reads, and approved replay previews.
npx flowrelay-agent docs --base-url https://api.flowrelay.app
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent doctor
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent plan-usage
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent create-endpoint --json endpoint.json
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent events --limit 25
FLOWRELAY_AGENT_BASE_URL=https://api.flowrelay.app FLOWRELAY_AGENT_TOKEN=$FLOWRELAY_AGENT_TOKEN npx flowrelay-agent replay-intent <event-id> --json replay.json
Output rules #
Use JSON output for agents and scripts. Human-friendly output still includes stable docs URLs, refusal reasons, and the next safe action when a command cannot proceed.
Mission and availability #
Use the CLI docs command for public discovery, then use doctor with a grant to summarize setup state, next recommended actions, allowed capabilities, blocked capabilities, and safety guidance. Pair that output with the mission playbooks and availability guide before side-effecting commands.
Safety boundary #
The CLI does not print secrets, raw event bodies, full authentication headers, HMAC values, Shopify tokens, sessions, database URLs, or customer data. Use diagnostics IDs and redacted summaries instead.
FlowRelay