Add repo commands, generator refactoring