Every data command in cops supports three output formats via the --output flag. The format you choose depends on how you intend to use the output.
Format Flag Best for Table --output table (default)Interactive use, quick human review JSON --output jsonScripts, CI pipelines, AI tools, automation Markdown --output markdownPasting into wikis, pull request descriptions, reports
Table (default)
Table is the default format when --output is not specified. It renders a bordered ASCII table with column headers derived from the data fields.
cops jira issue search --jql "project = ABC AND sprint in openSprints()"
Table cells are truncated to 80 characters to keep the output readable in a terminal. Newlines and tab characters within values are normalised to spaces.
JSON
The --output json flag produces a stable JSON envelope suitable for scripting and automation.
cops jira release status \
--project IP \
--fixVersion 2026-04-17 \
--output json
JSON envelope structure
All JSON output follows the JsonEnvelope contract:
{
"schemaVersion" : "v1" ,
"command" : "jira release status" ,
"generatedAt" : "2026-04-17T10:00:00.000Z" ,
"count" : 3 ,
"metadata" : {
"project" : "IP" ,
"fixVersion" : "2026-04-17" ,
"released" : false
},
"items" : [
{
"key" : "IP-101" ,
"summary" : "Add rate limiting to API gateway" ,
"status" : "Done" ,
"statusCategory" : "Done" ,
"assignee" : "jane.smith" ,
"priority" : "High"
},
{
"key" : "IP-102" ,
"summary" : "Update deployment runbook" ,
"status" : "In Progress" ,
"statusCategory" : "In Progress" ,
"assignee" : "bob.jones" ,
"priority" : "Medium"
}
]
}
Envelope fields
Field Type Description schemaVersionstring Always "v1" — stable across cops versions commandstring The command that produced this output generatedAtstring ISO 8601 timestamp of when the output was generated countnumber Number of items in the items array metadataobject Command-specific metadata (present on most commands) itemsarray The actual result rows
schemaVersion: "v1" is stable. You can safely consume it in scripts, dashboards, or compliance workflows without worrying about breaking changes between cops versions.
Parsing JSON in scripts
# Extract all issue keys with jq
cops jira release status \
--project IP \
--fixVersion 2026-04-17 \
--output json \
| jq '.items[].key'
# Count items
cops release repos discover \
--project my-service \
--fixVersion 2026-04-17 \
--output json \
| jq '.count'
# Check if any blocking gates failed
cops release check --all --project my-service --output json \
| jq '[.items[] | select(.blocking == true)] | length'
Markdown
The --output markdown flag renders a GitHub Flavored Markdown table. Pipe characters inside values are escaped.
cops bitbucket pr list \
--project MYTEAM \
--repo my-service \
--output markdown
Example output:
| id | state | title | from | to |
| --- | --- | --- | --- | --- |
| 42 | OPEN | feat: add retry logic | feature/retry-logic | release/2026-04-17 |
| 41 | OPEN | fix: null pointer in handler | fix/null-pointer | release/2026-04-17 |
Paste this directly into a Confluence page (using the Markdown macro), a GitHub PR description, or a Jira comment.
Using --output across commands
The --output flag is available on all data commands:
Jira commands
Confluence commands
Bitbucket commands
Bamboo commands
Release commands
cops jira issue get ABC-123 --output json
cops jira issue search --jql "project = ABC" --output markdown
cops jira release status --project IP --fixVersion 2026-04-17 --output json