SCHEMA.md

March 14, 2026 · View on GitHub

All --json and --yaml output from boss-cli uses a unified envelope:

Success

{
  "ok": true,
  "schema_version": "1",
  "data": { ... }
}

Error

{
  "ok": false,
  "schema_version": "1",
  "data": null,
  "error": {
    "code": "not_authenticated",
    "message": "环境异常 (__zp_stoken__ 已过期)。请重新登录: boss logout && boss login"
  }
}

Error Codes

CodeDescription
not_authenticatedSession expired or not logged in
rate_limitedToo many requests
invalid_paramsMissing or invalid parameters
api_errorUpstream API error
unknown_errorUnexpected error

Notes

  • When stdout is not a TTY (e.g., piped or invoked by AI agent), output defaults to YAML.
  • Use --json or --yaml to explicitly select format.
  • Install pyyaml for YAML support: pip install boss-cli[yaml]
  • If pyyaml is not installed, --yaml falls back to JSON.