CLI Reference¶
The gojira command-line interface provides commands for searching, retrieving, and managing Jira issues.
Installation¶
Commands¶
| Command | Description |
|---|---|
| search | Search issues with JQL |
| get | Get one or more issues by key |
| patch | Update issue fields |
| export | Export issues to JSON or XLSX |
| fields | List and filter custom fields |
| stats | Show issue statistics grouped by field |
| version | Show version information |
Global Flags¶
These flags are available on all commands:
| Flag | Short | Description |
|---|---|---|
--json |
-j |
Output as JSON (default) |
--table |
-t |
Output as human-readable table |
--toon |
Output as TOON (Token-Optimized Object Notation) | |
--creds-file |
Path to goauth credentials file | |
--account |
Account key in credentials file | |
--quiet |
-q |
Suppress non-essential output |
Output Formats¶
JSON (default)¶
Machine-readable JSON output, ideal for piping to jq or programmatic processing:
Table¶
Human-readable ASCII table:
Output:
TOON¶
Token-Optimized Object Notation - compact format optimized for LLM consumption:
TOON format uses abbreviated keys and is approximately 8x more token-efficient than JSON.
Authentication¶
The CLI authenticates in this order:
- CLI flags:
--creds-fileand--account - Environment variables:
JIRA_URL,JIRA_USER,JIRA_TOKEN - goauth file:
~/.config/goauth/credentials.json
See Authentication for details.
Exit Codes¶
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (authentication failure, API error, invalid arguments) |
Examples¶
# Search with environment variables
export JIRA_URL=https://your-instance.atlassian.net
export JIRA_USER=your-email@example.com
export JIRA_TOKEN=your-api-token
gojira search --jql "project = FOO"
# Search with credentials file
gojira search --jql "project = FOO" --creds-file ~/.config/goauth/creds.json --account myaccount
# Quiet mode (suppress progress messages)
gojira search --jql "project = FOO" -q