github-cli

Command-line access to GitHub via the API (v3)


Project maintained by sigmavirus24 Hosted on GitHub Pages — Theme by mattgraham

github-cli

Build Status

This tool provides partial itneraction with GitHub and its API from the command line. This tool is far from complete or comprehensive.

Dependencies

Current Usage

If you would like command completion, look in the completion directory for your shell of choice. If you don't see one for your shell, feel free to send a pull request adding one! Note: The current bash completion is imperfect so feel free to improve on it and send pull requests.

To get a comprehensive look at the following commands, use their help pages like below.

help

$ gh help
# Alternatively gh -h
$ gh help follow
$ gh help fork
$ gh help gists
$ gh help issues
$ gh help my
$ gh help pulls
$ gh help repos
$ gh help unfollow

create.gist

$ echo "This is stdin" | gh create.gist -
$ gh create.gist -d "Public gist" file1.rb file2.rb file3.rb
$ gh create.gist -p -d "Private gist" file1.py file2.py file3.py

create.issue

$ gh create.issue -t "Some new issue I found"

create.pull

$ gh create.pull -i 4 base head
$ gh create.pull -t 'Awesome new feature!' base head

create.repo

$ gh create.repo new_project
$ gh create.repo -o orgname other_project

follow

$ gh follow kennethreitz
$ gh follow sigmavirus24

fork

$ gh fork kennethreitz/requests
$ gh fork sigmavirus24/github3.py
$ gh fork sigmavirus24/github-cli

gists

$ gh gists
$ gh gists -u sigmavirus24

issues

$ cd path/to/repo/on/GitHub
$ gh issues
$ gh -r sigmavirus24/github3.py issues
$ gh -r sigmavirus24/github3.py issues 48
$ gh issues 48 close
$ gh issues 48 reopen
$ gh issues 48 comment
$ gh issues 48 comments

my

$ gh my notifications
$ gh my dashboard
$ gh my issues
$ gh my stars
$ gh my profile

pulls

$ cd path/to/repo/on/GitHub
$ gh pulls
$ gh pulls 48 merge
$ gh pulls 48 close
$ gh pulls 48 comments

repos

$ gh repos

unfollow

$ gh unfollow sigmavirus24

License

GPLv3