Essentially, you can write CLI code using functions and struct types following a certain convention, and then use these tools to generate code for flags, env vars, config files, subcommands, etc.<p><pre><code> func AddTask(opt Opt, path string)
</code></pre>
...will be turned into a CLI command "add task" where all the fields of "Opt" can be set via flags/env/yaml, and the positional args are mapped in too. Default values are taken from "DefaultOpt()", if it exists.<p>I've written a number of Go apps now, and I always feel like CLI + config is a struggle. This is my latest attempt to distill all that experience into something I can reuse. It's still rough around the edges, but the armature is there now. Hopefully you can get a feel for what it is and where it's headed. There's still a long list of additions and cleanups I want to make.<p>Thanks in advance for any feedback!