Scaffolding CLI Tools, oclif

Tooling is one of the most important parts of development, and not all environments are created equal. And the best tools for tooling, are the ones that help you get up and running with development quickly. Today I’m gonna talk about oclif, a cool CLI-Framework for building CLIs, quickly. 

This library is ending support for anything not Node 8+, but to be honest, you should be migrating all of your project to the latest version of Node anyway, it’s not that hard. With the advent of newer versions

Backwards compatibility aside, it’s benefits include Class Base Scaffolding. You can create single or multi-faceted command line tools, which is great customizability. For your short quick tools like file modification the single framework is awesome, and there is a multi tool option for creating advanced CLI tools for say a project with multiple sub projects, you can create your own scaffolding tool (something I’ve personally used).

But perhaps even cooler than the framework itself is its extensibility. It allows you to use plugins and hooks to add functionality to the tool in addition to the default functionality of the CLI-Framework. It’s not an opinionated framework either, allowing you to use either typescript or just plain Jane JavaScript.

Overall, definitely a cool framework for JavaScript developers or even non-JavaScript developers that need to built good reliable CLI tools. It’s updated regularly, has a good roadmap with upcoming support for command auto-complete and man-pages(as of the time of this writing). I hope you guys find it helpful!


Leave a Reply

Your email address will not be published. Required fields are marked *