ghad

A command-line tool for managing a large number of GitHub repositories

Usage no npm install needed!

<script type="module">
  import ghad from 'https://cdn.skypack.dev/ghad';
</script>

README

ghad: The GitHub Administration Tool

CircleCI

ghad is a command-line tool for managing a large number of GitHub repositories. It currently allows you to:

It can be run manually, or set up to run from a continuous integration system - see the CircleCI configuration.

Setup

  1. Install Node.js 10+.

  2. Create a token.

  3. Clone this repository.

  4. Set your GitHub token.

    export GITHUB_TOKEN=...
    
  5. View the documentation.

    npx ghad --help
    

Example usage

  1. Run the script as a dry run.

    npx ghad archive --org <something>
    
  2. To actually archive repositories:

    npx ghad archive --org <something> --apply
    

The --org is optional. See npx ghad archive --help for more info.

Usage in TTS

ghad is run across TTS GitHub repositories through the @tts-bot. See the CircleCI configuration.

Warning: Keep write access to this repository restricted. The associated GitHub token is that of an Owner, so being able to run arbitrary commands in CI allows privilege escalation.