
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
API and CLI for getting the stars for one or more GitHub users or organizations.
Get the stars for one or more GitHub users or organizations.
Follow this project's author, Jon Schlinkert, for updates on this project and others.
Install with npm:
$ npm install --save gh-stars
Params
names {String|Array}: One or more GitHub user or organization names.options {Options}returns {Promise}Example
var stars = require('gh-stars');
stars(['doowb', 'jonschlinkert'], {token: 'YOUR_GITHUB_AUTH_TOKEN'})
.then(function(res) {
console.log(res);
})
.catch(console.error)
Type: String|Function
Default: API defaults to json, CLI defaults to markdown.
Description
The format to use for the returned report. A custom function may be defined, or optionally choose one of the available formats:
json - this is the default when used by APImarkdown (or md) - returns a markdown table, this is the default when used by CLIraw - no formatting is appliedExample
var stars = require('gh-stars');
stars(['doowb', 'jonschlinkert'], {token: 'YOUR_GITHUB_AUTH_TOKEN', format: 'md'})
.then(function(res) {
// res would be formatted as markdown
console.log(res);
})
.catch(console.error)
Type: Function
Default: Filters out private repositories and forks by default.
Description: Custom function to filter out repositories from the result.
Example
var stars = require('gh-stars');
stars(['doowb', 'jonschlinkert'], {
token: 'YOUR_GITHUB_AUTH_TOKEN',
filter: function(repo) {
return repo.name !== 'foo';
}
})
.then(function(res) {
// res would be formatted as markdown
console.log(res);
})
.catch(console.error)
$ stars <names> <dest> [options]
names - one or more comma-separated user names or orgsdest - destination path to use, default is stars.mdOptions
--format - the format to use.This is a small cross-section of stars for @doowb's repos:
| **Stars** | **Name** |
| --- | --- |
| 3408 | assemble |
| 1410 | handlebars-helpers |
| 364 | verb |
| 309 | micromatch |
| 5491 | TOTAL |
You might also be interested in these projects:
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running 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:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on September 12, 2017.
FAQs
API and CLI for getting the stars for one or more GitHub users or organizations.
We found that gh-stars demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.