Skip to content

A GitHub CLI extension that fuzzy searches, previews and browses your starred repositories & lists.

License

Notifications You must be signed in to change notification settings

helibom/gh-starred

Repository files navigation

GitHub Starred

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

Table of Contents

Installation

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

Usage

Make sure that you're authenticated to the GitHub CLI by first running gh auth login and follow the prompted instructions.

Help

Remind yourself of the available commands by running:

gh starred -h
# or 
gh starred --help

Fuzzy Search Starred Repositories

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.

Basic usage

Configure Command Used to View READMEs

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.

Configuration of viewer

Preview READMEs in the Finder

Typing ? will preview the README of the selected repository beside the finder.

Type _ to hide the previewer.

Preview README in finder

Configure Preview Command in Finder

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.

Configure previewer

Open the Repository in the Browser

Pressing Ctrl-T inside the finder will open the selected repository in your default browser.

Configure previewer

About

A GitHub CLI extension that fuzzy searches, previews and browses your starred repositories & lists.

Topics

Resources

License

Stars

Watchers

Forks

Languages