This repository contains a Javascript implementation of the CLI functionality we've been using and enhancing since 2006 based on the TECode/command functionality. Yes, I know it's another CLI library, so if you're happy with what you have now, then this library isn't for you.
Originally inspired by RedHat's popt, it has some similar features, but it uses the Command pattern to define the actions to be taken during parameter matching operations.