2026-09-06 21:21:11 +00:00
2026-09-06 13:35:33 +00:00
2026-09-06 10:52:38 -05:00
2026-09-06 21:03:45 +00:00
2026-09-06 20:51:21 +00:00
2026-09-06 20:51:21 +00:00
2026-09-06 20:51:21 +00:00
2026-09-06 21:03:45 +00:00
2026-09-06 13:35:33 +00:00
2026-09-06 21:21:11 +00:00
2026-09-06 21:21:11 +00:00
2026-09-06 21:09:52 +00:00
2026-09-06 21:03:45 +00:00
2026-09-06 21:03:45 +00:00
2026-09-06 20:41:40 +00:00
2026-09-06 21:03:45 +00:00
2026-09-06 21:03:45 +00:00
2026-09-06 21:21:11 +00:00
2026-09-06 20:14:55 +00:00
2026-09-06 21:21:11 +00:00
2026-09-06 20:51:21 +00:00

ConfigKit

An opinionated Go library for applications that use YAML configuration files.

ConfigKit is in early implementation. Its current loader accepts one strict YAML source (or explicit defaults-only input), optionally traverses explicit path and glob imports, strictly composes their disjoint definitions, applies typed defaults, and can overlay one selected fixed profile and check an application schema version. It returns detached metadata and safe diagnostics. Applications may perform audited defaulting and normalization through a resolver, then report domain errors and warnings through read-only semantic validation. Secret tags and a path predicate drive deterministic redacted effective YAML. Explicit secrets-directory bootstrap is available as a separate startup operation. Overrides, typed secret references, and value explanation are still under development.

type Config struct {
    Enabled bool `yaml:"enabled"`
    Workers int  `yaml:"workers"`
}

func ReadConfig(path string) (Config, error) {
    result, err := configkit.Load[Config](configkit.File(path))
    if err != nil {
        return Config{}, err
    }
    return result.Config, nil
}

The configuration contract describes implemented behavior. The initial target design describes planned behavior. The implementation plan owns the pending stages. See the development guide for repository orientation.

Description
An opinionated Go library for applications that use YAML configuration files.
Readme LGPL-3.0 13 MiB
Languages
Go 99.9%