gh - github cli
gh - github cli
install github-cli
brew install ghconfigure options
the config is stored in ~/.config/gh/config.yml
set pager
gh config set pager catconfigure editor
gh config set editor "code --wait"github stars
list all starred repos
GH_PAGER="" gh api user/starred --paginate --jq '.[].full_name'removed starred repo
turns out, you can’t unstar a repo on the web which was taken down by a DMCA request
gh api -X DELETE user/starred/username/repomanage pull requests
list pull requests
gh pr list(squash) merge and delete remote branch
replace 23 with your pr id
gh pr merge 23 --auto -s -dclose without merging and delete remote branch
replace 42 with your pr id
gh pr close 42 -dlist repositories without a description
list all your own repos which are not archived and are missing a description
gh repo list --source --no-archived -L 1000 \
--json nameWithOwner,description \
--jq '.[] | select((.description == null) or (.description == "")) | .nameWithOwner'