{"id":17528593,"url":"https://github.com/tomerfi/github-viewer-stats","last_synced_at":"2026-02-14T01:17:58.038Z","repository":{"id":65061087,"uuid":"581521350","full_name":"TomerFi/github-viewer-stats","owner":"TomerFi","description":"Small NPM package for collecting your own GitHub statistics","archived":false,"fork":false,"pushed_at":"2025-04-21T11:59:28.000Z","size":390,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T12:43:35.962Z","etag":null,"topics":["github","npm-package","npm-script","statistics"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/github-viewer-stats","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomerFi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-23T12:37:12.000Z","updated_at":"2025-04-21T11:59:32.000Z","dependencies_parsed_at":"2023-02-10T03:01:33.049Z","dependency_job_id":"a3bcfeb0-1685-4ae1-9a2f-16a279188431","html_url":"https://github.com/TomerFi/github-viewer-stats","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":0.4918032786885246,"last_synced_commit":"95f05a2533abeaf3e8661909c8cba2ee325774a8"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerFi%2Fgithub-viewer-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerFi%2Fgithub-viewer-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerFi%2Fgithub-viewer-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerFi%2Fgithub-viewer-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomerFi","download_url":"https://codeload.github.com/TomerFi/github-viewer-stats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250488078,"owners_count":21438713,"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":["github","npm-package","npm-script","statistics"],"created_at":"2024-10-20T15:44:18.780Z","updated_at":"2026-01-26T23:33:08.203Z","avatar_url":"https://github.com/TomerFi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eCollect Your Own GitHub Statistics\u003c/h1\u003e\n\n\u003cp\u003e\n\n\u003cem\u003eRun as a script (using my own token)\u003c/em\u003e\n\n```shell\nnpx github-viewer-stats contribs\n```\n\n\u003c/p\u003e\n\n\u003cp\u003e\n\n\u003c!--START OF STATS--\u003e\n\n```json\n{\n  \"name\": \"Tomer Figenblat\",\n  \"company\": \"Red Hat\",\n  \"status\": \"pr is coming\",\n  \"contributingSince\": 2017,\n  \"totalContributions\": 10239,\n  \"contributionsCollection\": {\n    \"totalCommitContributions\": 7561,\n    \"totalIssueContributions\": 114,\n    \"totalPullRequestContributions\": 377,\n    \"totalPullRequestReviewContributions\": 663,\n    \"totalRepositoriesWithContributedCommits\": 202,\n    \"totalRepositoriesWithContributedIssues\": 52,\n    \"totalRepositoriesWithContributedPullRequestReviews\": 39,\n    \"totalRepositoriesWithContributedPullRequests\": 98,\n    \"totalRepositoryContributions\": 131,\n    \"totalDiscussionContributions\": 80,\n    \"totalGistContributions\": 7,\n    \"totalPackageContributions\": 0\n  }\n}\n```\n\n\u003c!--END OF STATS--\u003e\n\n```shell\nnpx github-viewer-stats repo aioswitcher\n```\n\n\u003c!--START OF REPO--\u003e\n\n```json\n{\n  \"name\": \"aioswitcher\",\n  \"description\": \"PyPi module integrating with various Switcher devices\",\n  \"language\": \"Python\",\n  \"license\": \"apache-2.0\",\n  \"collaborators\": 2,\n  \"forks\": 9,\n  \"stars\": 14,\n  \"watchers\": 2,\n  \"latest\": \"3.2.1\"\n}\n```\n\n\u003c!--END OF REPO--\u003e\n\n```shell\nnpx github-viewer-stats org my-organization\n```\n\n```json\n{\n  \"name\": \"My Organization Name\",\n  \"description\": \"My organization description\",\n  \"members\": 217,\n  \"teams\": 2,\n  \"repositories\": 16,\n  \"pending\": 0,\n  \"twoFactorAuthentication\": false,\n  \"webCommitSignoff\": false,\n  \"websiteUrl\": \"https://my-org-site.com/\"\n}\n\n```\n\n\u003c/p\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eRequires a \u003cem\u003eGITHUB_TOKEN\u003c/em\u003e environnement variable (click for the scopes)\u003c/summary\u003e\n  \u003cp\u003e\n  \u003cul\u003e\n    \u003cli\u003erepo\u003c/li\u003e\n    \u003cli\u003eread:packages\u003c/li\u003e\n    \u003cli\u003eread:user\u003c/li\u003e\n    \u003cli\u003eread:discussion\u003c/li\u003e\n    \u003cli\u003eadmin:org\u003c/li\u003e\n  \u003c/ul\u003e\n\n  \u003cem\u003eadmin:org\u003c/em\u003e is only required for admin level organization stats, such as 2fa and pending members.\u003cbr/\u003e\n  If you do not require these admin properties or do not have admin permission to the organization to begin with, you can use \u003cem\u003eread:org\u003c/em\u003e instead.\u003cbr/\u003e\n  Of course if won't use this tool for retrieving organization statistics, you can omit the \u003cem\u003eadmin\u003c/em\u003e all together.\n\n  \u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eUse as a module\u003c/summary\u003e\n\n\u003cp\u003e\n\n```shell\nnpm install --save github-viewer-stats\n```\n\n\u003c/p\u003e\n\n```javascript\n// print my user statistics to the console\nrequire('github-viewer-stats').contribs().then(r =\u003e console.log(JSON.stringify(r, null, 2)));\n// print cool-org-name organization statistics to the console\nrequire('github-viewer-stats').org('cool-org-name').then(r =\u003e console.log(JSON.stringify(r, null, 2)));\n// print my aioswitcher repository statistics to the console\nrequire('github-viewer-stats').repo('aioswitcher').then(r =\u003e console.log(JSON.stringify(r, null, 2)));\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eDetailed example\u003c/summary\u003e\n  \u003cp\u003e\n\n  ```javascript\n  const { contribs, org, repo } = require('github-viewer-stats');\n\n  async function main() {\n    // collect my user statistics\n    let myContributions = await contribs();\n    console.log(JSON.stringify(myContributions, null, 2));\n\n    // collect cool-org-name organization statistics\n    let myOrg = await org('cool-org-name');\n    console.log(JSON.stringify(myOrg, null, 2));\n\n    // collect my aioswitcher repository statistics\n    let myRepo = await repo('aioswitcher');\n    console.log(JSON.stringify(myRepo, null, 2));\n  }\n\n  main();\n  ```\n\n  \u003c/p\u003e\n\u003c/details\u003e\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomerfi%2Fgithub-viewer-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomerfi%2Fgithub-viewer-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomerfi%2Fgithub-viewer-stats/lists"}