Get basic stats about public npm packages maintained by you, in your terminal.
Prerequisite: Node.js v18+
Install Globally:
$ npm i -g @fusionfroze/statsyFor Local Development:
After cloning the repo into your machine locally, run these -
$ npm install$ npm linkAfter installing, run -
$ statsy setupThis will open an input interface and ask for two things (both saved locally in your machine) -
- Your npm username
- Your personal Github Access token
(Tip: To know more about github access tokens click here. Remember to select the repo scope, otherwise the api will not be able to fetch info about your repository.)
statsy support four options, each showing a different stat. These are as follows -
Options:
-v, --version current version of the package
-s, --stars star count on the repository of the package on github
-i, --issues issue count on the repository of the package on github
-d, --downloads download count of the package from npm registryYou can run the command in four ways -
$ statsyShows all four stats for all packages maintained by you.
$ statsy -d -ior
$ statsy -diShows only the download and issues count for all packages.
$ statsy examplePackageShows all stats for a single specified package (examplePackage).
$ statsy examplePackage -dShows only the download count for a single specified package.
To delete/reset your credentials, run -
$ statsy resetYou will be asked to give your confirmation once. Once confirmed, the action is irreversible.