-
coral
Coral, a friendly Cobra fork with nearly all its features, but only 4 dependencies (by muesli)
-
koanf
Simple, extremely lightweight, extensible, configuration management library for Go. Support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Came across this the other day https://github.com/knadh/koanf as an alternative to Viper.
We switched all our cli tools from cobra/viper to kong. I can highly recommend it. Almost no deps and easy to use, a great replacement for cobra in my opinion.
AFAIK there is currently no support for this out of the box. However, you could try out kongplete. I didn't have time to try it for one of my projects but it looks promising.
I love Cobra and I love Viper. They are great projects, incredibly useful and outstandingly important for the Go community. But sometimes, just sometimes, don't you wish you could use Cobra without the entire dependency chain Viper drags in?
Cobra is used in many Go projects such as Kubernetes, Hugo, and Github CLI to name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
I love Cobra and I love Viper. They are great projects, incredibly useful and outstandingly important for the Go community. But sometimes, just sometimes, don't you wish you could use Cobra without the entire dependency chain Viper drags in?
Cobra is used in many Go projects such as Kubernetes, Hugo, and Github CLI to name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
Cobra is used in many Go projects such as Kubernetes, Hugo, and Github CLI to name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
Flag functionality is provided by the pflag library, a fork of the flag standard library which maintains the same interface while adding POSIX compliance.
Related posts
-
Golang equivalent of Python’s click (CLT framework)
-
What 3rd-party libraries do you use often/all the time?
-
climate "CLI Mate": a CLI library that autogenerates CLIs from structs / functions with support for nested subcommands, global / local flags, help generation from godocs, typo suggestions, shell completion and more
-
Which packages do you recommend for building cli tools?
-
K3S Binary, How does that work?