A Go configuration library with a flag-like API that supports YAML, environment variables, and CLI arguments with zero boilerplate.
ZeroCfg is a Go configuration library that provides a flag-like API for managing application settings with support for YAML, environment variables, and command-line arguments. It solves the problem of configuration boilerplate by offering a declarative approach with automatic value resolution and early error detection.
Go developers building applications that require flexible configuration management across multiple environments without repetitive code.
Developers choose ZeroCfg for its elegant API that mirrors Go's flag package while adding modern features like YAML support, secret protection, and multi-source priority resolution—all with zero boilerplate.
Zero-effort, concise configuration management that avoids boilerplate and repetitive actions.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The API is directly inspired by Go's standard flag package, making it intuitive for developers familiar with Go's ecosystem and reducing the learning curve.
Automatically loads configuration from CLI, environment variables, and YAML files with a strict hierarchy (CLI highest, defaults lowest), ensuring predictable value resolution.
Catches mistyped configuration keys at parse time by default, preventing runtime issues from typos and enforcing clean configuration patterns.
Masks sensitive values marked with zfg.Secret() when rendering configuration via zfg.Show(), reducing the risk of accidental exposure in logs.
Options must be registered at import time, prohibiting runtime addition—a limitation for modular applications or systems with plugin architectures.
Only YAML is supported for file-based configuration by default; adding JSON or TOML requires implementing custom providers, unlike more feature-rich alternatives.
Unknown configuration keys cause errors by default, which can be overly strict for environments with optional or evolving configs, even though ignoring them is possible.