# I built a minimal CLI app framework which can be configured using a single YAML file

**URL:** <https://forum.golangbridge.org/t/i-built-a-minimal-cli-app-framework-which-can-be-configured-using-a-single-yaml-file/21509>\
**Category:** Releases\
**Created:** [November 29, 2020, 4:51am UTC](https://forum.golangbridge.org/t/i-built-a-minimal-cli-app-framework-which-can-be-configured-using-a-single-yaml-file/21509 "2020-11-29T04:51:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarshverma](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/utkarshverma/32/7406_2.png) [@utkarshverma](https://forum.golangbridge.org/u/utkarshverma)\
**Post date:** [November 29, 2020, 4:51am UTC](https://forum.golangbridge.org/t/i-built-a-minimal-cli-app-framework-which-can-be-configured-using-a-single-yaml-file/21509/1 "2020-11-29T04:51:33Z")

</div>

I recently found myself building a couple of CLI applications and just couldn’t bear repeatedly modifying multiple files just to add in a new flag to the command line interface. And what’s worse is that it usually introduced some bugs midway. To tackle this issue, I decided to centralise the entire CLI configuration, and I ended up with this project.  
The usage is simple. **You define the entire CLI in a single YAML schema, and the code handles the rest**. To achieve this, I’ve used reflection and code generation, or `go generate`.

Here’s the project: [UtkarshVerma/go-cli-boilerplate](https://github.com/UtkarshVerma/go-cli-boilerplate)

> I know that there’s already a better framework for doing this, [spf13/cobra](https://github.com/spf13/cobra), but I was unaware of it at the time I started developing this project. It was a mistake on my end, but anyways, this project did teach me a lot so I don’t regret it.

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [February 27, 2021, 4:51am UTC](https://forum.golangbridge.org/t/i-built-a-minimal-cli-app-framework-which-can-be-configured-using-a-single-yaml-file/21509/2 "2021-02-27T04:51:38Z")

</div>

Closed on February 27, 2021, 4:51am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
