Popular Frameworks for Building CLIs
This chapter will explore the most popular frameworks available to assist you with rapidly developing modern CLI applications. After seeing all the code that it takes to manually create a command and structure a CLI application, you’ll see how Cobra allows developers to quickly generate all the scaffolding needed for a CLI application and add new commands easily.
Viper easily integrates with Cobra to configure your applications locally or remotely using multiple formats. The options are extensive, and developers can choose what they feel works best for their project and what they are comfortable with. This chapter will give you an in-depth look at Cobra and Viper through the following topics:
- Cobra – a library for building modern CLI applications
- Viper – easy configuration for CLIs
- Basic calculator CLI using Cobra and Viper