treykeown/arguably

Implement config interface

treykeown opened this issue · 1 comments

Loading configuration is a very common pattern for CLIs - we need a way to do this. Design should use something like arguably.arg.config() and use the values in there to replace default values.

Current plan is this:

  • Add a config_flag kwarg to arguably.run(), as we do with --version
  • Lay out config file in a way that mirrors the command structure
  • Based off of the arg type, parse values in the toml/yaml/etc file.
  • Automatically wire in config values

Open questions:

  • May be better not to have config file layout mirror command structure?
    • Should config files be required to change if command structure changes?
    • If not this, how can we specify which config values correspond to which command/arg?

This effort and #10 are very closely related.