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 & NPM

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 power of JIRA API to perform all the different actions and queries.

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

  • JIRA host (example.atlassian.net)
  • User name
  • Password
  • Enable https protocol

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

$ jira

Examples

Here comes the best part, 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 issue jira i
Open issue in browser jira open <issue key> jira o <issue key>

Note: You will only see data you have access to

Config

As seen in the Getting Started, we use a config file to save some user configuration data like username, password among other data. We have created some commands to manipulate this file, and some of the options include to update username & password.

Update config file

Host

You can update the JIRA host using the config host command:

$ jira config host 'your host'

Username

You can update your user name using the config username command:

$ jira config username 'your username'

Password

You can update your password using the config password command:

$ jira config password

Remove config file

You can easily remove config file using the remove option:

$ jira config remove

Boards

A board displays issues from one or more projects, you can view, manage, and report on work in progress.

Note: If you need more information about how to create boards you can check Creating a board.

Set default board

You can set a default board this way:

$ jira config 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.

Note: If you need more information about issues you can check What is an issue.

Create issues

Let's have some fun, create a new issue

$ jira create

Then just choose the project where you want to create your issue and We're done. Easy, right?

List issues

Get the latest issues asigned to you

jira i

Note: If you already created a issue but you don't assigned it check assign issues.

Project issues

A positive thing about consult issues is that you can filter the search by projects

jira i -p 'project-key'

Note: If you don't know the project key, don't worry... check out list projects.

User issues

You can searh issues by user assigned too.

jira i -u 'username'

Note: If you don't know what users are available just check list users.

Assign issues to users

Let's assign some taks to someone, check this out.

jira i 'issue-key' -a 'username'

Note: If you don't know what users are available just check list users.

Make issue transitions

Make issue transitions.

jira i 'issue-key' -t

Note: If there is only one choice the command will make the transition automatically.

Projects

A JIRA project is a collection of issues, and is defined according to your organisation's requirements. For example, a JIRA project could be:

  • a software development project
  • a marketing campaign
  • a helpdesk system
  • a leave request management system
  • a website enhancement request system

Note: If you need more information about projects you can check What is a project.

List projects

If do you wanna know what projects are on way just use this.

jira p

Users

In order for a user to log in and access a JIRA application, they must have application access. Application access is obtained by being a member of a group assigned to an application.

Note: If you need more information about users you can check Manage users.

List users

Let's know who is in the team!

jira u

Versions

Versions are points-in-time for a project. They help you schedule and organize your releases. Once a version is created and issues are assigned to it, you can use several reports.

Note: If you need more information about versions you can check Managing versions.

List project versions

Let's list the project versions

jira v 'project-key'

Note: If you don't know the project key, don't worry... check out list projects.

Create project versions

Let's create a project versions

jira v 'project-key' 'version-number' <optional parameters>

Optional parameters

Parameter Option Example
Description -d <Project Key> jira version PK -d "Description"
Start date -s <Date in "d/MMM/yy" format> jira version PK -s "13/Aug/2017"
Release date -r <Date in "d/MMM/yy" format> jira version PK -r "13/Aug/2017"

Note: If you don't know the project key, don't worry... check out list projects.