How akene-uzezi/sprout works
Sprout is a small CLI for scaffolding Go projects. A user supplies a target path and optional module name; the Cobra command handler selects or enters that directory, then calls a utility to initialize the module and create starter directories and code. The utility invokes the external Go tool and writes the generated project. The README documents a language option, but the sampled handler only scaffolds when that option is empty; no other language path is evidenced. The graph reflects the sampled implementation and documented usage.
Main entry points: util.go Module initialization · main.go Cobra commands
Components 7
CLI
- Cobra commands
main.go - Scaffold handler
main.go
Scaffolding
- Module initialization
internal/util/util.go - Layout and starter writer
internal/util/util.go
Other components
- Project creator
- Go tool
- Generated project
Connections 6
- Project creator → Cobra commands: runs with path
README.md - Cobra commands → Scaffold handler: dispatches
main.go - Scaffold handler → Module initialization: selects module setup
main.go - Module initialization → Go tool: runs go mod init
internal/util/util.go - Module initialization → Layout and starter writer: calls after init
internal/util/util.go - Layout and starter writer → Generated project: writes layout and code
internal/util/util.go