Expand description
/config show + /config doctor trait + value types.
zero-commands intentionally does not depend on zero-config:
the command crate is compiled for tests and non-TUI callers
where the real TOML + keychain layer is overkill. Instead a
tiny ConfigSource trait lives here and the production
adapter in zero/src/main.rs plugs in the real
implementation. Same pattern as crate::SessionSource.
Data is returned as plain Rust — no toml::Value, no
keyring::Entry. That keeps the command crate side-effect
free (no file or network access from inside tests) and means
adapter-side changes never ripple into dispatch.
Structs§
- Config
Doctor Finding - One doctor finding.
messageis rendered verbatim; the dispatcher does not prepend severity or reformat text, so the adapter can choose its own phrasing (“token: set in keychain”, “config file missing — runzero init”, etc.) without the dispatcher needing to know the domain. - Config
Show Row - One labelled
/config showrow. - Mock
Config - In-memory
ConfigSourceused by tests. Lets a test fix a deterministic set of rows + findings without touchingzero-configor the filesystem.
Enums§
- Doctor
Severity - Severity of a doctor finding. Drives the
OutputLinekind the dispatcher emits:
Traits§
- Config
Source - Read-only trait over the operator’s on-disk config + its
secret-resolution state. Kept read-only at this layer
because write paths (
zero init,zero pair) already live in dedicated non-interactive entrypoints; the TUI should never silently rewriteconfig.toml.