bilibili-cli uses a shared agent-friendly envelope for machine-readable output.
ok: true
schema_version: "1"
data: ...ok: false
schema_version: "1"
error:
code: api_error
message: 未找到用户: foo--yamland--jsonboth 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 statusreturnsdata.authenticatedplusdata.userwhoamireturnsdata.useranddata.relationvideoreturnsdata.video,data.subtitle,data.ai_summary,data.comments,data.related, anddata.warnings- write commands return normalized action payloads with
data.successanddata.action
Common structured error codes:
not_authenticatedpermission_deniedinvalid_inputnetwork_errorupstream_errornot_foundinternal_error