Skip to main content

Output and errors

All normal command responses are JSON on standard output. Use --pretty to indent the same envelope for people; do not enable it when a compact stream is preferable.

Success envelope

{
"success": true,
"data": {},
"pagination": {
"hasNextPage": true,
"endCursor": "cursor-from-linear"
}
}

data is command-specific. pagination appears only when the command passes pagination data to the output formatter.

Error envelope

{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "issue not found: ENG-999"
}
}
Exit codeJSON error.codeMeaning
0N/ASuccess
1GENERAL_ERRORUnspecified or internal operation error
2USAGE_ERRORInvalid arguments, required flags, or local input failures
3AUTH_ERRORMissing or invalid API key
4NOT_FOUNDRequested resource was not found
5RATE_LIMITEDLinear rate limit was reached
6NETWORK_ERRORNetwork connectivity failure
7PERMISSION_DENIEDInsufficient permissions

Exit status is the stable branch point for automation. Parse error.code and error.message only after checking a nonzero status.