swyxio / cli-cheatsheet

helpful libraries for *building* CLIs. Not a list of CLIs.
https://mobile.twitter.com/swyx/status/1127431451559985152
MIT License
618 stars 22 forks source link

Where would those projects fit? #17

Open karfau opened 4 years ago

karfau commented 4 years ago

Hey there,

I started working on those two a while ago:

If I would know where they would fit into your TOC I would be happy to file a PR, but I'm just not sure.

By the way would you also accept a PR that actually adds an easily maintainable TOC to your README? :wink:

swyxio commented 4 years ago

hi! thanks for your interest!

re: runex - is this similar to execa? maybe put it there?

re: node-cli-args-options - this is interesting! honestly i dont do a great job of this on the cheatsheet as i was forced to split things between "Frameworks" and "Argument Parsing". I would put a link to this under "argument parsing" and just use the same description you gave here

re: TOCs, yes i prefer using https://github.com/technote-space/toc-generator these days but curious what options u have

karfau commented 4 years ago

re: runex - is this similar to execa? maybe put it there?

Not if I understood correctly what execa is doing. runex works the following way: having a script that like these (the thing they have in common is that they all export a function as run) on your shell you can write npx runex path/to/script to execute that funtion and the result is printed to stdout/any errors to stderr.
(Of course there is more to it, but I don't want to repeat the README here.)

re: TOCs I have experience with (my fork of) doctoc and https://github.com/remarkjs/remark-toc. will look into the one you mentioned.
I was having the idea of adding a github action that would update the TOC if it wasn't up to date and push back to the repo (in a PR or directly). I have heard of all the required pieces but putting them together might still be (a small) challenge.

swyxio commented 4 years ago

ok :) use your judgment!

the toc-generator one is quite easy to set up. give it a try, ive had good experiences so far