twitter-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: User @foo not found--yamland--jsonboth use this envelope- non-TTY stdout defaults to YAML
- tweet and user lists are returned under
data articlereturns a single tweet object underdatastatusreturnsdata.authenticatedplusdata.userwhoamireturnsdata.user- write commands also support explicit
--json/--yaml
twitter article <id> --json returns the standard tweet object plus:
data:
id: "1234567890"
articleTitle: "Article Title"
articleText: |
# Heading
Body text...Common structured error codes:
not_authenticatednot_foundinvalid_inputrate_limitedapi_error