Skip to content

CLI to list all repos a user has access to, and report on their configuration in aggregate.

License

Notifications You must be signed in to change notification settings

ljharb/repo-report

repo-report Version Badge

github actions coverage License Downloads

npm badge

CLI to list all repos a user has access to, and report on their configuration in aggregate.

Installation

  • npm install to install all dependencies
  • create .env file and initialize GH_TOKEN or GITHUB_TOKEN (in order of precedence) with your Github token

Getting Started

Creating a Personal Access Token (PAT)

  1. Go to GitHub Tokens Settings.
  2. Click Generate new token.
  3. Give it a descriptive name (e.g., "my repo-report token").
  4. Select the repo scope.
  5. Generate the token and copy it.

Using your PAT with Repo-Report

  • You can set your token as an environment variable in your terminal:
  • run export GH_TOKEN=<your_personal_access_token>

OR you can add it to a .env file in the project root:

  • run GH_TOKEN=your_personal_access_token

Usage (for public)

  • After you generated your PAT you can open terminal then do the following:
  • on the terminal run export GH_TOKEN=<the personal access token generated>
  • run npx repo-report

Usage (for Contributors)

  • execute ./bin/run to get a report of all your repositories in the terminal

Running Repo-Report with npx repo-report --help

  1. --help
  • Show all available flags and usage examples.
  1. --unactionable
  • Shows metrics you can’t change
  1. --actual
  • Shows raw values instead of a ✅ or ❌
  1. --goodness
  • Shows if a metric is "good" (✅) or "bad" (❌)
  1. -m, --metrics
  • Lists available metrics.
  1. --all
  • Shows ALL metrics (Even ones that aren't actionable)
  1. -p, --pick
  • Lets you select specific metrics
  1. -f, --focus
  • Filters by repo type such as sources, forks, templates, private or public
  1. --names
  • Shows repo names alongside their owners
  1. -s, --sort
  • Sorts by "last updated date" by default; can be set to name or created instead.
  1. -desc
  • Sorts descending instead of ascending.
  1. --cache
  • Saves API request data in --cacheDir.

Optional (but helpful)

  • If you would like an extended and more detailed view of your repos you can use:
  • npx repo-report --all --actual
  • If you would like to have this be the default view whenever you run repo-report, you can run with:
  • alias repo-report='npx repo-report --all --actual
  • then run source ~/.bashrc

Repo-Report Dashboard

The following shows an example output of repo-report --all --actual for my repositories. It shows important repository settings like issues, projects, branch protection, and allowed merge strategies. Additional details such as auto-merge, branch deletion on merge, and license information are also included in the full output as seen by the extended table below.

Repo-Report Dashboard Example

About

CLI to list all repos a user has access to, and report on their configuration in aggregate.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors 16