ghs
- command-line utility for searching Github repositoy.
[sona ~]$ ghs --help
Usage:
ghs [OPTION] "QUERY"
Application Options:
-s, --sort= The sort field. 'stars', 'forks', or 'updated'. (best match)
-o, --order= The sort order. 'asc' or 'desc'. (desc)
-l, --language= searches repositories based on the language they’re written in.
-u, --user= limits searches to a specific user name.
-r, --repo= limits searches to a specific repository.
-v, --version print version infomation and exit.
-e, --enterprise= search from github enterprise.
Help Options:
-h, --help Show this help message
Github search APIv3 QUERY infomation:
https://developer.github.com/v3/search/
https://help.github.com/articles/searching-repositories/
Version:
ghs 0.0.4 (https://github.com/sona-tar/ghs.git)
brew install sona-tar/tools/ghs
for Windows Releases sona-tar/ghs
basic usage. default search target.(name, description and readme)
ghs "dotfiles"
You can restrict the search to just the repository name.
ghs "dotfiles in:name"
Limits searches to a specific user.
ghs "dotfiles in:name" -u sona-tar
sona-tar/dotfiles dotfiles
With motemen/ghq and peco/peco
ghs QUERY | peco | awk '{print $1}' | ghq import
crate zsh function
function gpi () {
[ "$#" -eq 0 ] && echo "Usage : gpi QUERY" && return 1
ghs "$@" | peco | awk '{print $1}' | ghq import
}
gpi usage
- exec gpi QUERY
- filtering by peco
- clone repository by ghq
function gpr () {
ghq list --full-path | peco | xargs rm -r
}
gpr