gh-select

Options

Every flag the picker accepts, with its environment variable and default.

View as Markdown

Options configure the picker and go with gh select alone. A flag always wins over its environment variable. An empty value keeps the built-in default.

gh select [options]
OptionVariableDefaultEffect
-n, --no-cachenoneoffskip the cache and fetch fresh data
-d, --dir DIRGH_SELECT_CLONE_DIRcurrent directoryclone into DIR/REPO
--download-dir DIRGH_SELECT_DOWNLOAD_DIRcurrent directorysave release assets and files into DIR
-p, --print-pathnoneoffprint the picked repo's path on stdout, cloning it first if needed
--theme NAMEGH_SELECT_THEMEgruvboxcolor theme
--border NAMEGH_SELECT_BORDERnonepanel border style
--icons NAMEGH_SELECT_ICONSnerdnerd or none
--transparentGH_SELECT_TRANSPARENToffkeep the terminal's background

-n, --no-cache

Skips the cached repository list and fetches before the screen opens. The fresh list is saved afterwards. Starred repositories keep their own cache. See caching.

-d, --dir DIR

The root for new clones. A leading ~ is expanded. The folder is created when needed, and a clone lands in DIR/REPO, not DIR/OWNER/REPO. The root is also searched for existing clones. See cloning and local clones.

--download-dir DIR

Where release assets and files saved from the tree browser go. A leading ~ is expanded. Existing files are never overwritten. See releases and saving files.

-p, --print-path

On enter, skips the action menu, clones the repository when it is not on disk, and prints its absolute path on stdout. The screen and git's progress move to stderr. Quitting without a pick exits 130. See scripting.

--theme NAME

One of the built-in themes or a custom theme from ~/.config/gh-select/themes/NAME.json. Names are case-insensitive. An unknown name fails with unknown theme "NAME" (valid: ...) and lists the valid ones.

Built-in
catppuccin, dracula, everforest, graphite, gruvbox, kanagawa, nord, rose-pine, solarized, tokyonight

Setting it pins the theme: ctrl+t cycles for the session but does not save. See themes.

--border NAME

none, hidden, rounded, sharp, double or thick. none draws panels without frames, and the others add boxes. hidden keeps the bordered layout without drawing the frame.

--icons NAME

nerd draws Nerd Font glyphs for private, fork, archived, local and star markers. none replaces them with words.

--transparent

Does not paint the theme's background, so the terminal's shows through. The environment variable counts as set for any non-empty value.

Writing a flag

Flags take --name value, --name=value and -name value. A flag that needs a value and gets none fails with --dir needs a value.

Examples

gh select -d ~/code --theme nord
gh select --border rounded --icons none
gh select -n
cd "$(gh select -p)"
Edit this page on GitHub

Last updated on

On this page