Introduction

JIRA CLI is a JIRA command line client written in JavaScript and running on top of Node.js, it will help you to easily manage issues, projects, users and much more!

Requirements

In order to run this project you’ll need to have installed Node.js

Installation

You can install JIRA CLI globally in your computer with npm like this:

npm install -g jira-cl

Getting started

JIRA CLI uses the jira rest API to perform all the different actions and queries.

When running the first time, it will ask you for:

After that a new config file will be created in "~/.jira-cli.json", you can create or modify this file manually. In order to run this initial setup you just need to enter the main command:

jira

Examples

After you have made the initial setup you can test one of the following commands:

Description Command Alias
List your open issues jira issue jira i
Create new issue jira create
List projects jira project jira p
List users jira user jira u
Open issue in browser jira open <issue key> jira o <issue key>

Note: You will only see data you have access to

Configuration

As seen in the Getting Started, we use a config file to save the user auth data in your computer. There are some commands to manipulate this file.

jira config <command>
Description Command
Update the JIRA host host
Update username username
Remove config file remove
Set default board board --set

Issues

Depending on how your organization is using JIRA, an issue could represent a software bug, a project task, a helpdesk ticket, a leave request form, etc.

By default jira issue or jira i shows all the open issues assigned to you.

jira issue <command> [options]
Commands
Description Command
Create a new issue create
Options
Description Option Alias
Filter issues by project --project <project key> -p <project key>
Filter issues by user name --user <project key> -u <project key>
Filter issues by release --release <release name> -r <release name>

Issue Actions

We can also access to specific issue actions by inserting the issue id.

jira issue <issue key> [options]
Description Command Alias
Assign issue to user --assign <username> -a <username>
Execute issue transition
if no transition name is passed it executes the next avaialble.
--transition [transition name] -t [transition name]
Assign issue to user --assign <username> -a <username>

Projects

Access to JIRA projects data, go here if you want to know more about what projects.

List all projects

The jira project command allows you to list all your JIRA projects, you can also use its alias jira p

jira project

Example output

Key    Name             
EP     Example Project          
AW     Awesome Project 
HD     Help Desk               

Users

Access to your JIRA users data, the user command allows you to list all your JIRA users, you can also use its alias u.

jira user

Versions

List your project versions by passing the project key after the version command.

jira version <project key>

Example output

Name     Status       Release Date 
v1.0.0   Released     2017-03-14   
v1.3.0   Released     2018-08-01   
v2.0.0   Unreleased                

Creating Versions

You can also create versions by passing the number version you want to create as parameter like this:

jira version <project key> <version number> [options]

Options

You can set the description, start and release date by passing the following options:

Description Option Example
Version detail --description <project key> <description> jira version PK -d "Description"
Start date --start-date <date in "d/MMM/yy" format> jira version PK -s "13/Aug/2017"
Release date --release-date <date in "d/MMM/yy" format> jira version PK -r "13/Aug/2017"