✨ A GitHub CLI extension to fuzzy search your starred repositories & lists on GitHub, consume their README with your preferred tool and more.
gh-starred
is implemented as a bash
program.
Important
This extension has hard dependencies on the fzf
command-line fuzzy finder
and the JSON processing tool jq
.
Please ensure you have these installed before proceeding.
The instructions can be found here and here
for fzf
and jq
respectively.
Install by using the GitHub CLI:
gh extension install helibom/gh-starred
Uninstall by using the GitHub CLI:
gh extension remove starred
Make sure that you're authenticated to the GitHub CLI by first running gh auth login
and follow the prompted instructions.
Remind yourself of the available commands by running:
gh starred -h
# or
gh starred --help
Run the extension command without arguments to start searching your starred repositories:
gh starred
Select a repository by pressing Enter
to view the README of the selected repository.
By default, the README is displayed using the less
program.
You can configure the command used to view a README by running:
gh starred config --view <command>
For example, to use glow as your preferred viewer, you can configure like the example below:
gh starred config --view 'glow --pager'
Selecting a repository will now pipe the README to your configured viewer.
Typing ?
will preview the README of the selected repository beside the finder.
Type _
to hide the previewer.
You can configure the command used to preview a README inside the finder by running:
gh starred config --preview <command>
For example, to use bat as your preferred previewer, you can configure it like the example below:
gh starred config --preview 'batcat --color=always --language md'
Note
In order for colors to work in the preview,
your command must preserve ANSI color codes when redirected, hence the --color=always
flag.
Pressing Ctrl-T
inside the finder will open the selected repository in your default browser.