Feature-rich interactive Jira command line.
JiraCLI is an interactive command line tool for Atlassian Jira that will help you avoid using the Jira UI to some extent. This tool may not be able to do everything, but it has all the essential features required to improve your day-to-day workflow with Jira.
The tool started with the idea of making issue search and navigation as straightforward as possible. However, with the help of outstanding supporters like you, we evolved, and the tool now includes all necessary features like issue creation, cloning, linking, ticket transition, and much more.
This tool is heavily inspired by the GitHub CLI
[!NOTE] Some features might work slightly differently in Jira Cloud versus on-premises installations due to the nature of the data. Yet, we've attempted to make the experience as similar as possible.
| Platform | |
|---|---|
| Jira |
jira-cli is available as a downloadable packaged binary for Linux, macOS, and Windows from the releases page.
You can use Docker to quickly try out jira-cli.
docker run -it --rm ghcr.io/ankitpokhrel/jira-cli:latestFollow the installation guide for other installation methods like Homebrew, Nix, etc.
JIRA_API_TOKEN variable. Add it to your shell configuration file, for instance, $HOME/.bashrc, so that the
variable is always available. Alternatively, you can also use .netrc file or keychain to set the token. Learn
more here.jira init, select installation type as Cloud, and provide required details to generate a config file required
for the tool.password you use to login to Jira as a JIRA_API_TOKEN variable.token from your Jira profile and export it as
a JIRA_API_TOKEN variable. In addition to this, set JIRA_AUTH_TYPE env to bearer.$HOME/.bashrc, so that they are always available..netrc file or keychain to set the token. Learn
more here.jira init, select installation type as Local, and provide the required details to generate a config file required
for the tool.basic. If you are using your Jira login credentials
(username and password), select the basic auth type.mtls (client certificates), select auth type mtls and provide the CA Cert, client Key, and client cert.[!IMPORTANT] If your on-premises Jira installation is using a language other than
English, then the issue/epic creation may not work because the older version of Jira API doesn't return the untranslated name forissuetypes. In that case, you will have to fill inepic.name,epic.linkandissue.types.*.handlefields manually in the generated config to get the expected behavior.
See FAQs for frequently asked questions.
The tool supports basic, bearer (Personal Access Token), and mtls (Client Certificates) authentication types. Basic auth is used by
default.
JIRA_AUTH_TYPE as bearer.mtls run jira init. Select installation type Local, and then select authentication type as mtls.JIRA_API_TOKEN variable is set it will be used together with mtls.Check jira completion --help for more info on setting up a Bash/Zsh shell completion.
You can load a specific configuration file by using the --config/-c flag, or by setting the JIRA_CONFIG_FILE environment variable to specify the file's location.
$ JIRA_CONFIG_FILE=./local_jira_config.yaml jira issue list
# Alternatively, use the `--config/-c` flag
$ jira issue list -c ./local_jira_config.yamlThe tool currently comes with an issue, epic, and sprint explorer. The flags are POSIX-compliant.
You can combine available flags in any order to create a unique query. For example, the command below will give you high priority issues created this month
with status To Do that are assigned to you and has the label backend.
jira issue list -yHigh -s"To Do" --created month -lbackend -a$(jira me)The lists are displayed in an interactive UI by default.
j, k, h, l characters to navigate through the list.g and G to quickly navigate to the top and bottom respectively.CTRL + f to scroll through a page downwards direction.CTRL + b to scroll through a page in upwards direction.v to view selected issue details.m to transition the selected issue.CTRL + r or F5 to refresh the issues list.ENTER to open the selected issue in the browser.c to copy issue URL to the system clipboard. This requires xclip / xsel on Linux.CTRL + k to copy issue key to the system clipboard.w or TAB to toggle focus between the sidebar and the contents screen.q / ESC / CTRL + c to quit.? to open the help window.Issues are displayed in an interactive table view by default. You can output the results in a plain view using the --plain flag.
The list command lets you search and navigate the issues. The issues are sorted by created field in descending order by default.
…Check some more examples/use-cases below.
List issues that I am watchingjira issue list -wjira issue list -a$(jira me)jira issue list -a"User A" -r"User B"jira issue list -a$(jira me) -yHigh -sopenjira issue list -ax --created weekjira issue list -R"Won't do"# Tilde (~) acts as a not operator
jira issue list -s~Done --created-before -24w -a~xjira issue list --created -1h --updated -30mjira issue list -yHigh -s"In Progress" --created month -lbackend -l"high-prio"jira issue list --historyjira issue list -r$(jira me) --reversejira issue list -a$(jira me) -tBug -sDone -rFixed --reversejira issue list -r$(jira me) --created weekjira issue list -w -pXYZThe create command lets you create an issue.
# Create an issue using an interactive prompt
$ jira issue create
# Pass required parameters and use --no-input option to skip prompt
$ jira issue create -tBug -s"New Bug" -yHigh -lbug -lurgent -b"Bug description" --fix-version v2.0 --no-inputTo attach epic to an issue on creation, you can use -P/--parent field. We call it parent because the semantics of epic
has been changed in next-gen project.
# Create an issue of type Story and attach it to epic with key EPIC-42
$ jira issue create -tStory -s"Epic during creation" -PEPIC-42You can use a --custom flag to set custom fields while creating the issue. See this post for more details.
The command supports both GitHub-flavored
and Jira-flavored Markdown for writing
description. You can load pre-defined templates using --template flag.
# Load description from template file
$ jira issue create --template /path/to/template.tmpl
# Get description from standard input
$ jira issue create --template -
# Or, use pipe to read input directly from standard input
$ echo "Description from stdin" | jira issue create -s"Summary" -tTaskThe preview above shows a Markdown template passed in JiraCLI and how it is rendered in the Jira UI.
The edit command lets you edit an issue.
$ jira issue edit ISSUE-1
# Edit issue in the configured project
$ jira issue edit ISSUE-1 -s"New Bug" -yHigh -lbug -lurgent -CBackend -b"Bug description"
# Use --no-input option to disable interactive prompt
$ jira issue edit ISSUE-1 -s"New updated summary" --no-input
# Use minus (-) to remove label, component or fixVersion
# For instance, to edit issue to
# - remove label p2, component FE, fixVersion v1.0
# - add label p1, component BE, fixVersion v2.0
$ jira issue edit ISSUE-1 --label -p2 --label p1 --component -FE --component BE --fix-version -v1.0 --fix-version v2.0The assign command lets you assign a user to an issue.
# Assign user to an issue using an interactive prompt
$ jira issue assign
# Pass required parameters to skip prompt
$ jira issue assign ISSUE-1 "Jon Doe"
# Assign to self
$ jira issue assign ISSUE-1 $(jira me)
# Will prompt for selection if keyword suffix returns multiple entries
$ jira issue assign ISSUE-1 suffix
# Assign to default assignee
$ jira issue assign ISSUE-1 default
# Unassign
$ jira issue assign ISSUE-1 xThe move command lets you transition an issue from one state to another.
# Move an issue using an interactive prompt
$ jira issue move
# Pass required parameters to skip prompt
$ jira issue move ISSUE-1 "In Progress"If your workflow allows to add comment, resolution or assignee while moving an issue, you can do s
No open issues yet, or sync has not completed.