Structured Output Schema

March 10, 2026 ยท View on GitHub

discord-cli uses a shared agent-friendly envelope for machine-readable output.

Success

ok: true
schema_version: "1"
data: ...

Error

ok: false
schema_version: "1"
error:
  code: channel_resolution_error
  message: Channel 'gen' matches multiple local channels.

Notes

  • --yaml and --json both use this envelope
  • non-TTY stdout defaults to YAML
  • query commands return arrays or dicts under data
  • status returns data.authenticated plus data.user
  • whoami returns data.user