Thanks to @julietjul for thanc's logo
thanc: a smarty way to thank the authors of NPM packages by starring their repos on Github ❤️
With thanc you'll thank every dependency and sub-dependency (literally the whole dependencies tree) of a given project provided with a package.json (or better a package-lock.json) manifest.
So yes, it works also with yarn 😺
This is what thanc looks like:
and then, after too many repos:
Inspired by:
Basically, because the thank (and also thanks) package already exists on NPM registry.
Thanc (or thancian) is the ancient english word to say thank, so that's why ![]()
thanc can be installed locally, globally or used with npx.
If you've NPM 5.2+, then you can go ahead with npx:
$ npx thanc --me$ npm i -D thancThen, under the scripts section of your package.json:
"thanc": "thanc ."And then:
$ npm run thanc$ npm i -g thancThen:
$ thancThanking current folder:
$ thancThanking an online Github repo:
$ thanc https://github.com/wilk/thancThanking a specific folder:
$ thanc myProjectThanking the thanc project:
$ thanc --meThanking without seeing the repos list but a progress bar instead:
$ thanc --quite .Basic Auth
$ thanc -u <your_github_username> -p <your_github_password> .User Token
Explicit:
$ thanc -t <your_github_token> .Via GITHUB_TOKEN env var:
$ export GITHUB_TOKEN=<your_github_token>; thanc .thanc supports two types of authentication:
- Basic: it requires your Github username and password
- Token: it requires one of your Github user token (just create a new token here with
public_repopermission)
thanc has several options you can check through --help:
$ thanc --help
Usage: thanc [options] <project_path>
Options:
-V, --version output the version number
--me thank thanc package and all of its dependencies
-u, --username <username> your Github username
-p, --password <password> your Github password
-t, --token <password> your Github token
-q, --quite Show only the progress bar instead of the repos list
-h, --help output usage informationthanc is published as a transpiled lib and so, for each new tag, a new build is performed, generating the dist.js file.
To verify if dist.js is exactly the transpiled version of thanc, a md5 checksum has been provided (and always up-to-date) inside the package.json (checksums):
$ md5sum dist.jsThe result must be equal to checksums listed inside the package.json.
The build verification process can be done as follows:
$ git clone https://github.com/wilk/thanc
$ cd thanc
$ npm i
$ npm run build
# replace md5sum with your favourite md5 program
$ md5sum dist.jsGithub APIs have some limitations:
- rate limiting: each user can perform 5000 requests per hour, so if you're using thanc intensively, you may encounter the rate limit error. Don't panic, take a coffee with a friend, and then start back starring repos 💪
- abuse rate limit: Github prevents making lots of rapidly requests for a single user (they want to guarantee the quality of service) so thanc stars chunks of 35 repos at a time.
Some repos cannot be starred, due to:
- missing repository property on package.json manifest
- missing package on NPM registry (thanc relies on that)
- missing repository on Github (thanc uses NPM registry info)
Sometimes, some repos can be starred twice because they might have a very similar url but different, pointing to the same github repo

