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 Jun 11, 2026
Latest versionv1.5.0
Imported by540 packages
Stars4.1K
Forks186
Last activity11 days ago
Latest releasev2.3.5 (11 days 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 v2

Package config is a go config management implement.

Go Configuration Libraries 583 stars 215 imported-by 95% confidence
96

#2 env

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

Go Configuration Libraries 6.2K stars 1.4K imported-by 100% confidence
95

#3 xdg

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

Go Configuration Libraries 1.0K stars 1.2K imported-by 100% confidence
93

#4 Viper

Go configuration with fangs.

Go Configuration Libraries 30.3K stars 0 imported-by 80% confidence
85

#5 cue

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

Go Configuration Libraries 6.1K stars 0 imported-by 40% confidence
83