https://github.com/g-harel/coco
track project stats
https://github.com/g-harel/coco
cli github traffic
Last synced: 4 months ago
JSON representation
track project stats
- Host: GitHub
- URL: https://github.com/g-harel/coco
- Owner: g-harel
- License: mit
- Created: 2018-02-27T02:15:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-25T02:43:23.000Z (almost 6 years ago)
- Last Synced: 2025-03-13T23:13:54.003Z (11 months ago)
- Topics: cli, github, traffic
- Language: Go
- Homepage:
- Size: 130 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coco
> track project stats
## Usage
```
$ go get -u github.com/g-harel/coco
```
```
Usage: coco [flags...]
Flags:
-github-new-stars int
Show repos if they have this quantity of new stars (default 1)
-github-owner value
GitHub owner to query.
-github-stars int
Show repos if they have this quantity of stars. (default 1)
-github-today int
Show repos if they have this quantity of views today. (default 1)
-github-token string
GitHub API token.
-github-views int
Show repos if they have this quantity of views. (default 1)
-log-error
Log errors. (default true)
-log-info
Log miscellaneous info.
-npm-owner value
NPM owners whose packages to query.
-npm-weekly int
Show repos if they have this quantity of weekly downloads. (default 1)
-rate-limit int
Maximum number of requests per second by all collectors. (default 999)
-state-file string
Absolute path to file used to store state between runs.
```
_GitHub traffic can only be collected from repositories that the token grants push access to._
_Quantity of new stars can only be accurately shown if a state file is provided._
_A single run can collect data from both GitHub and NPM._
## Examples
#### GitHub
```bash
coco -github-token= -github-owner=
```
_Tokens can be generated by following the steps in the [documentation](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)._
_Organization names can also be passed in as owners to query._
#### NPM
```bash
coco -npm-owner=
```
#### Mixed
```bash
coco \
-log-info \
-rate-limit=42 \
-state-file="/home/me/.coco" \
-github-token= \
-github-owner= \
-github-owner= \
-github-views=4 \
-github-today=1 \
-github-stars=3 \
-npm-owner= \
-npm-weekly=12
```
```
+----------------------------------+
| GitHub repo stats | |
+--------------------------+-------+--------+-------+------------------------------------------------------------------+
| REPO | VIEWS | UNIQUE | TODAY | LINK |
+--------------------------+-------+--------+-------+------------------------------------------------------------------+
| blobs+34 | 131 | 18 | 0 | https://github.com/g-harel/blobs/graphs/traffic |
| npmfs+83 | 19 | 10 | 0 | https://github.com/g-harel/npmfs/graphs/traffic |
| superpermutations+1 | 16 | 6 | 3 | https://github.com/g-harel/superpermutations/graphs/traffic |
| SOEN321+0 | 10 | 3 | 0 | https://github.com/g-harel/SOEN321/graphs/traffic |
| coco+2 | 7 | 3 | 1 | https://github.com/g-harel/coco/graphs/traffic |
| targetblank+5 | 7 | 3 | 0 | https://github.com/g-harel/targetblank/graphs/traffic |
| rickety+9 | 5 | 5 | 1 | https://github.com/g-harel/rickety/graphs/traffic |
| okwolo+21 | 5 | 3 | 0 | https://github.com/okwolo/okwolo/graphs/traffic |
| cards-amusing-humanity+1 | 4 | 2 | 0 | https://github.com/g-harel/cards-amusing-humanity/graphs/traffic |
| svgsaurus+6 | 3 | 3 | 0 | https://github.com/g-harel/svgsaurus/graphs/traffic |
| sekstant+56 | 2 | 2 | 0 | https://github.com/g-harel/sekstant/graphs/traffic |
| website+10 | 2 | 2 | 0 | https://github.com/g-harel/website/graphs/traffic |
| ence+8 | 0 | 0 | 0 | https://github.com/g-harel/ence/graphs/traffic |
| open-source-logos+3 | 0 | 0 | 0 | https://github.com/g-harel/open-source-logos/graphs/traffic |
| slurry+5 | 0 | 0 | 0 | https://github.com/g-harel/slurry/graphs/traffic |
+--------------------------+-------+--------+-------+------------------------------------------------------------------+
+--------------------------------+
| Npm package downloads | |
+---------+-----------+-------+-----------------------------------+
| PACKAGE | DOWNLOADS | TOTAL | LINK |
+---------+-----------+-------+-----------------------------------+
| blobs | 305 | 7,111 | https://npmjs.com/package/blobs |
| paph | 20 | 339 | https://npmjs.com/package/paph |
| okwolo | 19 | 1,863 | https://npmjs.com/package/okwolo |
| rickety | 12 | 1,289 | https://npmjs.com/package/rickety |
+---------+-----------+-------+-----------------------------------+
```
## License
[MIT](./LICENSE)