/glonner-cli

A ๐Ÿ” "glutton" CLI, which devours repositories within a GitHub organization. Use it with precaution. ๐Ÿ‘€

Primary LanguageGoApache License 2.0Apache-2.0

CI: Container CI: CLI CLI-Release

Glonner CLI

cli-logo

A "glutton" Gopher mutant ๐ŸงŸโ€โ™‚๏ธ that helps in cloning massively certain (or all) repositoriesof a given GitHub organization.
Use it with precautions.

Explore the docs ยป

ยท Report Bug ยท Request Feature


Table of Contents
  1. About The Project
  2. Getting Started
  3. Installation
  4. Usage
  5. Roadmap
  6. Contact

About The Project

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.

What it does?

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.

Commands

Features commands

Command Description
glonner clone Clones all the repositories of a given organization.
glonner list List all the repositories of a given organization.

Required options

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 the dry-run option, set with the flag --dry-run. This option will print the list of repositories that would be cloned, without actually cloning them.

(back to top)

Getting Started

There are some prerequisites to get started with this project. Ready and follow the instructions below.

For Developers & Contributors ๐Ÿš€

Follow this guide to setup the project locally.

For Users ๐Ÿง‘โ€๐Ÿ’ป

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.

(back to top)

Installation

Using Homebrew

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

Usage

Roadmap

  • โค๏ธ 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.

(back to top)

Contact

made/with โค๏ธ ๐ŸคŸ