Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 2.21 KB

README.md

File metadata and controls

55 lines (40 loc) · 2.21 KB

Octoherd CLI

CLI to run a custom script on one or multiple repositories

Octoherd Avatar

Usage

$ octoherd.js [script] [repos...]

Positionals:
  script  Path to *.js script. Must be an ES Module.
  repos   One or multiple arrays in the form of 'repo-owner/repo-name'.
          'repo-owner/*' will find all repositories for one owner. '*' will find
          all repositories the user has access to                  [default: []]

Options:
  --help                      Show help                                [boolean]
  --version                   Show version number                      [boolean]
  --octoherd-token            Requires the "public_repo" scope for public
                              repositories, "repo" scope for private
                              repositories.                  [string] [required]
  --octoherd-cache            Cache responses for debugging. Creates a ./cache
                              folder if flag is set. Override by passing custom
                              path                                      [string]
  --octoherd-debug            Show debug logs         [boolean] [default: false]
  --octoherd-bypass-confirms  Bypass prompts to confirm mutating requests
                                                      [boolean] [default: false]

The script must export a script function which takes three parameters:

export async function script(octokit, repository, options) {
  // do something here
}

Examples

Similar projects

License

ISC