All commands return a consistent JSON envelope when you use -o json:
1 2{ "command": "jira workitem query", "request": { "site": "example", "jql": "..." }, "data": { "edges": [ { "node": { "key": "PROJ-123", "summary": "Fix login bug", "status": { "name": "In Progress" }, "webUrl": "https://example.atlassian.net/browse/PROJ-123" } } ] } }
data.edges[].nodedata.summary, .status.name, .webUrl, not .fields.summary1 2# Pipe to jq twg jira workitem query --jql "project = PROJ" -o json | \ jq '.data.edges[].node | {key, summary, status: .status.name}' # Write large results to a file twg work query --scope me --since 30d --output-file /tmp/work.json
When called by an agent, append --mode agent. This produces quieter output and strips the hints and warnings keys from the JSON envelope so the agent receives a smaller, cleaner payload:
1 2twg work query --scope me --since 7d --mode agent
The standard envelope includes:
1 2{ "command": "...", "request": { ... }, "data": { ... }, "hints": ["..."], "warnings": ["..."] }
With --mode agent, hints and warnings are omitted:
1 2{ "command": "...", "request": { ... }, "data": { ... } }
For large result sets, pair --mode agent with --output-file to write JSON to a file and avoid stdout size limits. The CLI prints stdout=<path> to stdout so the agent knows where to read the result:
1 2twg work query --scope me --since 30d --mode agent --output-file /tmp/work.json # stdout: stdout=/tmp/work.json
Rate this page: