DEV Community

Code[ish]

13. oclif: An Open Source CLI Framework

For many years, Jeff Dickey was a lead architect for Heroku's CLI tool, which was used by application developers to get their apps deployed to Heroku's platform. He muses on his history with CLIs with Nahid Samsami, a director of product at Heroku, as the two of them worked together on oclif.

oclif was designed from the start to be a framework for developers to use when building their own command-line interfaces. It's currently written in TypeScript, but Jeff goes through its four-year history, starting with its roots in Ruby and on thorough its Frankenstein's monster mashup of Go and JavaScript. While each language had its pros and cons, the key constraint was how the resulting command-line binary program would be distributed.

The project has been incredibly popular, both through internal adoption at Heroku and Salesforce, to its reception and use from other companies, as well as the active contributions made on GitHub. The episode concludes with some theories about the future of CLI tooling. PowerShell, for example, is a fully object-oriented environment which a developer can program against. Jeff is also interested in better integration between the terminal and UI elements.

  • oclif.io, the main landing page for learning more about oclif
  • Microsoft's Powershell, which Jeff believes is the most incredibly advanced CLI platform

Episode source