more refactoring -- move the cli into its own library.
generators in progress