⚙️ Simple GitHub CLI extension to list all (own|starred) repositories.
- Python 3 (
python3
)- supported versions:
3.12
,3.11
,3.10
,3.9
and3.8
- supported versions:
Install:
gh ext install gh640/gh-repo-list
Output sample:
Cloning into '/xxx/.local/share/gh/extensions/gh-repo-list'...
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 41 (delta 15), reused 30 (delta 8), pack-reused 0
Receiving objects: 100% (41/41), 7.79 KiB | 2.60 MiB/s, done.
Resolving deltas: 100% (15/15), done.
✓ Installed extension gh640/gh-repo-list
Uninstall:
gh ext remove gh640/gh-repo-list
gh repo-list --help
usage: List up all repositories. [-h] --type {viewer-status,own,starred}
options:
-h, --help show this help message and exit
--type {viewer-status,own,starred}
The option --type
is required.
List up own repositories:
gh repo-list --type=own
List up starred repositories:
gh repo-list --type=starred
Search and open a repo in browser:
gh repo view -w $(gh repo-list --type=own | fzf | rg -o '^\S+')
Search and view the README:
gh repo view $(gh repo-list --type=own | fzf | rg -o '^\S+')
Archive multiple repositories which starts with prefix-
(Check the target repositories before running the command):
for repo in $(gh repo-list --type=own | rg -o '^username/prefix-\S+'); do
gh repo archive -y $repo
done