Skip to main content

Module config_cmd

Module config_cmd 

Source
Expand description

config CLI subtree — show / get / set / schema / validate.

Operates on the canonical user-file path <ProjectDirs::config_dir()>/<tool>/config.yaml (overridable via --config-file PATH). Format is determined by the file’s extension on read and kept consistent on write:

ExtensionFormat
.yml, .yaml (or no extension)YAML
.tomlTOML
.jsonJSON

§Design note (v0.4)

The framework’s App currently carries Arc<Config<()>> — the typed-config generic App<C> is post-v0.1 work. So the v0.4 subtree operates on the file directly rather than the typed Config<C>. get / set walk the parsed value as a serde_yaml::Value; schema errors with a helpful message pointing at the typed-config integration gap. The behaviour upgrades non-disruptively when App<C> lands.

§Lint exception

linkme::distributed_slice emits #[link_section] which Rust 1.95+ flags under unsafe_code. Allowed at module level — no hand-rolled unsafe blocks anywhere in the module.

Structs§

ConfigCmd
The config subcommand.