SHORTLIST20
English
Englishالعربية中文日本語한국어EspañolFrançaisहिन्दी
Programming

Go configuration libraries

Config file, environment and flag loaders for Go, ranked by GitHub stars

Updated · GitHub stars (stars)

Why these 20

Ranked by GitHub stars: how many developers bookmarked the project. Stars measure attention, not quality, so each row also shows forks, licence and the last push. Tools without a public repository have no star count and can't be ranked here.

Is this list useful?
  1. 1

    viper

    Go configuration with fangs.

    30,532 stars 2,298 forkslast push 2026-01-12GoMIT

  2. 2

    godotenv

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

    10,692 stars 468 forkslast push 2026-08-04GoMIT

  3. 3

    sonic

    A blazingly fast JSON serializing & deserializing library.

    9,662 stars 486 forkslast push 2026-10-27GoApache-2.0

  4. 4

    caarlos0/env

    Parse environment variables to Go structs (with defaults).

    6,367 stars 298 forkslast push 2026-11-05GoMIT

  5. 5

    kelseyhightower/envconfig

    Go library for managing configuration data from environment variables.

    5,474 stars 398 forkslast push 2025-06-28GoMIT

  6. 6

    koanf

    Light weight, extensible library for reading config in Go applications. Built in support for JSON, TOML, YAML, env, command line.

    4,242 stars 224 forkslast push 2026-11-19GoMIT

  7. 7

    go-ini/ini

    Go package to read and write INI files.

    3,538 stars 397 forkslast push 2026-11-19GoApache-2.0

  8. 8

    cleanenv

    Minimalistic configuration reader (from files, ENV, and wherever you want).

    2,167 stars 132 forkslast push 2025-09-15GoMIT

  9. 9

    xdg

    Go implementation of the XDG Base Directory Specification and XDG user directories.

    1,028 stars 42 forkslast push 2026-11-10GoMIT

  10. 10

    aconfig

    Simple, useful and opinionated config loader.

    656 stars 43 forkslast push 2025-11-28GoMIT

  11. 11

    konfig

    Composable, observable and performant config handling for Go for the distributed processing era.

    645 stars 53 forkslast push 2020-10-28GoMIT

  12. 12

    gookit/config

    application config manage(load,get,set). support JSON, YAML, TOML, INI, HCL. multi file load, data override merge.

    584 stars 70 forkslast push 2026-11-17GoMIT

  13. 13

    confita

    Load configuration in cascade from multiple backends into a struct.

    505 stars 49 forkslast push 2026-03-18GoMIT

  14. 14

    konf

    The simplest API for reading/watching config from file, env, flag and clouds (e.g. AWS, Azure, GCP).

    397 stars 12 forkslast push 2026-11-16GoMIT

  15. 15

    fig

    Tiny library for reading configuration from a file and from environment variables (with validation & defaults).

    382 stars 33 forkslast push 2025-06-03GoApache-2.0

  16. 16

    GoLobby/Config

    GoLobby Config is a lightweight yet powerful configuration manager for the Go programming language.

    364 stars 27 forkslast push 2023-01-05GoMIT

  17. 17

    hjson

    Human JSON, a configuration file format for humans. Relaxed syntax, fewer mistakes, more comments.

    359 stars 47 forkslast push 2026-11-19GoMIT

  18. 18

    JeremyLoy/config

    Cloud native application configuration. Bind ENV to structs in only two lines.

    336 stars 14 forkslast push 2026-10-12GoMIT

  19. 19

    envconfig

    Read your configuration from environment variables.

    250 stars 31 forkslast push 2025-01-31GoMIT

  20. 20

    zerocfg

    Zero-effort, concise configuration management that avoids boilerplate and repetitive code, supports multiple sources with priority overrides.

    200 stars 10 forkslast push 2026-07-19GoMIT

How it is measured

Every tool in the Configuration section(s) of the community list avelino/awesome-go on GitHub with a public repository, ranked by GitHub stars from the GitHub API; archived repositories are left out. Added by the daily list generator.

References

  1. avelino/awesome-go: Configuration, GitHub community list (list text MIT; star counts from the GitHub API). Checked 2026-11-20 13:13 UTC.
  2. avelino/awesome-go (Configuration), GitHub community list, 66 tools with a public repository.