github-cli extension allowing to manage multiple github repositories at once https://git.ciepiela.org/dawid/gh-gr
  • Go 99.2%
  • Shell 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dawid Ciepiela 9f8848d37e
All checks were successful
coverage: test_and_report / test_and_report 14.1%
test_and_report / Test gh-gr (push) Successful in 1m59s
Merge pull request 'chore: the README's pictures in Git LFS' (#164) from screenshots-lfs into main
Reviewed-on: #164
2026-11-20 17:56:25 +00:00
.cspell upgrade to go 1.23.4 2024-12-26 13:42:31 +01:00
.forgejo/workflows ci: pull requests tested too, the results and coverage as a comment on them 2026-11-20 14:14:25 +01:00
.github CI: do not install gopls 2026-10-30 12:38:18 +01:00
cmd/gh-gr doc (#85) 2024-01-26 14:49:34 +01:00
doc chore: the README's pictures in Git LFS 2026-11-20 18:46:54 +01:00
pkg fix(deps): update module github.com/dlclark/regexp2 to v2 (#140) 2026-05-11 19:16:25 +02:00
scripts fix bad reference (#71) 2023-11-15 13:12:11 +01:00
vendor fix(deps): update module github.com/sarumaj/go-super to v1.0.3 2026-11-19 09:21:18 +00:00
.cz.toml ci: the release bot's Commitizen configuration 2026-11-05 19:29:55 +01:00
.gitattributes chore: the README's pictures in Git LFS 2026-11-20 18:46:54 +01:00
.gitignore Initial commit 2023-09-30 15:25:40 +02:00
CHANGELOG.md chore(release): 2.8.6 2026-11-09 06:30:05 +00:00
cspell.config.yaml added unit tests 2024-08-30 22:12:56 +02:00
go.mod fix(deps): update module github.com/sarumaj/go-super to v1.0.3 2026-11-19 09:21:18 +00:00
go.sum fix(deps): update module github.com/sarumaj/go-super to v1.0.3 2026-11-19 09:21:18 +00:00
LICENSE Initial commit 2023-09-30 15:25:40 +02:00
README.md docs(readme): replace retired and obsolete badges 2026-11-09 22:46:22 +01:00
renovate.json Adapt to Forgejo: Renovate preset, Forgejo CI 2026-10-07 16:46:24 +00:00

test_and_report Maintainability Go Reference Go version Release Downloads (all assets, all releases)


gh-gr

gh-gr is a GitHub repository management tool based on the project github-repo by Cristian Henzel.

Since the original project used a configuration file containing sensitive information, the issue has been addressed by reinventing the tool as an extension to the github cli (gh).

gh-gr demo

Installation

Prerequisites: github cli (gh)

To install gr:

$ gh extension install https://github.com/sarumaj/gh-gr

Usage

$ gh gr --help

> gr is a gh cli extension allowing management of multiple repositories at once
>
> Usage:
>   gr [flags]
>   gr [command]
>
> Examples:
>   gh gr --concurrency 100 --timeout "20s" <subcommand>
>
> Available Commands:
>   cleanup     Clean up untracked local repositories
>   completion  Generate the autocompletion script for the specified shell
>   edit        Edit configuration
>   export      Export current configuration to stdout
>   help        Help about any command
>   import      Import configuration from stdin or a file
>   init        Initialize repository mirror
>   pull        Pull all repositories
>   push        Push all repositories
>   remove      Remove current configuration
>   status      Show status for all repositories
>   update      Update configuration
>   version     Display version information
>   view        Display current configuration
>
> Flags:
>   -c, --concurrency uint   Concurrency for concurrent jobs (default 12)
>   -h, --help               help for gr
>   -t, --timeout duration   Set timeout for long running jobs (default 10m0s)
>
> Use "gr [command] --help" for more information about a command.

First, create the configuration:

$ gh gr init -d SOMEDIR -c 10

or, if you are willing to exclude some repositories, you can use regular expressions:

$ gh gr init -c 10 -d SOMEDIR -e ".*repo1" -e "SOMEORG/repo-.*" -s

Run gh gr init --help or gh gr help init to retrieve more information about the init command.

After the configuration is created, you can pull all repositories using:

$ gh gr pull

you can view the status of the repositories using:

$ gh gr status

and you can push all repositories using:

$ gh gr push

After creating new repositories on the server or after user data changes, you can update the local configuration using:

$ gh gr update

Acknowledgments