Create Highly Configurable Node.js CLIs with Cosmiconfig and Oclif

Shawn Wang
InstructorShawn Wang

Share this video with your friends

Send Tweet

Prompting is a nice patch over missing Flags and arguments, but what if your program is so complex that you have too many options? You will probably want to allow the user to specify config files. The conventions and user preferences over config file format are too numerous to manage, but that's fine because Cosmiconfig will help us manage them!

Config handling is one example of highly sharable business logic (just like authentication and backend syncing) - so we will also look at how to extract this out to a shared Base Command.