sarumaj / gh-gr

github-cli extension allowing to manage multiple github repositories at once

Home Page:https://pkg.go.dev/github.com/sarumaj/gh-gr/v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test_and_report build_and_release Go Report Card Maintainability Test Coverage Go Reference Go version Release Release Date Commits since latest release Downloads (all assets, all releases) Downloads (all assets, latest release)


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

About

github-cli extension allowing to manage multiple github repositories at once

https://pkg.go.dev/github.com/sarumaj/gh-gr/v2

License:MIT License


Languages

Language:Go 99.2%Language:Shell 0.8%