26 releases (7 breaking)

Uses new Rust 2024

new 0.14.3 Apr 18, 2025
0.13.4 Mar 31, 2025
0.10.0 Nov 20, 2024

#74 in Configuration

Download history 255/week @ 2025-01-01 243/week @ 2025-01-08 15/week @ 2025-01-15 2/week @ 2025-02-05 32/week @ 2025-02-12 283/week @ 2025-02-26 25/week @ 2025-03-05 123/week @ 2025-03-12 104/week @ 2025-03-19 125/week @ 2025-03-26 36/week @ 2025-04-02 257/week @ 2025-04-09

528 downloads per month

Apache-2.0

3.5MB
50K SLoC

icon

JiRust-CLI

Component Build Crate docs rust-clippy npm
jirust-cli build and release jirust-cli Crate API rust-clippy analyze npm
jira_v3_openapi build and release jira_v3_openapi Crate API

JiRust-CLI will be a simple Jira CLI developed in Rust language. The main goals are

  • to provide a simple and easy way to interact with Jira using the terminal
  • to experience myself with Rust language
  • to provide an implementation of the Jira API in Rust I cannot find at the moment

Installation

To install it simply run:

cargo install jirust-cli

Usage

To use the CLI, simply run:

jirust-cli --help

And you will see the help message.

Starting from version 0.14.0 a WASM version of the library is available to be used in Node.js; you can refer to the following sample code (see the Rust docs for all the available options and parameters):

import { run } from "./pkg/jirust_cli.js";

let cmd = run(["project", "list"], {
  auth: {
    auth_token: "jira_auth_token",
  },
  jira: {
    jira_url: "https://jira.atlassian.net",
    standard_resolution: '{"name": "Done"}',
    standard_resolution_comment: "Autoresolved",
    transitions_names: { resolve: ["Resolve Issue"] },
  },
}).then((v, err) => {
  if (err) {
    console.error(err);
  } else {
    console.log(JSON.stringify(v));
    console.log("Done");
  }
});

And then you can run this node.js script using:

node jirust-cli-example.js

The sample code file is also included in the repository.

Configuration

To configure the CLI you need to create a configuration file in your home directory called .jirust-cli/jirust-cli.toml.

You cangenerate it (if the file doesn't exist the CLI will ask you to configure itself at the first run and the it will store the config in the file) by:

jirust-cli config setup

And you will be asked to insert the configuration parameters.

Features

The CLI is still under heavy development and the features are not complete. Currently the basic version management is implemented and you can:

  • list the versions of a project
  • create a new version
  • delete a version
  • update a version
  • release a version
  • archive a version
  • create a new project
  • list all the projects
  • list all the issue types available in a given project
  • list all the fields available in a given project for a given issue type
  • Create a new issue
  • Show an issue details
  • Update an issue (Not yet working, to be fixed)
  • Delete an issue
  • Transition an issue
  • Assign an issue
  • Link issues
  • List all the transitions available for an issue

Supported output formats are:

  • JSON (default)
  • Table

Development

The project is still under heavy development and I will prioritize the features I need the most for my daily programmer life. Use in production at your own risk. The content of the openapi Jira lib is automatically generated from the Jira API openapi file, retrieved form the official Jira API v3 docs:

openapi-generator-cli generate -g rust -o ~/git/priv/jirust-cli/jira_v3_openapi -i jira-v3-openapi-spec/swagger.v3.json --additional-properties=bestFitInt=true,preferUnsignedInt=true,supportMiddleware=true

Documentation

The documentation is generated using cargo doc --open and it will open the documentation in your browser. It is also available upon publish on jira_v3_openapi docs.rs for the Jira REST API v3 lib crate and on JiRust-CLI docs.rs for the lib crate used by the binary.. Since everything is still under heavy development the documentation is not complete and it will be updated as the project evolves. Please notice that jira_v3_openapi docs is autogenerated from the openapi file and it is not complete and not always correct, but I wouldn't spend time to improve it..

Also some of the jirust-cli documentation is auto-generated by AI, I will improve it every time I found something to be fixed inside it.

Release

Everything is currently released upon the crates.io platform, once new updates are available:

Roadmap

Next features to be integrated and supported are:

  • Update Jira issue: check if it works correctly

Those are mandatory for my work and I will prioritize them; other features will be added as needed. You can request a feature by opening an issue or you can provide an implementation compliant with what is currently developed in a PR.

License

Apache 2.0

Contribution

Feel free to contribute to the project. I will be happy to accept any help and suggestion on how to make the code better or even to integrate new features developed by the community.

Support the project

Since I work as developer and manager during the day, I will develop this project during the night and weekends, once I have time. If you want to support the project bringing me a coffee to keep me awake and coding, you can do it by clicking the link below:

ko-fi

Thank you for your support!

Dependencies

~20–35MB
~523K SLoC