rust-cli/confy

Compatibility with CLI parsing

spacekookie opened this issue · 2 comments

The general idea behind this feature is the following. Take a configuration file:

my_option = "foo"

and a CLI which also wants to provide the option my_option which, if provided overrides the config state and if isn't, just uses the default provided by the configuration.

Open Questions

  • A similar problem was already solved by config (and others), can we just use their work/ be compatible with them?
  • It should also be to use this feature with clap.rs directly, structopt or thunder so a more generic approach is generally good

Similar to my comment #4 (comment), this was suggested as a non-goal in #3 (comment):

Viper looks like something that tries to do everything which is not something I think we should replicate or even try to emulate.

(Where viper has multipart configs, env vars, command line handling, and even more.)

No strong feelings, just wanted to point it out. :-)

I came looking for clap integration. Aside, I've so far decided not to use config crate anymore. I don't want to use toml anyway. SCL is too good, and I really haven't seen any need for the level of configurability that config offers.