{"id":13565635,"url":"https://github.com/jonschlinkert/gh-stars","last_synced_at":"2025-05-06T19:10:16.466Z","repository":{"id":53824444,"uuid":"103332815","full_name":"jonschlinkert/gh-stars","owner":"jonschlinkert","description":"API and CLI for getting the stars for one or more GitHub users or organizations.","archived":false,"fork":false,"pushed_at":"2017-09-13T00:12:49.000Z","size":22,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-03T13:42:44.337Z","etag":null,"topics":["api","cli","github","repos","repositories","stars"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-13T00:08:05.000Z","updated_at":"2024-07-07T14:18:20.000Z","dependencies_parsed_at":"2022-08-24T16:52:07.079Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/gh-stars","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgh-stars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgh-stars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgh-stars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgh-stars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/gh-stars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221152505,"owners_count":16765054,"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":["api","cli","github","repos","repositories","stars"],"created_at":"2024-08-01T13:01:51.611Z","updated_at":"2024-10-23T03:41:33.762Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":["cli","JavaScript"],"sub_categories":[],"readme":"# gh-stars [![NPM version](https://img.shields.io/npm/v/gh-stars.svg?style=flat)](https://www.npmjs.com/package/gh-stars) [![NPM monthly downloads](https://img.shields.io/npm/dm/gh-stars.svg?style=flat)](https://npmjs.org/package/gh-stars) [![NPM total downloads](https://img.shields.io/npm/dt/gh-stars.svg?style=flat)](https://npmjs.org/package/gh-stars) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/gh-stars.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/gh-stars)\n\n\u003e Get the stars for one or more GitHub users or organizations.\n\nFollow this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), for updates on this project and others.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save gh-stars\n```\n\n## Usage\n\n**Params**\n\n* `names` **{String|Array}**: One or more GitHub user or organization names.\n* `options` **{Options}**\n* `returns` **{Promise}**\n\n**Example**\n\n```js\nvar stars = require('gh-stars');\n\nstars(['doowb', 'jonschlinkert'], {token: 'YOUR_GITHUB_AUTH_TOKEN'})\n  .then(function(res) {\n    console.log(res);\n  })\n  .catch(console.error)\n```\n\n## Options\n\n### options.format\n\n**Type:** `String|Function`\n\n**Default:** API defaults to `json`, CLI defaults to `markdown`.\n\n**Description**\n\nThe format to use for the returned report. A custom function may be defined, or optionally choose one of the available formats:\n\n* `json` - this is the default when used by API\n* `markdown` (or `md`) - returns a markdown table, this is the default when used by CLI\n* `raw` - no formatting is applied\n\n**Example**\n\n```js\nvar stars = require('gh-stars');\n\nstars(['doowb', 'jonschlinkert'], {token: 'YOUR_GITHUB_AUTH_TOKEN', format: 'md'})\n  .then(function(res) {\n    // res would be formatted as markdown\n    console.log(res);\n  })\n  .catch(console.error)\n```\n\n### options.filter\n\n**Type:** `Function`\n\n**Default:** Filters out private repositories and forks by default.\n\n**Description:** Custom function to filter out repositories from the result.\n\n**Example**\n\n```js\nvar stars = require('gh-stars');\n\nstars(['doowb', 'jonschlinkert'], {\n  token: 'YOUR_GITHUB_AUTH_TOKEN', \n  filter: function(repo) {\n    return repo.name !== 'foo';\n  }\n})\n  .then(function(res) {\n    // res would be formatted as markdown\n    console.log(res);\n  })\n  .catch(console.error)\n```\n\n## CLI\n\n```sh\n$ stars \u003cnames\u003e \u003cdest\u003e [options]\n```\n\n* `names` - one or more comma-separated user names or orgs\n* `dest` - destination path to use, default is `stars.md`\n\n**Options**\n\n* `--format` - the [format](#optionsformat) to use.\n\n## Example markdown report\n\nThis is a small cross-section of stars for [@doowb's](https://github.com/doowb) repos:\n\n```\n| **Stars** | **Name** |\n| --- | --- |\n|   3408 | assemble |\n|   1410 | handlebars-helpers |\n|    364 | verb |\n|    309 | micromatch |\n|   5491 | TOTAL |\n```\n\n## About\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [gists](https://www.npmjs.com/package/gists): Methods for working with the GitHub Gist API. Node.js/JavaScript | [homepage](https://github.com/jonschlinkert/gists \"Methods for working with the GitHub Gist API. Node.js/JavaScript\")\n* [github-base](https://www.npmjs.com/package/github-base): JavaScript wrapper that greatly simplifies working with GitHub's API. | [homepage](https://github.com/jonschlinkert/github-base \"JavaScript wrapper that greatly simplifies working with GitHub's API.\")\n* [repos](https://www.npmjs.com/package/repos): List all repositories for one or more users or orgs. | [homepage](https://github.com/jonschlinkert/repos \"List all repositories for one or more users or orgs.\")\n* [topics](https://www.npmjs.com/package/topics): Get and update GitHub repository topics. | [homepage](https://github.com/jonschlinkert/topics \"Get and update GitHub repository topics.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\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**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\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 September 12, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fgh-stars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fgh-stars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fgh-stars/lists"}