Hello @spf13 and thank you for your many great contributions. I contributed to Hugo some time ago and use it for several sites!
The typical go pattern is to use the cmd directory like an index of all buildable binaries in a project. Cobra directly conflicts with this by recommending that the cmd directory is used to hold small packages which each contain cobra command packages.
Please consider recommending a more compatible file structure, such as this one that nests cobra commands with their relevant binaries:
I don't want to necromancy the issue or whatever, but the recommended layout generates a fair bit of confusion for new Gophers, as the pretty clear idiom in the rest of the ecosystem is to keep cmd/ free of actual .go files, just a kind of directory namespace for other subdirs that hold whatever binaries are in the project.
A few other things in the codegen utility also seem to go against the grain: creating package names with_underscores, and naming files as camelCase.go instead of snake_case.go.