Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 988 Bytes

File metadata and controls

44 lines (34 loc) · 988 Bytes

Structured Output Schema

bilibili-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: api_error
  message: 未找到用户: foo

Notes

  • --yaml and --json both use this envelope
  • non-TTY stdout defaults to YAML
  • command payloads are normalized at the CLI layer
  • list-like results are typically returned under data.items
  • status returns data.authenticated plus data.user
  • whoami returns data.user and data.relation
  • video returns data.video, data.subtitle, data.ai_summary, data.comments, data.related, and data.warnings
  • write commands return normalized action payloads with data.success and data.action

Error Codes

Common structured error codes:

  • not_authenticated
  • permission_denied
  • invalid_input
  • network_error
  • upstream_error
  • not_found
  • internal_error