acli
Common Atlassian CLI (acli) commands for Jira operations
Atlassian CLI (acli) Quick Reference
Common acli commands for Jira operations used across this project's workflows.
Prerequisites
aclimust be installed and authenticated:acli jira auth login --web- Check auth status:
acli jira auth status
Key Flag for Subcommands
The view command accepts the issue key as a positional argument, but subcommands like comment list, comment create, transition, edit, etc. require the --key flag:
acli jira workitem view PROJ-123 # positional OK
acli jira workitem comment list --key PROJ-123 # --key required
acli jira workitem comment create --key PROJ-123 --body … # --key required
View Issue Details
acli jira workitem view PROJ-123
With all fields (description, comments, etc.):
acli jira workitem view PROJ-123 --fields "*all"
JSON output for parsing:
acli jira workitem view PROJ-123 --json
Specific fields only:
acli jira workitem view PROJ-123 --fields "summary,status,priority,description,comment"
Search Issues with JQL
acli jira workitem search --jql 'summary ~ "CVE-2024-1234" AND summary ~ "repo-name"' --json
Search by text across all fields:
acli jira workitem search --jql 'text ~ "search terms" AND key != PROJ-123' --json
Search by component:
acli jira workitem search --jql 'component = "my-component" AND key != PROJ-123' --json
Search recently resolved issues:
acli jira workitem search --jql 'text ~ "search terms" AND status in (Resolved, Done, Closed) AND resolved >= -30d' --json
Limit results and select fields:
acli jira workitem search --jql 'project = PROJ' --fields "key,summary,status" --limit 20 --json
Add Comment to Issue
acli jira workitem comment create --key PROJ-123 --body "Comment text here"
Multi-line comment from a file:
acli jira workitem comment create --key PROJ-123 --body-file comment.txt
List Comments on Issue
acli jira workitem comment list --key PROJ-123 --json
Or via the view command:
acli jira workitem view PROJ-123 --fields "comment" --json
Transition Issue Status
First check available transitions:
acli jira workitem view PROJ-123 --fields "status" --json
Then transition:
acli jira workitem transition --key PROJ-123 --status "Done"
acli jira workitem transition --key PROJ-123 --status "In Progress"
acli jira workitem transition --key PROJ-123 --status "Resolved"
Create Issue
acli jira workitem create --project PROJ --type Bug --summary "Bug title" --description "Description"
With assignee and labels:
acli jira workitem create --project PROJ --type Task --summary "Title" \
--assignee "[email protected]" --label "bug,triage"
Edit Issue
acli jira workitem edit --key PROJ-123 --summary "Updated summary"
acli jira workitem edit --key PROJ-123 --assignee "@me"
ADF Formatting (Rich Text Descriptions)
The --description and --description-file flags only accept plain text. To set a rich-text description with headings, code blocks, lists, etc., use --from-json with Atlassian Document Format (ADF).
Generate a sample JSON template:
acli jira workitem create --generate-json
acli jira workitem edit --generate-json
Creating with ADF
Write a JSON file with the ADF description field, then use --from-json:
acli jira workitem create --from-json workitem.json
Editing with ADF
Write a JSON file with issues and description fields:
{
"issues": ["PROJ-123"],
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "heading",
"attrs": {"level": 2},
"content": [{"type": "text", "text": "Section Title"}]
},
{
"type": "paragraph",
"content": [
{"type": "text", "text": "Normal text and "},
{"type": "text", "text": "inline code", "marks": [{"type": "code"}]},
{"type": "text", "text": " in a paragraph."}
]
},
{
"type": "codeBlock",
"attrs": {"language": "json"},
"content": [{"type": "text", "text": "{\"key\": \"value\"}"}]
},
{
"type": "bulletList",
"content": [
{"type": "listItem", "content": [{"type": "paragraph", "content": [{"type": "text", "text": "Bullet item"}]}]}
]
},
{
"type": "orderedList",
"content": [
{"type": "listItem", "content": [{"type": "paragraph", "content": [{"type": "text", "text": "Numbered item"}]}]}
]
}
]
}
}
Then apply:
acli jira workitem edit --from-json workitem.json --yes
ADF Node Reference
| Node | Usage |
|---|---|
heading | attrs.level: 1-6 |
paragraph | Container for text nodes |
codeBlock | attrs.language: json, bash, etc. |
bulletList | Contains listItem nodes |
orderedList | Contains listItem nodes |
text | marks: code, strong, em, link |
Known Limitations
--descriptionand--description-filedo NOT render wiki markup or markdown — they produce plain text only- Comment creation (
comment create) does not support ADF; comment update does via--body-adf
List Projects
acli jira project list