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

ecosystem-docs

v1.1.1

Published

Aggregate and store a collection of data for GitHub repositories, intended for use with documenting package ecosystems on npm

Downloads

13

Readme

ecosystem-docs

Aggregate and store a collection of data for GitHub repositories, intended for use with documenting package ecosystems on npm.

This makes it easier to write your own version of stackgl/packages, with the added bonus of being more pleasant to work with and using a better caching strategy.

Usage

NPM

Usage:
  ecosystem-docs <command> {OPTIONS}

Available Commands:
  sync   Syncs the database with GitHub
  read   Outputs the stored information for the input repositories
  dump   Dumps all of the currently stored information to stdout

Options:
  -d, --data   Location of the leveldb cache. Defaults to ~/.ecosystem-docs
  -h, --help   Display this message
  -t, --token  Pass in a custom GitHub token. Otherwise this will be prompted
               for when first using the tool.

When you've first installed the tool, be sure to login with your GitHub credentials first by running the command once without any arguments:

ecosystem-docs

After that, you can pipe a line-delimited list of user/name repository paths into the tool to sync with GitHub:

echo '
hughsk/icosphere
mattdesl/budo
stackgl/glslify
' > repos.txt

cat repos.txt | ecosystem-docs sync

And later, pipe a line-delimited list of user/name repository paths into the tool to read the update data out as line-delimited JSON:

cat repos.txt | ecosystem-docs read
{"user":"hughsk","path":"hughsk/icosphere","name":"icosphere","head":"e7c9bfcefac34b5be57d066a50428b30b15e3ac8","readme":"...","contributors":[{"login":"hughsk"},{"login":"kumavis"}],"page":"http://hughsk.io/icosphere/","package":{}}
{"user":"mattdesl","path":"mattdesl/budo","name":"budo","head":"0951e8594d6df0e6ec630fa8cb1bde5d4615fbdf","readme":"...","contributors":[{"login":"mattdesl"},{"login":"yoshuawuyts"},{"login":"thibauts"}],"page":false,"package":{}}
{"user":"stackgl","path":"stackgl/glslify","name":"glslify","head":"81ca203b6dee320508953e2be256250d44871a70","readme":"...","contributors":[{"login":"hughsk"},{"login":"chrisdickinson"},{"login":"mattdesl"},{"login":"mikolalysenko"},{"login":"rippedspine"}],"page":false,"package":{}}

Each repository has the following properties:

  • user: The GitHub user that owns the repository.
  • name: The name of the GitHub repository.
  • path: The user/name path of the GitHub repository.
  • head: The latest recorded commit in that repository.
  • readme: The contents of the README file, according to GitHub.
  • page: A resolved link to the GitHub pages URL, or false if it doesn't exist.
  • package: the latest package.json committed to GitHub.
  • contributors: A list of users who've contributed to the repository on GitHub: all of their associated profile data from the API.

Results are cached to minimise requests to the GitHub API, but every sync will create at least one API request per repository supplied. The cache is invalidated whenever a new commit is pushed to that repository.

License

MIT. See LICENSE.md for details.