I'm looking for a good alternativ to Viper

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. urfave/cli

    A declarative, simple, fast, and fun package for building command line tools in Go (by urfave)

    Personally I used https://github.com/urfave/cli for CLI a lot but ended up migrating few project to cobra just because while way to use it was pretty aisine and annoying it ended up better at parsing said CLI (urfave/cli insist on positional arguments which don't work well for some cases)

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. go-envconfig

    A Go library for parsing struct tags from environment variables.

  4. godotenv

    A Go port of Ruby's dotenv library (Loads environment variables from .env files)

  5. kong

    Kong is a command-line parser for Go (by alecthomas)

    For all my commandline parsing and config loading needs I use kong. In contrast to Viper and Cobra it has almost no dependencies (while viper and cobra pull in half a jungle).

  6. ff

    Flags-first package for configuration

    Have a look at https://github.com/peterbourgon/ff

  7. cleanenv

    ✨Clean and minimalistic environment configuration reader for Golang

    check this package: https://github.com/ilyakaznacheev/cleanenv

  8. conf

    Package conf provides support for using environmental variables and command line arguments for configuration. (by ardanlabs)

  9. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  10. kelseyhightower/envconfig

    Golang library for managing configuration data from environment variables

    Pretty much all of our services and pkgs use https://github.com/kelseyhightower/envconfig. It’s dead simple, gets out of your way, and is battle tested

  11. copre

    A small library to load configuration from multiple sources with predefined precedence

    Shameless self-promotion: I encountered the same pain points and put together a small library to tie together multiple configuration sources. As I still really like cobra it is intended to be used with pflags.

  12. xflags

    Expressive flags for Go (by cavaliergopher)

    Self promo: it won’t help with the config file side of things but should elegantly cover the flags and environment variables: https://github.com/cavaliergopher/xflags.

  13. go-yamlcfg

    For config I ended up making wrapper for YAML parser that did the "pick a config from list list" and "generate default config" features. But my config needs are not that big

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Powerful template for CLI projects in Go 🐹

    7 projects | /r/golang | 5 Oct 2022
  • Snob - Dev Log (How it's done)

    6 projects | dev.to | 18 Aug 2022
  • [Happy] First mini project in Go (new go developer)

    6 projects | /r/golang | 4 Apr 2021
  • Fang, the CLI Starter Kit

    12 projects | news.ycombinator.com | 18 Jun 2025
  • Developing CLIs

    3 projects | dev.to | 12 Aug 2024

Did you know that Go is
the 4th most popular programming language
based on number of references?