CLI support Bug#962879

First stab at cli.js. Basic use cases work...

What's broken:
* Packaged apps using a local manifest file
* npm install of the cli app