{"id":19079630,"url":"https://github.com/maddhruv/npmtotal","last_synced_at":"2025-08-17T12:33:40.689Z","repository":{"id":42939628,"uuid":"235481965","full_name":"maddhruv/npmtotal","owner":"maddhruv","description":"Find you npm download statistics","archived":false,"fork":false,"pushed_at":"2022-12-10T15:42:45.000Z","size":477,"stargazers_count":16,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T05:44:49.825Z","etag":null,"topics":["cli","download-statistics","npm","npm-stats","npmstats"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maddhruv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-22T02:14:37.000Z","updated_at":"2023-11-25T11:07:11.000Z","dependencies_parsed_at":"2023-01-26T03:15:24.318Z","dependency_job_id":null,"html_url":"https://github.com/maddhruv/npmtotal","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddhruv%2Fnpmtotal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddhruv%2Fnpmtotal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddhruv%2Fnpmtotal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddhruv%2Fnpmtotal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maddhruv","download_url":"https://codeload.github.com/maddhruv/npmtotal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651221,"owners_count":21621702,"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","download-statistics","npm","npm-stats","npmstats"],"created_at":"2024-11-09T02:15:26.367Z","updated_at":"2025-04-30T05:44:54.980Z","avatar_url":"https://github.com/maddhruv.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# npmtotal\n\nFind your npm download statistics by author or packages, can be used as a [CLI](#cli) or [Module](#module)\n\n## Installation\n\n`npm i npmtotal -g`\n\nor\n\n`npm i npmtotal`\nwhen consuming as a [module](#module)\n\n## Usage\n\n### CLI\n\nFor npm `author`\n\n\u003e `npx npmtotal --author authorName`\n\nand for npm `packages`\n\n\u003e `npx npmtotal --packages package1 package2 ...`\n\n### Module\n\n```js\nconst npmtotal = require(\"npmtotal\");\n\n// author\n(async () =\u003e {\n  console.log(await npmtotal(\"maddhruv\"));\n})();\n\n// packages\n(async () =\u003e {\n  console.log(await npmtotal([\"npmtotal\", \"post-merge-install\"]));\n})();\n```\n\nThe returned object is of this structure.\n\n```js\n{\n  stats: [\n    [String(packageName), Number(downloads)]\n  ],\n  sum: Number(totalDownloads)\n}\n```\n\n#### Options\n\nYou can pass several options as the second param.\n\n| Option      | Description                       | Default value    |\n| ----------- | --------------------------------- | ---------------- |\n| `exclude`   | an array of packages to exclude   | []               |\n| `startDate` | start date for counting downloads | _today - 1 year_ |\n| `endDate`   | end date for counting downloads   | _today_          |\n\nYou can also pass `startDate` and `endDate` as options to the CLI\n\n`npx npmtotal --author maddhruv --startDate '2020-01-01' --endDate '2020-01-03'`\n\n### Related\n\n- [npm-statistics](https://github.com/cleartax/npm-statistics) - NPM Download Stats updated daily with badge and readme update\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddhruv%2Fnpmtotal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaddhruv%2Fnpmtotal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddhruv%2Fnpmtotal/lists"}