0.0.15 • Published 8 years ago
github-command v0.0.15
Install
[sudo] pip install github-command
[sudo] sudo npm install -g github-command
Requirements
$GITHUBTOKEN environment variable
Usage
# github --help
usage: github COMMAND [options]
Available commands:
curl github api via curl
body github api body
headers github api headers
curl-test test connection and $GITHUBTOKEN
ratelimit api RateLimit Remaining
create create github repo
description get/set description
homepage get/set homepage
delete delete github repo
remote github remotes list
fullname owner/repo
open open github url (OS X only)
purge purge readme images
ssh-test test ssh
run `github help COMMAND` for more infos
Example
# $GITHUBTOKEN requred (~/.githubtoken, ~/.tokens/github)
$ GITHUBTOKEN="$(cat ~/.githubtoken)" || exit
$ export GITHUBTOKEN="$GITHUBTOKEN"
$ github curl https://api.github.com/
$ github body https://api.github.com/
$ github headers https://api.github.com/
# repo commands
$ fullname="owner/repo"
$ cd /path/to/repo
$ git remote add github https://github.com/"$fullname"
$ github create "$fullname"
# description
$ github description "$fullname" "new description"
$ github description "$fullname"
new description
# homepage
$ github homepage "$fullname" "https://owner.github.io"
$ github homepage "$fullname"
https://owner.github.io
# open
$ cd /path/to/repo
$ github open
+ open https://github.com/owner/repo
# delete
$ cd /path/to/repo
$ github delete
# tests, debug
$ github test && github ratelimit
Links
- cURL man page - curl.haxx.se/docs/manpage.html
- Creating an access token - help.github.com/articles/creating-an-access-token-for-command-line-use/
- GitHub API - developer.github.com/v3/