LinuxCommandLibrary

jira

Manage Jira issues and projects

TLDR

List recent issues

$ jira issue list
copy

List issues from the current sprint, assigned to me
$ jira sprint list --current -a$(jira me)
copy

Create a new issue, optionally set a parent issue
$ jira issue create --parent [parent]
copy

SYNOPSIS

jira [global_options] <command> [command_options] [arguments]

Examples of common usage:
  jira issue create --project <PROJECT> --summary <SUMMARY_TEXT>
  jira issue view <ISSUE_KEY>
  jira search "assignee = currentUser() AND status = 'To Do'"
  jira transition <ISSUE_KEY> --transition "Done"
  jira comment add <ISSUE_KEY> --message "Completed this task today."

PARAMETERS

--help, -h
    Displays help information for the command or a specific subcommand.

--version
    Shows the version of the Jira CLI tool currently installed.

--server <URL>
    Specifies the base URL of the Jira instance to connect to. This is often configured once.

--user <USERNAME>
    Provides the Jira username for authentication.

--password <PASSWORD>
    Provides the Jira password for authentication. Less secure; API tokens are preferred.

--token <TOKEN>
    Uses a Personal Access Token (PAT) or API token for more secure authentication.

<command>
    The specific operation to perform (e.g., issue, search, transition, comment, configure).

--project <KEY>
    Specifies the project key (e.g., 'PROJ') for operations like issue creation or filtering.

--summary <TEXT>
    Sets the summary (short description or title) for a new Jira issue.

--description <TEXT>
    Provides the detailed description for a Jira issue.

--assignee <USERNAME>
    Assigns an issue to a specific Jira user.

--issue <KEY>
    Refers to a specific Jira issue key (e.g., 'PROJ-123') for viewing, updating, or commenting.

--transition <NAME>
    Specifies the name of the workflow transition to apply to an issue (e.g., 'Done', 'In Progress').

--message <TEXT>
    The content of a comment to add to an issue.

--jql <QUERY>
    A Jira Query Language (JQL) string used for searching and filtering issues.

DESCRIPTION

The jira command, typically provided by third-party command-line interface (CLI) tools, enables users to interact with Atlassian Jira instances directly from their Linux terminal. It is not a standard utility included with most Linux distributions but rather a specialized client for the Jira platform. These tools streamline workflows by allowing the creation, viewing, updating, and transitioning of issues, adding comments, performing searches, and managing projects without needing to access the web interface. Designed for developers, system administrators, and power users, the jira command facilitates automation through scripting, integration into CI/CD pipelines, and efficient management of large numbers of Jira tasks, significantly enhancing productivity for teams leveraging Jira.

CAVEATS

The jira command is typically a third-party tool and not part of the standard Linux utility set. Therefore, it requires manual installation (e.g., via pip for Python-based tools or package managers for other versions). Proper configuration, including the Jira server URL and authentication credentials (like API tokens or personal access tokens), is essential before use. Its exact syntax and available commands can vary significantly between different CLI implementations (e.g., Python-based, Go-based, Node.js-based tools), so users should consult the specific tool's documentation. Security implications of storing credentials on the command line or in configuration files should be carefully considered.

INSTALLATION AND CONFIGURATION

Before using a jira CLI tool, it typically requires initial setup. This often involves running a command like pip install jira-cli (for Python-based tools) or downloading a pre-compiled binary. Post-installation, users usually need to run a jira configure command or manually edit a configuration file (e.g., ~/.jira.d/config.yml) to provide their Jira server URL, username, and an API token or personal access token for authentication. Some tools support environment variables for sensitive information.

COMMON USE CASES

The jira command is extensively used for:

  • Automating Issue Creation: Scripting the creation of tasks from other systems, monitoring tools, or logs.
  • Reporting & Analytics: Fetching issue data in bulk for custom reports and data analysis.
  • Workflow Automation: Automatically transitioning issues based on external events (e.g., Git commits, CI/CD build status, external system updates).
  • Batch Operations: Updating or commenting on multiple issues simultaneously based on specific criteria.
  • Quick Lookups: Rapidly checking issue status, details, or assignments without leaving the terminal.

HISTORY

The emergence of jira command-line tools is a natural progression driven by the widespread adoption of Atlassian Jira for project management and issue tracking. As organizations increasingly automate workflows and integrate development processes with CI/CD pipelines, the demand for programmatic access to Jira grew. While Atlassian provides a comprehensive REST API, direct command-line clients were developed by the community to abstract the complexities of HTTP requests and JSON parsing, offering a simpler, more intuitive interface for power users and scripters. These tools typically started appearing in the late 2000s and early 2010s, evolving with Jira's features and API versions to provide robust, efficient, and scriptable interactions with the platform.

SEE ALSO

curl(1), git(1), jq(1), ssh(1)

Copied to clipboard