Automated ranking

Best Go Configuration Libraries

Compare go configuration libraries by maintenance, adoption, security, release activity, and Go ecosystem usage. Top packages in this group include Koanf, Viper, env.

Best overall

Koanf

Highest combined package health score.

95
Best maintained

Koanf

Strongest maintenance signal in this category.

95
Most adopted

Koanf

Highest adoption signal from stars, forks, and imported-by data.

100

Ranked Packages

12 packages

#1 Koanf

Simple, extremely lightweight, extensible, configuration management library for Go. Supports JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.

Go Configuration Libraries 4.0K stars 540 imported-by 100% confidence
95

#2 Viper

Go configuration with fangs.

Go Configuration Libraries 30.3K stars 103.3K imported-by 65% confidence
88

#3 env

A simple, zero-dependencies library to parse environment variables into structs

Go Configuration Libraries 6.2K stars 0 imported-by 45% confidence
86

#4 ini

Package ini provides INI file read and write functionality in Go

Go Configuration Libraries 3.5K stars 0 imported-by 45% confidence
85

#5 v2

Package config is a go config management implement.

Go Configuration Libraries 0 stars 215 imported-by 75% confidence
73

#6 Kono

lightweight extendable API Gateway in Go - parallel fan-out, flexible aggregation, and zero configuration magic.

Go Configuration Libraries 6 stars 0 imported-by 100% confidence
72

#7 xdg

Package xdg provides an implementation of the XDG Base Directory Specification.

Go Configuration Libraries 0 stars 1.2K imported-by 80% confidence
63

#8 configor

Go Configuration Libraries 0 stars 870 imported-by 75% confidence
51

#9 argus

File watching and configuration management with MPSC ring buffer, adaptive batching strategies, and universal format parsing (JSON, YAML, TOML, INI, HCL, Properties).

Go Configuration Libraries 0 stars 1 imported-by 45% confidence
51

#10 agent-sdk-go

Go SDK for building durable AI agents on Temporal with support for tools, MCP, human approvals, and sub-agent delegation.

Go Configuration Libraries 0 stars 0 imported-by 45% confidence
44

#11 cue

The home of the CUE language! Validate and define text-based and dynamic configuration

Go Configuration Libraries 0 stars 0 imported-by 20% confidence
43

#12 go-config

Yaml Config Loader

Go Configuration Libraries 0 stars 0 imported-by 40% confidence
41

Comparison Matrix

score dimensions
Package Health Maintenance Adoption Security Imported by
Koanf 95 95 100 92 540
Viper 88 80 100 92 103.3K
env 86 95 91 70 0
ini 85 95 88 70 0
v2 73 90 40 92 215
Kono 72 95 24 92 0
xdg 63 45 59 92 1.2K
configor 51 15 50 92 870
argus 51 48 12 92 1
agent-sdk-go 44 48 7 70 0
cue 43 48 5 70 0
go-config 41 48 5 70 0