A "glutton" Gopher mutant π§ββοΈ that helps in cloning massively certain (or all) repositoriesof a given GitHub organization.
Use it with precautions.
Table of Contents
It was created due to some lazziness and the need to clone all the repositories of a given organization. If you are looking for a more in-depth explanation of the project, sorry there isn't. π€·π»ββοΈ Some important details:
- It is a CLI tool.
- The term 'organization' and 'owner', in the context of GitHub, are used interchangeably.
- Depending on the size (amount of repositories) of the organization, the cloning process can take a while.
It browses through all the repositories of a given organization and clones them locally. It also creates a glonner.json
file with the information of the repositories that were cloned. This file is used to keep track of the repositories that were cloned and to avoid cloning them again. If you want to clone all the repositories again, you can use the --force
flag.
Command | Description |
---|---|
glonner clone |
Clones all the repositories of a given organization. |
glonner list |
List all the repositories of a given organization. |
These options are required, in order to operate with the above commands.
Command | Description |
---|---|
organization |
GitHub organization from which the repositories will be fetched from. Mapped to the option org (E.g.: --org="cloudposse" ). Also, it can be set as an environment variable: GITHUB_ORG . |
token |
Personal access token used to authenticate against the target GitHub organization.. |
NOTE: For the
clone
command, it's supported thedry-run
option, set with the flag--dry-run
. This option will print the list of repositories that would be cloned, without actually cloning them.
There are some prerequisites to get started with this project. Ready and follow the instructions below.
Follow this guide to setup the project locally.
If you want to clone repositories, it is as simple as running:
$ glonner clone --org="gruntwork-io" --token="your-token"
or
$ GITHUB_ORG="gruntwork-io" GITHUB_TOKEN="your-token" glonner clone
If you only want to list, and take a look to a given set of repositories, within an organization, you can run:
$ glonner list --org="gruntwork-io" --token="your-token"
or
$ GITHUB_ORG="gruntwork-io" GITHUB_TOKEN="your-token" glonner list
NOTE: For advanced options, and more information, please refer to the
help
command, running:glonner --help
.
brew tap Excoriate/homebrew-tap
brew install glonner
Or, if you have TaskFile installed, it's the same method, just wrapping it with it:
task install
- β€οΈ Add Daeger as a 'portable' approach for CI and CD respectively.
- β€οΈ Add Unit Test coverage.
- β€οΈ Add a built-in configuration, using 'Viper', to keep tack of local repositories cloned.
- β€οΈοΈ Add a way to selectively clone repositories, based on a given set of criteria.
- β€οΈοΈ Allow custom output formats. Currently, it's supporting only 'table'. Potential formats: 'json', 'yaml', 'csv', etc.
- β€οΈοΈ Add a storage/capacity check, for larger organizations and less-space-in-disk sort of machines.
See the open issues for a full list of proposed features (and known issues). Also, your contributions are more than welcome β just ensure following the contributing guidelines.
made/with β€οΈ π€