With the clap_serde procedural macro both clap and serde can be derived from a struct. Then the struct can be parsed from clap and serde sources as in a layered config: the last source has the precedence.