DEV Community

Discussion on: How to make beautiful, simple CLI apps with Node

Collapse
 
jvarness profile image
Jake Varness

I too have used commander on projects and I really enjoy using it!

Another pattern that you could follow instead of using index.js as the entry point for your program is to have the actual executable in a bin folder in your package. That way, you can separate your actual package from how it gets executed. Following this pattern, module could be used as a CLI or consumed as a library rather than purely being a CLI.

Collapse
 
hugo__df profile image
Hugo Di Francesco

Yeah that was done for the sake of simplicity in a blog post, less files and folders is better to just quickly walk through some awesome packages.