feat: add TOML config system with layered loading

Layers: defaults → ~/.config/gnoma/config.toml → .gnoma/config.toml
→ environment variables. Supports ${VAR} references in API keys,
GNOMA_PROVIDER/GNOMA_MODEL env overrides, alternative env var names
(ANTHROPICS_API_KEY, GOOGLE_API_KEY).

Custom Duration type for TOML string parsing. 6 tests.
This commit is contained in:
2026-04-03 13:51:03 +02:00
parent 54ae24d11c
commit e3981faff3
6 changed files with 330 additions and 0 deletions

1
go.mod
View File

@@ -3,6 +3,7 @@ module somegit.dev/Owlibou/gnoma
go 1.26.1
require (
github.com/BurntSushi/toml v0.3.1
github.com/VikingOwl91/mistral-go-sdk v1.2.1
github.com/anthropics/anthropic-sdk-go v1.29.0
github.com/openai/openai-go v1.12.0