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
| Code | Description |
|---|---|
not_authenticated | Session expired or not logged in |
rate_limited | Too many requests |
invalid_params | Missing or invalid parameters |
api_error | Upstream API error |
unknown_error | Unexpected error |
Notes
- When stdout is not a TTY (e.g., piped or invoked by AI agent), output defaults to YAML.
- Use
--jsonor--yamlto explicitly select format. - Install
pyyamlfor YAML support:pip install boss-cli[yaml] - If
pyyamlis not installed,--yamlfalls back to JSON.