Redo the "CLI" framework

This gets rid of the only remote dependency, and also has the advantage
of splitting commands into their own files.