Markdown
FlowRelay CLI Reference
Plain Markdown for agents, CLIs, MCP clients, and readers who want a copyable text version.
# FlowRelay CLI Reference
Canonical: https://docs.flowrelay.app/reference/cli/
Markdown: https://docs.flowrelay.app/reference/cli.md
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 governed action previews. It points users and agents back to public docs for product meaning.
## Common commands
Use these documented commands for docs discovery, environment checks, scoped event reads, and governed replay previews.
- Command: flowrelay-agent docs; Purpose: Print the docs index, Markdown links, manifest URL, OpenAPI URL, and reference URLs.
- Command: flowrelay-agent doctor; Purpose: Check grant context, edition identity, docs reachability, manifest reachability, and OpenAPI reachability.
- Command: flowrelay-agent events --limit 25; Purpose: Read scoped event history as JSON without exposing raw private material.
- Command: flowrelay-agent replay-intent <event-id> --json replay.json; Purpose: Create or inspect a replay preview before a governed execution.
## 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.
## Safety boundary
The CLI does not print secrets, raw payloads, full auth headers, HMAC values, Shopify tokens, sessions, database URLs, or customer data. Use diagnostics IDs and redacted summaries instead.
## Example Surface
- `flowrelay-agent docs`
- `flowrelay-agent doctor`
- `flowrelay-agent events --limit 25`
- `flowrelay-agent replay-intent <event-id> --json replay.json`
## Safety Boundary
Do not include raw payloads, endpoint secrets, auth headers, HMAC values, Shopify tokens, Shopify sessions, database URLs, customer data, merchant incidents, or copied private logs in public examples.
FlowRelay