Imported from kristiandupont/mac-monitor (
internal/config/AGENTS.md). Install upstream withnpx skills add kristiandupont/mac-monitor --skill config. Copyright stays with the author.
internal/config AGENTS.md
Purpose: Loads user settings from config.json in the app's data directory (next to the database).
Notes:
- JSON (stdlib only). A missing file is written out with defaults so users can discover the settings; missing keys keep their defaults.
- On a malformed file
Loadreturns defaults and an error — the caller logs it and keeps running rather than refusing to start. Durationaccepts Go duration strings plus ad(days) suffix.Webis edited from the menu bar at runtime (viaStore.Update), not just at startup.remotewithout apassword_hashis ignored.
Key Files:
config.go:Config,Load,Duration.
Relationships: Used by cmd/mac-monitor, which passes individual values on to storage and server (Web → server.Settings).
