Can I add issues to github from the command line?
Asked Answered
B

6

36

I'm new to git and I'd like to be able to map plans and progress for my project through github.

The problem is, that requires lots of clicking around with a browser on github.com, and I'd like to be able to automate the task somewhat by using a command line program.

Is there a command line interface for github?

Begrime answered 12/6, 2012 at 18:48 Comment(1)
The options have changed since the last answer. See current options here: https://mcmap.net/q/421528/-can-i-add-issues-to-github-from-the-command-lineIgnoramus
S
11

You could check out this cli for the Github issues API. Note this is specific to Github Issues only.

Hope this helps.

[edit] The original answer mentioned this application which doesn't function anymore and recommends ghi.

Seligman answered 12/6, 2012 at 18:51 Comment(1)
Note that ghi is using a deprecated Github API and will likely stop working November 2020. The current (May 2020) recommendation should be cli.github.com, as per @Xavier's answer.Disney
A
22

There's a ghi gem that you can use to manage issues.

The most commonly used ghi commands are:
   list        List your issues (or a repository's)
   show        Show an issue's details
   open        Open (or reopen) an issue
   close       Close an issue
   edit        Modify an existing issue
   comment     Leave a comment on an issue
   label       Create, list, modify, or delete labels
   assign      Assign an issue to yourself (or someone else)
   milestone   Manage project milestones
Averment answered 12/6, 2012 at 18:53 Comment(0)
F
14

With Github's new official CLI (command line interface):

gh issue create --title "How to create an issue?" --body "I need a github CLI"

See additional details and options and installation instructions.

Fda answered 27/4, 2020 at 16:52 Comment(0)
S
11

You could check out this cli for the Github issues API. Note this is specific to Github Issues only.

Hope this helps.

[edit] The original answer mentioned this application which doesn't function anymore and recommends ghi.

Seligman answered 12/6, 2012 at 18:51 Comment(1)
Note that ghi is using a deprecated Github API and will likely stop working November 2020. The current (May 2020) recommendation should be cli.github.com, as per @Xavier's answer.Disney
B
1

There is a github_cli gem that I'm working on that provides command line access to the entire GitHub API v3. Please give it a try and report any issue/thoughts/feature requests.

Botfly answered 22/6, 2012 at 23:14 Comment(0)
W
1

NodeGH - Github command line tools. Let's you create new issue, comment, open or close. You can find all the commands available at their Github repo.

Worship answered 30/6, 2014 at 17:36 Comment(0)
I
1

You have 3 options:

  1. Use the official command line interface supported by github:

    Tutorial: http://pythonhosted.org/hub/

    Github repo: https://github.com/github/hub (~12k stars)

  2. Use the NodeH interface:

    Tutorial: http://nodegh.io/

    Github repo: https://github.com/node-gh/gh

  3. Use the ghi interface:

    Tutorial and Github repo: https://github.com/stephencelis/ghi/

All 3 look cool. The hub app looks like it has the most stars and is officially supported by github. So its most likely to be maintained for the long term. So, if I were looking for a solution that would be supported for a long term, I would go with option#1: hub

Ignoramus answered 21/2, 2018 at 18:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.