3

I need a command line client for Jira. What would you recommend?

Requirements:

  • Open/close/comment a JIRA issue
  • OS: Ubuntu
  • preferably installable via apt
  • usable (not low level) interface
  • interactive mode (like jira-cli (JavaScript) provides)
  • browsing
    • issues
    • sprints
    • backlogs
    • etc.
  • searching in issues, comments
  • issus management
    • create issue
    • change issue state, etc.
    • close issue
  • issue editing
    • edit issue
    • comment on issue

Not required:

  • no need for helpdesk

Possible choices:

6
  • What operations should it cover? Open/close/comment a JIRA issue? Should it cover JIRA Helpdesk too?
    – Nicolas Raoul
    Commented Nov 27, 2018 at 11:15
  • @albert: Most of them do not satisfy the second requirement.
    – Nicolas Raoul
    Commented Nov 27, 2018 at 11:17
  • Strange my previous comment disappeared (I didn't remove it, at least to the best of my knowledge) Question was more or less whether or not OP had googled for "Command line client for Jira" ? and why the results provided are not OK for him. @NicolasRaoul I did expect indeed that the 2nd requirement was not fulfilled but I think this should have been more explicit (or explained why the default installation possibilities are not OK for OP).
    – albert
    Commented Nov 27, 2018 at 11:35
  • @albert: I actually deleted the comment per meta.stackexchange.com/questions/76195/… but don't hesitate to ask "Have you tried X and why was it not OK for you" if there are some obvious values of X. Cheers! :-)
    – Nicolas Raoul
    Commented Nov 27, 2018 at 11:49
  • @albert I already asked google. However StackExchange Software Recommendations is exactly about... well software recommendations given specific requirements :)
    – thinwybk
    Commented Nov 27, 2018 at 11:50

3 Answers 3

3

I've been working on (and using) this command-line utility for the past few months since I was looking for a similar tool but couldn't find any to satisy my needs. It is still a work in progress and releases are not available yet but it is fairly easy to install if you have golang installed.

There are lots of useful features like:

  • Interactive Mode + also an option to easily integrate with shell/automation scripts.
  • Easy search and navigation. For instance, you can easily search something like "Issues that are of high priority, is in progress, was created this month, and has given labels" with jira issue list -yHigh -s"In Progress" --created month -lbackend -l"high prio"
  • Creating a neat Jira ticket (and comment) using Github-flavored + Jira-flavored markdown as a template.
  • Ticket description is beautifully displayed in the terminal as a markdown.
  • Easy sprint and epic navigation. You can quickly view previous, current, and next sprint tickets using flags like --prev, --next and --current eg: jira sprint list --current.

Feedbacks/suggestions are welcome!

2

I would really recomend that you make some python script... This way you have much more controll over the logic of execution plus python is installed in ubuntu by default... And you get the bonus to learn a litle bit a programming in awesome python :)

I have been using this lib in production and has not failed me...

from jira import JIRA

api = JIRA(
    server="https://jira.atlassian.com", # company root jira address
    basic_auth=("username","password")
)

jiraIssues = this.api.search_issues(f'project = MAB AND status = "TESTING"')

for jiraIssue in jiraIssues:
    print(jiraIssue)    

You can install it with this command...

pip install jira

You can even use it in shell :D

> $ jirashell -s http://jira.atlassian.com <JIRA Shell
> (http://jira.atlassian.com)>
> 
> *** JIRA shell active; client is in 'jira'. Press Ctrl-D to exit.
> 
> In [1]: issue = jira.issue('JRA-1330')
> 
> In [2]: issue. issue.delete  issue.fields  issue.id      issue.raw    
> issue.update issue.expand  issue.find    issue.key     issue.self
> 
> In [2]: issue.fields. issue.fields.aggregateprogress             
> issue.fields.customfield_11531 issue.fields.aggregatetimeestimate     
> issue.fields.customfield_11631
> issue.fields.aggregatetimeoriginalestimate 
> issue.fields.customfield_11930 issue.fields.aggregatetimespent        
> issue.fields.customfield_12130
1
  • Yeah, Python is awesome. However writing a script seemed avoidable overhead to me. go-jira seems most suitable for me right now.
    – thinwybk
    Commented Jan 20, 2019 at 15:15
2

For now I stick to go-jira. It's the most powerful, most configurable alternative which can be installed as executable binary. To manage the extensive command line interface I recommend to define mnemonic keybindings. For the most often used commands it's a good idea to define functions for the shell of your choice as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.