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 🙏

© 2025 – Pkg Stats / Ryan Hefner

pr-monitor

v0.3.7

Published

Utility to show GitHub PRs on a specific list of repos.

Downloads

6

Readme

This started out as a xBar (formerly BitBar) plugin. I had spun off another script that output its data direct to the console for general purpose usage, then realized it needed more work.

It has evolved into a module wrapped in a terminal app that has configuration options, storing the Github token and repositories to track in preferences, or receiving them as parameters as a module.

Usage

As a module

Installation

npm i pr-monitor -g

const token = '<github Token>'
const repos = [ 'goodwid/github-pr-monitor' ]
const getData =  require('pr-monitor')
const options = { count: true }; // optional, defaults to false

getData(token, repos, options) // returns a JavaScript object
  .then(data => console.log(JSON.stringify(data, null, 2)))
  .catch(err => console.log(err))

The data object returned looks like:

{
  "count": 3,
  "data": {
    "repo1": [
      {
        "name": "alice",
        "branch": "branch1",
        "url": "https://github.com/...pull/298"
      },
      {
        "name": "bob",
        "branch": "branch2",
        "url": "https://github.com/...pull/292"
      }
    ],
    "repo2": [
      {
        "name": "cathy",
        "branch": "branch1",
        "url": "https://github.com/.../pull/97"
      }
    ]
  }
}

as a CLI app

Global installation

npm install pr-monitor -g

# PRs
Total PRs: 1

github-pr-monitor: goodwid on update-readme  https://github.com/goodwid/github-pr-monitor/pull/1

Help is available within the app:

# PRs --help

Usage: PRs [options] [command]

Show current pull requests for all configured repos.

Options:
  -V, --version          output the version number
  -b --bitBar            Outputs data in a format usable by bitBar.
  -t --terminal          Outputs data to the terminal.
  -j --json              Outputs data in JSON format.
  -x --xml               Outputs data in XML format.
  -c --count             Only show the number of PRs
  -N --nocolor           Omit colors in terminal output
  -h, --help             output usage information

Commands:
  config [options]       Configure the application
  show-config [options]  Display the current repositories monitored.
  clear [options]        Clears all current configuration data.

Subcommands

config

# PRs config --help
Usage: config [options]

Configure the application

Options:
  -g --githubToken <githubToken>  Github token to use for API call
  -a --addRepo <repoToAdd>        Add a repository to the monitor list
  -r --removeRepo <repoToRemove>  Remove a repository from the monitor list
  -d --defaultFormat <format>     Select a default format to use
  -h, --help                      output usage information

show-config

# PRs show-config --help
Usage: show-config [options]

Display the current repositories monitored.

Options:
  -s --showKeys  Displays the Github token as well
  -h, --help     output usage information

clear

# PRs clear --help
Usage: clear [options]

Clears all current configuration data.

Options:
  -g --githubToken  Removes just the Github token
  -r --repos        Removes just the repository data
  -h, --help        output usage information

To use this project with xBar

  • add your github token: pr-monitor config -g <token>
  • add your repository: pr-monitor config -a <org>/<repo>
  • set your default display pr-monitor config -d bitBar
  • create a symbolic link from your xbar dir to index.js: `ln -s pr-monitor /path/to/bitbar/github-pr-5m.js'

Author

👤 David Goodwin <[email protected]>

🤝 Contributing

Contributions, issues and feature requests are welcome !Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you !

📝 License

Copyright © 2019 David Goodwin <[email protected]>. This project is GPL-2.0-only licensed.


This README was generated with ❤️ by readme-md-generator