Jira CLI
Work with Jira issues efficiently using the jira CLI.
Quick Start
List your assigned issues:
bash
jira issue list -a$(jira me) --plain
Core Workflows
List Issues
Find issues with various filters:
bash
# Your open issues jira issue list -a$(jira me) -s~Resolved --plain # High priority bugs jira issue list -tBug -yHigh # Created this week jira issue list --created week # With specific labels jira issue list -lbackend -lcritical # Raw JQL query jira issue list -q"project = PROJ AND sprint in openSprints()"
Create Issue
Create new issues with required and optional fields:
bash
# Interactive mode (prompts for fields) jira issue create # Quick creation with flags jira issue create -tBug -s"Login fails on mobile" -yHigh -b"Users report..." # With labels and components jira issue create -tStory -s"Add dark mode" -lux -lfrontend -CFrontend # Attach task to an epic jira issue create -tTask -PEPIC-123 -s"Implement feature X" # Attach story to an epic jira issue create -tStory -PEPIC-123 -s"User can do Y" # Sub-task (requires parent) jira issue create -t"Sub-task" -PISSUE-123 -s"Write tests"
View Issue
Display issue details:
bash
# Interactive view jira issue view ISSUE-1 # Plain text output jira issue view ISSUE-1 --plain # Show 5 comments jira issue view ISSUE-1 --comments 5 # Raw JSON (useful for custom fields) jira issue view ISSUE-1 --raw
Edit Issue
Update existing issues:
bash
# Interactive edit jira issue edit ISSUE-1 # Quick updates jira issue edit ISSUE-1 -yHigh -s"Updated title" # Add/remove labels (use minus to remove) jira issue edit ISSUE-1 -lurgent -l-wontfix # Reassign jira issue edit ISSUE-1 -ajohn.doe@company.com
Custom Fields
Work with custom fields (see references/custom-fields.md for details):
bash
# Set custom fields on create jira issue create -tStory -s"Title" --custom story-points=5 # Update custom fields jira issue edit ISSUE-1 --custom severity=Critical --custom "found in version"="2.1.0"
Other Operations
Transitions
bash
# Move issue to different status jira issue move ISSUE-1 # With specific transition jira issue move ISSUE-1 "In Progress"
Comments
bash
# Add comment jira issue comment add ISSUE-1 "This is my comment" # List comments jira issue comment list ISSUE-1
Assignment
bash
# Assign to user jira issue assign ISSUE-1 jane.doe@company.com # Assign to yourself jira issue assign ISSUE-1 $(jira me) # Unassign jira issue assign ISSUE-1 x
Delete
bash
jira issue delete ISSUE-1
Output Formats
Control output format based on use case:
bash
# Interactive list (default) jira issue list # Plain table jira issue list --plain # Specific columns jira issue list --plain --columns KEY,SUMMARY,STATUS,ASSIGNEE # CSV export jira issue list --csv > issues.csv # Raw JSON jira issue list --raw
Useful Patterns
Filter Combinations
bash
# Your in-progress work jira issue list -a$(jira me) -s"In Progress" --plain # Unassigned high-priority bugs jira issue list -tBug -yHigh -ax --plain # Recently updated (last 2 days) jira issue list --updated -2d # Exclude resolved/closed jira issue list -s~Resolved -s~Closed
Bulk Operations
bash
# List issues as JSON and process
jira issue list -a$(jira me) --raw | jq -r '.issues[].key' | while read key; do
echo "Processing $key"
jira issue edit "$key" -lprocessed --no-input
done
Tips
- •Use
$(jira me)to reference current user - •Use
~prefix to exclude values (e.g.,-s~Done) - •Use
xas assignee to indicate "unassigned" - •Use
-Pto attach issues to epics or create sub-tasks - •Add
--plainfor scriptable output - •Add
--no-inputto skip interactive prompts - •Check exit codes for automation ($? = 0 for success)