{"id":15675412,"url":"https://github.com/doowb/dependents-cli","last_synced_at":"2025-06-10T17:34:42.337Z","repository":{"id":65990613,"uuid":"64422062","full_name":"doowb/dependents-cli","owner":"doowb","description":"CLI for listing an npm module's dependent projects and their download stats.","archived":false,"fork":false,"pushed_at":"2017-06-21T20:51:28.000Z","size":18,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T00:33:55.976Z","etag":null,"topics":["cli","dependents","download-counts","npm","npm-dependents","npm-downloads"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doowb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["doowb","jonschlinkert"]}},"created_at":"2016-07-28T19:21:12.000Z","updated_at":"2019-10-20T22:32:40.000Z","dependencies_parsed_at":"2023-06-19T07:45:31.429Z","dependency_job_id":null,"html_url":"https://github.com/doowb/dependents-cli","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"75d1ffbcefd24306509275258d8f1a2eb84d429c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fdependents-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fdependents-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fdependents-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fdependents-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/dependents-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fdependents-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259118125,"owners_count":22807899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","dependents","download-counts","npm","npm-dependents","npm-downloads"],"created_at":"2024-10-03T15:59:58.303Z","updated_at":"2025-06-10T17:34:42.302Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":["https://github.com/sponsors/doowb","https://github.com/sponsors/jonschlinkert"],"categories":[],"sub_categories":[],"readme":"# dependents-cli [![NPM version](https://img.shields.io/npm/v/dependents-cli.svg?style=flat)](https://www.npmjs.com/package/dependents-cli) [![NPM monthly downloads](https://img.shields.io/npm/dm/dependents-cli.svg?style=flat)](https://npmjs.org/package/dependents-cli)  [![NPM total downloads](https://img.shields.io/npm/dt/dependents-cli.svg?style=flat)](https://npmjs.org/package/dependents-cli)\n\n\u003e CLI for listing an npm module's dependent projects and their download stats.\n\nYou might also be interested in [module-dependents](https://github.com/doowb/module-dependents).\n\n## Install\n\nInstall globally with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm install --global dependents-cli\n```\n\n## Usage\n\nOnce installed globally, there will be a `dependents` command that can be run from the command line.\n\nTo see all the dependents for a module, specify the module name after the `dependents` command like this:\n\n```sh\n$ dependents base\n```\n\nThis will output a JavaScript array containing each dependent as an object with `name` and dependency version properties. The dependency version property key will be the specified module name with `-version` after it. So `base-version` for the command specified above.\n\nExample output from running `$ dependents base`:\n\n![image](https://cloud.githubusercontent.com/assets/995160/17226161/01775114-54d6-11e6-9c41-313a2b6eaf74.png)\n\n## Formatting\n\nUse the `--format` option to format the results as a table (this is the default).\n\nRun the following command to the dependents formatted as a table:\n\n```sh\n$ dependents base --format\n```\n\n![image](https://cloud.githubusercontent.com/assets/995160/17226161/01775114-54d6-11e6-9c41-313a2b6eaf74.png)\n\nYou can also include the download counts when using formatting:\n\n```sh\n$ dependents base --downloads --format\n```\n\n![image](https://cloud.githubusercontent.com/assets/995160/17226185/235b8b88-54d6-11e6-93f8-4b6e686e932d.png)\n\nIf you need to use the results as a JSON object, use the `--format` command with `json` after it:\n\n```sh\n$ dependents base --format json\n```\n\n```json\n[\n  { \"name\": \"base-app\", \"base-version\": \"^0.11.1\" },\n  { \"name\": \"base-reporter\", \"base-version\": \"^0.11.0\" },\n  { \"name\": \"benchmarked\", \"base-version\": \"^0.8.1\" },\n  { \"name\": \"boilerplate\", \"base-version\": \"^0.11.1\" },\n  { \"name\": \"expand-files\", \"base-version\": \"^0.11.1\" },\n  { \"name\": \"expand-target\", \"base-version\": \"^0.11.1\" },\n  { \"name\": \"npm-api\", \"base-version\": \"^0.8.1\" },\n  { \"name\": \"saffronapp\", \"base-version\": \"file:packages/base\" },\n  { \"name\": \"scaffold\", \"base-version\": \"^0.11.1\" },\n  { \"name\": \"templates\", \"base-version\": \"^0.11.1\" },\n  { \"name\": \"verbiage\", \"base-version\": \"^0.8.1\" },\n  { \"name\": \"vinyl-collection\", \"base-version\": \"^0.11.0\" },\n  { \"name\": \"vinyl-item\", \"base-version\": \"^0.8.1\" }\n]\n```\n\nThis can be output to a json file using the `bash` `\u003e` character:\n\n```sh\n$ dependents base --format json \u003e base-dependents.json\n```\n\nUse this with the `--downloads` option to be able to use the json data and do your own sorting and filtering if necessary.\n\n```sh\n$ dependents base --format json --downloads \u003e base-dependents.json\n```\n\n### Downloads\n\nTo include the download counts of each of the dependents, use the `--downloads` option. This will add a `downloads` object to each dependent with the `total` and `last30` (last 30 days) download counts:\n\n```sh\n$ dependents base --downloads --format json\n```\n\n```json\n[\n  { \"name\": \"templates\", \"base-version\": \"^0.11.1\", \"downloads\": { \"total\": 124383, \"last30\": 14517 } },\n  { \"name\": \"benchmarked\", \"base-version\": \"^0.8.1\", \"downloads\": { \"total\": 528830, \"last30\": 5301 } },\n  { \"name\": \"vinyl-item\", \"base-version\": \"^0.8.1\", \"downloads\": { \"total\": 6045, \"last30\": 5019 } },\n  { \"name\": \"expand-target\", \"base-version\": \"^0.11.1\", \"downloads\": { \"total\": 4341, \"last30\": 577 } },\n  { \"name\": \"scaffold\", \"base-version\": \"^0.11.1\", \"downloads\": { \"total\": 4212, \"last30\": 532 } },\n  { \"name\": \"boilerplate\", \"base-version\": \"^0.11.1\", \"downloads\": { \"total\": 8845, \"last30\": 478 } },\n  { \"name\": \"base-app\", \"base-version\": \"^0.11.1\", \"downloads\": { \"total\": 1091, \"last30\": 471 } },\n  { \"name\": \"expand-files\", \"base-version\": \"^0.11.1\", \"downloads\": { \"total\": 7235, \"last30\": 399 } },\n  { \"name\": \"npm-api\", \"base-version\": \"^0.8.1\", \"downloads\": { \"total\": 629, \"last30\": 52 } },\n  { \"name\": \"base-reporter\", \"base-version\": \"^0.11.0\", \"downloads\": { \"total\": 103, \"last30\": 16 } },\n  { \"name\": \"vinyl-collection\", \"base-version\": \"^0.11.0\", \"downloads\": { \"total\": 101, \"last30\": 15 } },\n  { \"name\": \"verbiage\", \"base-version\": \"^0.8.1\", \"downloads\": { \"total\": 77, \"last30\": 7 } },\n  { \"name\": \"saffronapp\", \"base-version\": \"file:packages/base\", \"downloads\": { \"total\": 112, \"last30\": 5 } }\n]\n```\n\nWhen using the `--downloads` option, the list is sorted by the `downloads.last30` property so the most used dependents will be found at the top.\n\n## About\n\n### Related projects\n\n* [download-stats](https://www.npmjs.com/package/download-stats): Get and calculate npm download stats for npm modules. | [homepage](https://github.com/doowb/download-stats \"Get and calculate npm download stats for npm modules.\")\n* [module-dependents](https://www.npmjs.com/package/module-dependents): Retrieve list of dependents for an npm module. | [homepage](https://github.com/doowb/module-dependents \"Retrieve list of dependents for an npm module.\")\n* [npm-api-dependents](https://www.npmjs.com/package/npm-api-dependents): npm-api plugin for getting module dependents. | [homepage](https://github.com/doowb/npm-api-dependents \"npm-api plugin for getting module dependents.\")\n* [npm-api](https://www.npmjs.com/package/npm-api): Base class for retrieving data from the npm registry. | [homepage](https://github.com/doowb/npm-api \"Base class for retrieving data from the npm registry.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 18 | [doowb](https://github.com/doowb) |  \n| 1  | [panva](https://github.com/panva) |  \n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](https://twitter.com/doowb)\n\n### License\n\nCopyright © 2017, [Brian Woodward](https://github.com/doowb).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fdependents-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fdependents-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fdependents-cli/lists"}