https://github.com/insin/stargaze
Watch a GitHub repo's star count, with change notifications on your desktop
https://github.com/insin/stargaze
github nodejs stars tool
Last synced: 9 months ago
JSON representation
Watch a GitHub repo's star count, with change notifications on your desktop
- Host: GitHub
- URL: https://github.com/insin/stargaze
- Owner: insin
- License: mit
- Created: 2015-04-10T09:19:36.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-10T11:16:36.000Z (almost 11 years ago)
- Last Synced: 2025-04-16T20:56:41.065Z (10 months ago)
- Topics: github, nodejs, stars, tool
- Language: JavaScript
- Homepage:
- Size: 121 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Stargaze
Watch a GitHub repo's star count, with change notifications on your desktop via
[node-notifier](https://github.com/mikaelbr/node-notifier).

### Command-Line Usage
Install globally for command-line usage:
```
npm install -g stargaze
```
```
$ stargaze -h
Usage: stargaze [options] github_repo
Options:
-d, --delay Delay between requests (s < 1000 or ms >= 1000) [default: 60]
-u, --user GitHub username
-p, --pass GitHub password
-q, --quiet Suppress all non-error output
-v, --verbose Verbose output (shows rate limit info)
-h, --help Show this help
Unauthenticated requests have a very low rate limit
```
```
$ stargaze -v facebook/react
[2015-04-10T10:29:37.249Z] Requesting stars for facebook/react
[2015-04-10T10:29:37.736Z] 20019
[2015-04-10T10:29:37.738Z] x-ratelimit-limit: 60
[2015-04-10T10:29:37.741Z] x-ratelimit-remaining: 54
[2015-04-10T10:29:37.744Z] x-ratelimit-reset: 1428664607
```
### API Usage
Using the stargaze API allows you to pass a callback which gets called every
time the number of stars changes.
```
npm install stargaze
```
```javascript
var stargaze = require('stargaze')
stargaze('facebook/react', {verbose: true}, function(stars) {
if (stars % 1000 === 0) {
tweet('OMG Base 10! ' + stars)
}
})
```
#### stargaze(repo[, options][, callback])
`repo` - a GitHub repo in `/` format.
`options` - an optional Object specifying additional options (see below)
`callback` - an optional callback function which will be called with the current
number of stars every time it changes.
The callback will **not** be called for the initial request.
##### Options
`auth` - an Object with `user` and `pass` properties, specifying GitHub
credentials to authenticate requests.
`timeout` - delay between requests to GitHub, in milliseconds; default: 60000.
`quiet` - if truthy, suppresses non-error console output.
`verbose` - if truthy, displays rate limit data in console output.
## MIT Licensed