<a href="#">
<img alt="stargazers over time" src="https://stars.medv.io/ankitpokhrel/jira-cli.svg" />
</a>
<h1 align="center">JiraCLI</h1>
<a href="https://github.com/ankitpokhrel/jira-cli/actions?query=workflow%3Abuild+branch%3Amaster">
<img alt="Build" src="https://img.shields.io/github/actions/workflow/status/ankitpokhrel/jira-cli/ci.yml?branch=main&style=flat-square" />
</a>
<a href="https://goreportcard.com/report/github.com/ankitpokhrel/jira-cli">
<img alt="GO Report-card" src="https://goreportcard.com/badge/github.com/ankitpokhrel/jira-cli?style=flat-square" />
</a>
<a href="https://github.com/ankitpokhrel/jira-cli/blob/master/LICENSE">
<img alt="Software License" src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square" />
</a>
<a href="#">
<img alt="Downloads" src="https://img.shields.io/github/downloads/ankitpokhrel/jira-cli/total?style=flat-square" />
</a>
<a href="https://opencollective.com/jira-cli#backers">
<img alt="Financial Contributors" src="https://img.shields.io/opencollective/backers/jira-cli?style=flat-square" />
</a>
<i>Feature-rich Interactive Jira Command Line</i>
<img align="center" alt="JiraCLI Demo" src="https://github.com/ankitpokhrel/jira-cli/raw/v1.7.0/github/assets/demo.gif" />
<sub>
Financial support from private and corporate sponsors ensures the tool's continued development.
Please <a href="https://opencollective.com/jira-cli#backers">consider sponsoring the project</a> if you or your company rely on JiraCLI.
</sub>
<a href="https://opencollective.com/jira-cli#backers" target="_blank">
<img src="https://opencollective.com/jira-cli/backers.svg" alt="jira-cli open collective badge">
</a>
<a href="https://www.atlassian.com?from=ankitpokhrel/jira-cli" target="_blank">
<img alt="Atlassian Logo" src="https://github.com/ankitpokhrel/jira-cli/raw/v1.7.0/github/assets/supporters/atlassian.png" />
</a>
<a href="https://www.jetbrains.com/?from=ankitpokhrel/jira-cli" target="_blank">
<img alt="JetBrains Logo" src="https://github.com/ankitpokhrel/jira-cli/raw/v1.7.0/github/assets/supporters/jetbrains.png" />
</a>
JiraCLI is an interactive command line tool for Atlassian Jira that will help you avoid 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 cloud installation versus on-premise installation 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:latest
Follow 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-premise 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
// Or, you can use `--config/-c` flag
$ jira issue list -c ./local_jira_config.yaml
The 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.
- Use arrow keys or j, k, h, l characters to navigate through the list.
- Use g and G to quickly navigate to the top and bottom respectively.
- Use CTRL + f to scroll through a page downwards direction.
- Use CTRL + b to scroll through a page in upwards direction.
- Press v to view selected issue details.
- Press m to transition the selected issue.
- Press CTRL + r or F5 to refresh the issues list.
- Hit ENTER to open the selected issue in the browser.
- Press c to copy issue URL to the system clipboard. This requires xclip / xsel in linux.
- Press CTRL + k to copy issue key to the system clipboard.
- In an explorer view, press w or TAB to toggle focus between the sidebar and the contents screen.
- Press q / ESC / CTRL + c to quit.
- Press ? to open the help window.
[!TIP] Like this tool? Checkout similar tool for Shopify!
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.
# List recent issues
$ jira issue list
# List issues created in last 7 days
$ jira issue list --created -7d
# List issues in status "To Do"
$ jira issue list -s"To Do"
# List recent issues in plain mode
$ jira issue list --plain
# List recent issues in raw JSON format
$ jira issue list --raw
# List recent issues in csv format
$ jira issue list --csv
# List issue in the same order as you see in the UI
$ jira issue list --order-by rank --reverse
# You can execute raw JQL within a given project context using `--jql/-q` option.
# For instance, the following command will list issues in the current project whose
# summary has a word cli.
$ jira issue list -q "summary ~ cli"
Check some more examples/use-cases below.
List issues that I am watching
jira issue list -w
List issues assigned to me
jira issue list -a$(jira me)
List issues assigned to a user and are reported by another user
jira issue list -a"User A" -r"User B"
List issues assigned to me, is of high priority and is open
jira issue list -a$(jira me) -yHigh -sopen
List issues assigned to no one and are created this week
jira issue list -ax --created week
List issues with resolution won't do
jira issue list -R"Won't do"
List issues whose status is not done and is created before 6 months and is assigned to someone
# Tilde (~) acts as a not operator
jira issue list -s~Done --created-before -24w -a~x
List issues created within an hour and updated in the last 30 minutes :stopwatch:
jira issue list --created -1h --updated -30m
Give me issues that are of high priority, are in progress, were created this month, and have given labels :fire:
jira issue list -yHigh -s"In Progress" --created month -lbackend -l"high-prio"
Wait, what was that ticket I opened earlier today? :tired_face:
sh
jira issue list --history
What was the first issue I ever reported on the current board? :thinking:
jira issue list -r$(jira me) --reverse
What was the first bug I ever fixed in the current board? :beetle:
jira issue list -a$(jira me) -tBug sDone -rFixed --reverse
What issues did I report this week? :man_shrugging:
jira issue list -r$(jira me) --created week
Am I watching any tickets in project XYZ? :monocle_face:
jira issue list -w -pXYZ
The 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-input
To 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-42

You can use a --custom flag to set custom fields while creating the issue. See [this post](https://github.com/ankitpokhrel/j
$ claude mcp add jira-cli \
-- python -m otcore.mcp_server <graph>