knadh

    knadh/koanf

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

    cli
    config
    config-loader
    configuration
    configuration-file
    configuration-management
    Go
    MIT
    4.2K stars
    219 forks
    4.2K GitHub watchers
    Updated Nov 5, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    4 releases in the last 90 days, the latest 18 days ago, with 77 contributors on GitHub.

    Use Cases & Benefits

    • Provides a lightweight, extensible configuration management library for Go supporting multiple sources and formats like JSON, YAML, TOML, env, command line, and S3.
    • Offers modular providers and parsers with minimal dependencies, enabling flexible, composable config loading and merging with custom merge strategies.
    • Use for managing application configuration from diverse sources including files, environment variables, and command line flags in Go projects.
    • Use for live-reloading configuration by watching file or remote config changes to dynamically update running Go applications.
    • Use for unmarshalling complex nested configurations into Go structs with support for flat paths and custom struct tags for type-safe config access.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    koanf is a library for reading configuration from different sources in different formats in Go applications. It is a cleaner, lighter alternative to spf13/viper with better abstractions and extensibility and far fewer dependencies.

    koanf v2 has modules (Providers) for reading configuration from a variety of sources such as files, command line flags, environment variables, Vault, and S3 and for parsing (Parsers) formats such as JSON, YAML, TOML, HUML, Hashicorp HCL. It is easy to plug in custom parsers and providers.

    All external dependencies in providers and parsers are detached from the core and can be installed separately as necessary.

    See the list of all bundled Providers and Parsers.

    Excerpt from the knadh/koanf README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    219+19

    Open issues

    16+14

    Compared with peers in CLI

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    knadh/koanf compared with CLI repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    vercel-labs/agent-desktop17.0K+13.3K33today
    mattpocock/skills315.4K+8.7K357 days ago
    stablyai/orca116.8K+6.6K40today
    obra/superpowers313.1K+4.5K532 days ago
    Panniantong/Agent-Reach109.3K+3.0K604 days ago
    knadh/koanf4.2K—5418 days ago
    Category median116.8K+6.6K40—

    Also by knadh

    Other repositories from this maintainer that GStars tracks

    Discover Repositories

    Search across tracked repositories by name or description