Jeff Dickey
Oct 9, 2018 · 1 min read

Really excellent questions. oclif does not load all the commands up front. I’ve taken great care to make the overhead as minimal as possible so oclif only needs to load the command it is about to run. It uses a manifest json file that is built when the npm package is created to display the help for all the commands without needing to require all the files as well. Overhead should be ~150ms which frankly is about as good as you can get in a node CLI.

In terms of config, we only use a very tiny amount of config in the Heroku CLI so I haven’t found a need for something like that just yet. However, it’s a very common thing to need for CLIs so I plan to add some “user” config functionality to oclif or create a plugin that does the same.

So, it’s TBD. I think cosmiconfig may be useful, but I haven’t used it myself yet. I do think that some way to specify config can come either from a flag, env var, or config value is important though.

Jeff Dickey

Written by

New Blog:

More From Medium

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade