Massive refactor

yeah, this is a load of work.  extracting the monolithic CLI into separate commands.