Files
ConfigKit/README.md

42 lines
1.9 KiB
Markdown
Raw Normal View History

2026-09-06 13:35:33 +00:00
# ConfigKit
An opinionated Go library for applications that use YAML configuration files.
2026-09-06 22:47:12 +00:00
ConfigKit's initial loader accepts one strict YAML
2026-09-06 20:51:21 +00:00
source (or explicit defaults-only input), optionally traverses explicit path and glob
imports, strictly composes their disjoint definitions, applies typed defaults, and
2026-09-06 21:03:45 +00:00
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,
2026-09-06 21:21:11 +00:00
then report domain errors and warnings through read-only semantic validation. Secret
tags and a path predicate drive deterministic redacted effective YAML. Typed secret
references resolve environment names before validation, and explicit
secrets-directory bootstrap is available as a separate startup operation. Explicit
CLI override records apply above profiles. Value explanation is available through
detached structured records and deterministic redacted output.
```go
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](docs/config.md) describes implemented behavior. The
[consumer adoption guide](docs/consumers/README.md) provides maintained Narratio-,
Notarius-, WeatherReporter-, and Seriatim-shaped examples and migration guidance.
2026-09-06 22:47:12 +00:00
The [initial target record](docs/roadmap/initial.md) links implemented feature owners
and preserves deliberately deferred scope. The [implementation plan](docs/roadmap/implementation.md)
records completion evidence until release-candidate preparation retires it. See the
[development guide](docs/development.md) for repository orientation and the
[release procedure](docs/release.md) for maintainer-only candidate and publication
steps.