Skip to content
/ ghs Public

'ghs' is a command-line utility for searching Github repository .

Notifications You must be signed in to change notification settings

sonatard/ghs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
sona-tar
Jun 21, 2015
a1eafc2 · Jun 21, 2015

History

26 Commits
Jun 5, 2015
Oct 26, 2014
Jun 4, 2015
Jun 4, 2015
Jun 4, 2015
Jun 21, 2015
May 15, 2015
Jun 4, 2015

Repository files navigation

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

About

'ghs' is a command-line utility for searching Github repository .

Resources

Stars

Watchers

Forks

Packages

No packages published