Skip to content

Latest commit

 

History

History
116 lines (83 loc) · 2.26 KB

README.md

File metadata and controls

116 lines (83 loc) · 2.26 KB

ghs

ghs - command-line utility for searching Github repositoy.

ghs options

[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)

Install

homebrew, linuxbrew

brew install sona-tar/tools/ghs

for Windows Releases sona-tar/ghs

Usage

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
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

  1. exec gpi QUERY
  2. filtering by peco
  3. clone repository by ghq

more

function gpr () {
  ghq list --full-path | peco | xargs rm -r
}
gpr

Contributors

kou-m

Author

sona-tar