Add a croak function for dumping errors
Use Command structs in main
Add initial generate subcommand