npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@octoherd/cli

v5.0.0

Published

CLI to run a custom script on one or multiple repositories

Downloads

2,934

Readme

Octoherd CLI

CLI to run a custom script on one or multiple repositories

Usage

Usage: octoherd run -S path/to/script.js [options]

Options:
      --help                      Show help                                            [boolean]
  -S, --octoherd-script           Path to *.js script. Must be an ES Module. [string] [required]
  -T, --octoherd-token            Requires the "public_repo" scope for public repositories, "rep
                                  o" scope for private repositories. Creates an OAuth token if n
                                  ot set.                                               [string]
  -R, --octoherd-repos            One or multiple repositories in the form of 'repo-owner/repo-n
                                  ame'. 'repo-owner/*' will find all repositories for one owner.
                                   '*' will find all repositories the user has access to.
                                  To exclude a repository use '!repo-owner/repo'. Will prompt
                                  for repositories if not set.                           [array]
      --octoherd-cache            Cache responses for debugging. Creates a ./cache folder if fla
                                  g 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]
      --octoherd-base-url         When using with GitHub Enterprise Server, set to the root URL 
                                  of the API. For example, if your GitHub Enterprise Server's h
                                  ostname is github.acme-inc.com, then set to https://github.ac
                                  me-inc.com/api/v3.                                    [string]
      --version                   Show version number                                  [boolean]

Examples:
  octoherd run -S path/to/script.js                 Minimal usage example
  octoherd run -S path/to/script.js -T $TOKEN  -R   Pass token and repos as CLI flags
  octoherd/cli
  octoherd run -S path/to/script.js -T $TOKEN  -R   Avoid prompts for token and repos
  octoherd/cli
  octoherd run -S path/to/script.js -T $TOKEN  -R   Avoid any prompts
  octoherd/cli --octoherd-bypass-confirms
  octoherd run -S path/to/script.js -T $TOKEN  -R   Will fetch all repositories except repo-owner/hello-world
  'repo-owner/*' -R '!repo-owner/hello-world
  octoherd run -S path/to/script.js                 Run octoherd script against GHES
  --octoherd-base-url 
  https://github.acme-inc.com/api/v3

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

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

Examples

  • https://github.com/topics/octoherd-script

Similar projects

License

ISC