gh-get is a GitHub CLI based re-implementation of ghq.
gh extension install britter/gh-get
gh get OWNER/REPO
This will clone the repository identified by OWNER/REPO into $HOME/github/$OWNER/$REPO
.
Example:
gh get britter/gh-get
will clone this respository into ~/workspace/britter/gh-get
There are two environment variables that control the location gh-get clones repositories to:
GH_GET_FOLDER
: The name of the folder inside the user home that repositories are cloned into. The defaults togithub
which means repositories are cloned into$HOME/github
. If you prefer a different folder name or path inside your user home, configure this variable.GH_GET_ROOT
: The full path to to the folder that repositories are cloned into. This defaults to$HOME/$GH_GET_FOLDER
. Change this is you want repositories to be cloned to a location outside your user home.
Code is under the Apache Licence v2.