# knadh/koanf

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

Repository: https://github.com/knadh/koanf
Canonical: https://ross.abutalabs.com/products/koanf
Language: Go
License: MIT
License Family: permissive
Topics: configuration, configuration-management, configuration-file, golang, go, golang-package, viper, yaml, toml, s3-bucket, config, config-loader, etcd-client
Last push: 2026-08-09T18:08:10+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 84, longevity 100
- inputs: {"age_days": 2633, "days_push": 24, "days_rel": 29, "gap_med": 60.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4178, forks 201 (observed 2026-08-28T04:08:38.315401+00:00)

## What it is
Koanf is a lightweight, extensible configuration management library for Go that reads configuration from multiple sources and formats. It uses a modular Provider/Parser architecture with pluggable backends like files, env vars, CLI flags, S3, Vault, Consul, and etcd.

## Use cases
- load app config from yaml, toml, or  files in Go
- read configuration from environment variables and command line flags
- load config from S3, Vault, Consul, or etcd
- watch config files for changes and hot-reload
- merge configuration from multiple sources with custom merge strategies
- find a lighter alternative to viper

## When to choose
- you need multi-source, multi-format config loading in Go with minimal dependencies
- you want pluggable providers/parsers and custom merge logic
- viper feels too heavy or its abstractions don't fit

## When to avoid
- you need a full-featured config system with built-in remote key/value watching semantics like viper's ecosystem
- your project is not in Go

## Facets
- artifact type: library
- maturity: stable
- function: configuration-management
- domain: developer-tools, backend
- platform: go, cross-platform
- tags: config-loader, viper-alternative, lightweight, yaml, toml, environment-variables, s3, etcd, vault

## Member repositories
- knadh/koanf (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:38.315401+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:22:40.931053+00:00, confidence not recorded.
  - readme: https://github.com/knadh/koanf (fetched 2026-08-28T04:08:38.315401+00:00, sha 360dfb1708d4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
