github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jsmits / github-cli

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 61
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (4)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A command-line interface to the GitHub Issues API v2. — Read more

  cancel

http://jsmits.github.com/github-cli

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

factored out `sudo` in install commands in the docs 
Sander Smits (author)
Sun May 10 00:42:02 -0700 2009
commit  c5b4166976bbf94fc3f929cc369ce094bc02b88e
tree    24697878e9326d2bdf24d6fc8b016fd161128797
parent  8aa3c49712f2050901fc30818a7f58b65d1de522
github-cli /
name age
history
message
file .gitignore Fri May 08 01:30:51 -0700 2009 added .coverage produced by nosetests --with-co... [Sander Smits]
file LICENSE.txt Loading commit data...
file README.rst Sun May 10 00:42:02 -0700 2009 factored out `sudo` in install commands in the ... [Sander Smits]
directory docs/ Sun May 10 00:42:02 -0700 2009 factored out `sudo` in install commands in the ... [Sander Smits]
file setup.cfg Fri May 08 01:35:17 -0700 2009 added `testc` alias for running nose tests with... [Sander Smits]
file setup.py Sun May 10 00:42:02 -0700 2009 factored out `sudo` in install commands in the ... [Sander Smits]
directory src/ Fri May 08 10:14:11 -0700 2009 title and body width is now 79 columns, at most [Sander Smits]
directory tests/ Mon May 04 11:34:32 -0700 2009 improved testing by using `nose` [Sander Smits]
README.rst

GitHub Issues API v2 - command-line interface

about

github-cli provides a script called ghi, that can be used to access all of GitHub's documented Issues API (v2) functionality from your command-line

github-cli is written in Python

installation

on most UNIX-like systems, you'll probably need to run the following `install` commands as root or by using sudo

pip

pip install github-cli

easy_install

easy_install github-cli

from source

pip install -e git://github.com/jsmits/github-cli.git#egg=github-cli

or

git clone git://github.com/jsmits/github-cli.git
cd github-cli
python setup.py install

as a result, the ghi executable will be installed into a system bin directory

configuration

make sure your GitHub username and API token are added to the global git config:

git config --global github.user <your GitHub username>
git config --global github.token <your GitHub API token>

you can find the username and API token on your GitHub's account page

usage

inside a git working directory with an origin that is hosted on GitHub, you can do this (note: with the -r option, commands can be invoked from anywhere):

(github-cli)[jsmits@imac:~]$ ghi --help
Usage: ghi command [args] [options]

Examples:
ghi list [-s open|closed|all]       show open, closed or all issues
                                    (default: open)
ghi [-s o|c|a] -v                   same as above, but with issue details
ghi                                 same as: ghi list
ghi -v                              same as: ghi list -v
ghi [-s o|c] -w                     show issues' GitHub page in web browser
                                    (default: open)
ghi show <nr>                       show issue <nr>
ghi <nr>                            same as: ghi show <nr>
ghi <nr> -w                         show issue <nr>'s GitHub page in web
                                    browser
ghi open (o)                        create a new issue (with $EDITOR)
ghi close (c) <nr>                  close issue <nr>
ghi open (o) <nr>                   reopen issue <nr>
ghi edit (e) <nr>                   edit issue <nr> (with $EDITOR)
ghi label add (al) <label> <nr>     add <label> to issue <nr>
ghi label remove (rl) <label> <nr>  remove <label> from issue <nr>
ghi search (s) <term>               search for <term> (default: open)
ghi s <term> [-s o|c] -v            same as above, but with details
ghi s <term> -s closed              only search in closed issues
ghi comment (m) <nr>                create a comment for issue <nr>
                                    (with $EDITOR)
ghi -r <user>/<repo>                specify a repository (can be used for
                                    all commands)
ghi -r <repo>                       specify a repository (gets user from
                                    global git config)

Description: command-line interface to GitHub's Issues API (v2)

Options:
  -h, --help            show this help message and exit
  -v, --verbose         show issue details (only for list and search commands)
                        [default: False]
  -s STATE, --state=STATE
                        specify state (only for list and search (except `all`)
                        commands) choices are: open (o), closed (c), all (a)
                        [default: open]
  -r REPO, --repo=REPO, --repository=REPO
                        specify a repository (format: `user/repo` or just
                        `repo` (latter will get the user from the global git
                        config))
  -w, --web, --webbrowser
                        show issue(s) GitHub page in web browser (only for
                        list and show commands) [default: False]
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server