github.com/knadh/koanf

Koanf

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

95

Decision Signals

Health score 95/100, confidence 100/100.

Excellent
Maintenance 95
Adoption 100
Security 92
Maturity 94
Developer DX 91
Confidence 100

Install

go get github.com/knadh/koanf

Package Data

updated May 28, 2026
Latest versionv1.5.0
Imported by540 packages
Stars4.0K
Forks186
Last activity7 days ago
Latest releasev2.3.4 (2 months ago)
LicenseMIT
Known vuln records0

API Surface

77 symbols
SymbolKindSynopsis
Conf Type type Conf struct{ ... }
Conf.Delim Field Delim string
Conf.StrictMerge Field StrictMerge bool
KeyMap Type type KeyMap map[string][]string
Koanf Type type Koanf struct{}
Koanf.All Method func (ko *Koanf) All() map[string]interface{}
Koanf.Bool Method func (ko *Koanf) Bool(path string) bool
Koanf.BoolMap Method func (ko *Koanf) BoolMap(path string) map[string]bool
Koanf.Bools Method func (ko *Koanf) Bools(path string) []bool
Koanf.Bytes Method func (ko *Koanf) Bytes(path string) []byte
Koanf.Copy Method func (ko *Koanf) Copy() *Koanf
Koanf.Cut Method func (ko *Koanf) Cut(path string) *Koanf

Similar Packages

Go Configuration Libraries

#1 Viper

Go configuration with fangs.

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

#2 env

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

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

#3 ini

Package ini provides INI file read and write functionality in Go

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

#4 v2

Package config is a go config management implement.

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

#5 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