MCPcopy Index your code
hub / github.com/ankitpokhrel/jira-cli

github.com/ankitpokhrel/jira-cli @v1.7.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.7.0 ↗
890 symbols 3,548 edges 144 files 405 documented · 46%
README
<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>

Supporters

  <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

Supported platforms

[!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 LinuxmacOSFreeBSDNetBSDWindows
Jira Jira CloudJira Server

Installation

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.

Packaging status

Getting started

Cloud server

  1. Get a Jira API token and export it to your shell as a 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.
  2. Run jira init, select installation type as Cloud, and provide required details to generate a config file required for the tool.

On-premise installation

  1. Export required environment variables:
  2. If you are using basic auth, export the password you use to login to Jira as a JIRA_API_TOKEN variable.
  3. If you are using personal access token (PAT), get the 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.
  4. Add these ENVs to your shell configuration file, for instance, $HOME/.bashrc, so that they are always available.
  5. Alternatively, you can also use .netrc file or keychain to set the token. Learn more here.
  6. Run jira init, select installation type as Local, and provide the required details to generate a config file required for the tool.
  7. The most common auth type for on-premise installation is basic. If you are using your jira login credentials (username and password), select the basic auth type.
  8. If you want to use 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 for issuetypes. In that case, you will have to fill in epic.name, epic.link and issue.types.*.handle fields manually in the generated config to get the expected behavior.

See FAQs for frequently asked questions.

Authentication types

The tool supports basic, bearer (Personal Access Token), and mtls (Client Certificates) authentication types. Basic auth is used by default.

  • If you want to use PAT, you need to set JIRA_AUTH_TYPE as bearer.
  • If you want to use mtls run jira init. Select installation type Local, and then select authentication type as mtls.
  • In case JIRA_API_TOKEN variable is set it will be used together with mtls.

Shell completion

Check jira completion --help for more info on setting up a bash/zsh shell completion.

Multiple projects

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

Usage

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)

Navigation

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.

Resources

[!TIP] Like this tool? Checkout similar tool for Shopify!

Commands

Issue

Issues are displayed in an interactive table view by default. You can output the results in a plain view using the --plain flag.

List

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

Create

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

Create an issue

You can use a --custom flag to set custom fields while creating the issue. See [this post](https://github.com/ankitpokhrel/j

Extension points exported contracts — how you extend this code

TagOpener (Interface)
TagOpener is a tag opener. [2 implementers]
pkg/adf/adf.go
FlagParser (Interface)
FlagParser wraps pflag.FlagSet struct. [2 implementers]
internal/query/query.go
Filter (Interface)
Filter groups filterable config. [1 implementers]
pkg/jira/filter/filter.go
PreviewOption (FuncType)
PreviewOption is a functional option that wraps preview properties.
pkg/tui/preview.go
GroupFunc (FuncType)
GroupFunc groups AND and OR operators.
pkg/jql/jql.go
ProjectVersionOptions (FuncType)
ProjectVersionOptions is a functional option to wrap project version properties.
internal/view/release.go
TagCloser (Interface)
TagCloser is a tag closer. [2 implementers]
pkg/adf/adf.go
ClientFunc (FuncType)
ClientFunc decorates option for client.
pkg/jira/client.go

Core symbols most depended-on inside this repo

ExitIfError
called by 246
internal/cmdutil/utils.go
GetString
called by 140
internal/query/query.go
Close
called by 97
pkg/adf/adf.go
GetBool
called by 77
internal/query/query.go
Error
called by 61
pkg/jira/client.go
String
called by 58
internal/view/issue.go
NewClient
called by 51
pkg/jira/client.go
WithTimeout
called by 51
pkg/jira/client.go

Shape

Function 412
Method 300
Struct 142
FuncType 19
TypeAlias 10
Interface 7

Languages

Go100%

Modules by API surface

pkg/tui/table.go33 symbols
pkg/adf/adf.go30 symbols
pkg/jira/issue.go28 symbols
pkg/jira/client.go28 symbols
internal/config/generator.go26 symbols
pkg/md/jirawiki/parser.go23 symbols
internal/view/helper.go20 symbols
pkg/jql/jql.go19 symbols
pkg/tui/primitive/actionmodal.go17 symbols
internal/view/issue.go17 symbols
pkg/tui/preview.go16 symbols
internal/cmdutil/utils.go16 symbols

Dependencies from manifests, versioned

al.essio.dev/pkg/shellescapev1.6.0 · 1×
github.com/AlecAivazis/survey/v2v2.3.7 · 1×
github.com/atotto/clipboardv0.1.4 · 1×
github.com/aymanbagabas/go-osc52/v2v2.0.1 · 1×
github.com/aymerick/douceurv0.2.0 · 1×
github.com/charmbracelet/colorprofilev0.2.3-0.20250311203 · 1×
github.com/charmbracelet/x/ansiv0.8.0 · 1×
github.com/charmbracelet/x/cellbufv0.0.13 · 1×

Datastores touched

jiraDatabase · 1 repos

For agents

$ claude mcp add jira-cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact