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

gh-index

v0.0.2

Published

Calculate h-index of a GitHub user's repo stars

Downloads

13

Readme

gh-index

Calculate h-index of a GitHub user's repo stars

npm npm GitHub last commit GitHub code size in bytes license

TL;DR

npm i -g gh-index
# Generate a token at https://github.com/settings/tokens
echo the-token > ~/.gh-index
gh-index                          # h-index of myself
gh-index -a                       # other indexes of myself
gh-index [-a] /mutual             # ... of my followers intersect following
gh-index [-a] /friends            # ... of my followers union following
gh-index [-a] /followers          # ... of my followers
gh-index [-a] /followings         # ... of my following
gh-index [-a] b1f6c1c4 IoriOikawa # ... of some one(s) else
gh-index show-limit               # check how many API calls left

Usage

gh-index [show-limit | who..]

Calculate h-index of Github users

Commands:
  gh-index    show-limit       Show GitHub API usage and limit
  gh-index    analyze [who..]  Calculate h-index of Github users       [default]

Positionals:
  who  <username>{,/mutual[s],/friends,/followers,/following}           [string]

Options:
  --version       Show version number                                  [boolean]
  --token-file    Github token file for full control of private repos, see
                  https://github.com/settings/tokens
                                               [string] [default: "~/.gh-index"]
  -t, --token     Github token for full control of private repos, see
                  https://github.com/settings/tokens                    [string]
  --help          Show help                                            [boolean]
  -a, --all       Also calculate g-index and others   [boolean] [default: false]
  -j, --json      Show in json format                 [boolean] [default: false]
  -l, --list      List repos that has more stars than the owner's h-index
                                                      [boolean] [default: false]
  -L, --list-all  List all repos                      [boolean] [default: false]

Note

It use GitHub Api v3. The rate limit is 60 requests per hour for unauthenticated requests. See https://developer.github.com/v3/#rate-limiting for details.

API call results are cached to $GH_INDEX_CACHE_DIR, which is $HOME/.cache/gh-index by default. Cache is valid for $GH_INDEX_CACHE_AGE, which is 28800000 (8hr) by default.

Don't take the results too seriously :)

License