CLI v0.1
See original GitHub issueSkeleton a basic CLI app in packages/flowershow and publish to npm
I want to run npx flowershow
and get a help message
Acceptance
- Can run
flowershow
ornpx flowershow
and it outputs a simple help message ✅ 2022-09-07 works - published to npm ✅ 2022-09-07 published
- Test (?) - normally best approach is to split into a core lib and cli wrapper and you can test core lib I think I’ll add tests while working on the actual logic for the commands
Tasks
- Research
- Choose command line library (with reasons)
- Examine other good open source command line tools in node (e.g. vercel, even old https://github.com/datopian/data-cli)
- Skeleton it out and have help message
- Publish
Notes
Most popular tools for creating CLI tools seem to be:
- commander (alternatives: yargs, minimist, oclif, argh, and others)
- tool for defining commands, parsing arguments, displaying errors, and help
Commander looks after parsing the arguments into options and command-arguments, displays usage errors for problems, and implements a help system.
- inquirer
- for inquiry sessions, possibly with fancy menus (e.g. like vue-cli)
provides the user interface and the inquiry session flow providing error feedback, asking questions, parsing input, validating answers, managing hierarchical prompts
- chalk
- for cool terminal string styling
- winston
For consistent formatting of log output and ease of applying things like prefixes
commander vs yargs vs minimist vs oclif
- it’s rather a matter of preference…
- minimist is very…minimal - it only helps with arguments parsing (I’d rather choose sth more convenient/easier to use e.g. commander)
- commander has no dependencies
- vue-cli and datopian-cli are using minimist+inquirer+chalk
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Release Announcement · Render CLI v0.1.0
A command-line tool for working with Render has been high on our feedback page for quite a while; I've been using Render well...
Read more >Releases · tektoncd/cli
1, Chains version v0.10.0 and Hub verion v0.8.0. With this release, the user can now set timeouts for pipeline, pipeline-tasks and finally-tasks via...
Read more >Blog WerFault – command line switches v0.1
In my opinion werfault.exe accepts the most bizarre command line arguments combos on Windows platform ever. And despite werfault.exe process ...
Read more >CLI v0.27.1
View this release on Github. Bug fixes. Track CLI version. Prior change: CLI v0.27.0. Following change: CLI v0.27.2. Was this page helpful?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@olayway good work
npx flowershow ...
@olayway great - let’s close. 👏