downloads-cli

0.1.1 • Public • Published

downloads-cli NPM version NPM downloads

Commandline application for retrieving npm download counts for the specified repository or maintainer.

Install

Install with npm:

$ npm install --save downloads-cli

Usage

Once installed globally, there will be a downloads command that can be run from the command line.

To see the download counts for a module, specify the module name after the downloads command like this:

$ downloads micromatch

Example output from running $ downloads micromatch:

image

Formatting

Use the --format option to format the results as a table (this is the default).

Run the following command to the downloads formatted as a table:

$ downloads micromatch --format

image

If you need to use the results as a JSON object, use the --format command with json after it:

$ downloads micromatch --format json
[
  {
    "name": "micromatch",
    "yesterday": 298701,
    "lastWeek": 1667018,
    "lastMonth": 7561132,
    "total": 72246952
  }
]```
 
This can be output to a json file using the `bash` `>` character:
 
```sh
$ downloads micromatch --format json > micromatch-downloads.json

Maintainer

To get downloads for all of the modules maintained by a specific maintainer, use the --maintainer or -m option:

$ downloads --maintainer doowb

This shows a table with a summary for the maintainer's total counts:

image

The --format option will also work with --maintainer to return a json array of necessary:

[
  ...
  {"name": "micromatch", "yesterday": 298701, "lastWeek": 1667018, "lastMonth": 7561132, "total": 72246952},
  {"name": "for-in", "yesterday": 302578, "lastWeek": 1690801, "lastMonth": 7689845, "total": 67525375},
  {"name": "isobject", "yesterday": 312044, "lastWeek": 1740065, "lastMonth": 7737220, "total": 78639385},
  {"name": "object.omit", "yesterday": 331758, "lastWeek": 1861300, "lastMonth": 8183602, "total": 67385807},
  {"name": "is-number", "yesterday": 362636, "lastWeek": 2010066, "lastMonth": 8844787, "total": 81522342},
  {"name": "expand-range", "yesterday": 362678, "lastWeek": 2011777, "lastMonth": 8856168, "total": 79453005},
  {"name": "braces", "yesterday": 363642, "lastWeek": 2016279, "lastMonth": 8952292, "total": 82014801},
  {"name": "kind-of", "yesterday": 386582, "lastWeek": 2182171, "lastMonth": 9699790, "total": 106232096},
  {"name": "is-glob", "yesterday": 404976, "lastWeek": 2255831, "lastMonth": 9965800, "total": 78215744},
  {"name": "repeat-string", "yesterday": 480270, "lastWeek": 2705665, "lastMonth": 11891614, "total": 107677170},
  {"name": "window-size", "yesterday": 593891, "lastWeek": 3291254, "lastMonth": 13714362, "total": 141107634}
]

About

Related projects

  • dependents-cli: CLI for listing an npm module's dependent projects and their download stats. | homepage
  • downloads: Retrieve npm download stats for the specified repository or maintainer. | homepage
  • npm-api: Base class for retrieving data from the npm registry. | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Please read the contributing guide for avice on opening issues, pull requests, and coding standards.

Building docs

(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)

To generate the readme and API documentation with verb:

$ npm install -g verb verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Brian Woodward

License

Copyright © 2016, Brian Woodward. Released under the MIT license.


This file was generated by verb-generate-readme, v0.2.0, on November 15, 2016.

Package Sidebar

Install

npm i downloads-cli

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jonschlinkert
  • doowb