gh-starlist

A GitHub CLI extension for GitHub Star List
For information on the GitHub API we're using, see QUERIES.md.
Installation
gh extension install eggplants/gh-starlist
gh auth refresh -h github.com -s user
Usage
$ gh starlist list
NAME SLUG REPOS VISIBILITY DESCRIPTION
CLI/TUI cli-tui 7 public
Python Utils python-utils 9 public Handy python libraries
$ gh starlist view cli-tui
REPOSITORY STARS LANGUAGE DESCRIPTION
dandavison/delta 31830 Rust A syntax-highlighting pager for git, diff, ...
tomnomnom/gf 2139 Go A wrapper around grep, to help you grep for things
$ gh starlist create "Rust Tools" -d "Things written in Rust" --private
$ gh starlist add rust-tools BurntSushi/ripgrep sharkdp/fd
$ gh starlist remove rust-tools sharkdp/fd
$ gh starlist edit rust-tools --name "Rust CLI" --public
$ gh starlist delete rust-cli
A list is addressed by its name or by its slug, case-insensitively: cli-tui, CLI/TUI and cli/tui all mean the same list.
Commands
| Command |
Description |
gh starlist list |
List star lists |
gh starlist view <list> |
Show the repositories in a list |
gh starlist create <name> |
Create a list (-d, --private) |
gh starlist edit <list> |
Change name, description or visibility |
gh starlist delete <list> |
Delete a list (--yes to skip the prompt) |
gh starlist add <list> <repo>... |
Add repositories to a list |
gh starlist remove <list> <repo>... |
Remove repositories from a list |
gh starlist export |
Export every list as Markdown or JSON |
list and view take --json for scripting, and --user to read someone else's lists (their private lists are never visible):
gh starlist list --user zhuozhiyongde --json | jq -r '.[].slug'
gh starlist view rdf --json | jq -r '.repos[].nameWithOwner'
Export
export renders every list, plus the starred repositories that are in no list, as a Markdown document with a table of contents:
gh starlist export -o STARS.md
gh starlist export --sort name --no-uncategorized
gh starlist export --format json | jq '.[] | {name, count: (.repos | length)}'
With --template, the generated Markdown replaces the <!-- gh-starlist-export --> placeholder of a template file, so the output can be dropped into an existing README:
gh starlist export --template template/template.md -o README.md
License
MIT