Skip to content

Manually creating/editing the config file? #21

@shinglyu

Description

@shinglyu

(The Discord chat room doesn't seem to load, so I'm asking here)

In the design philosophy of confy, is the developer allowed (or encouraged) to edit the config file manually?

I'm asking because based on the documentation, the creation of a new config file is done by:

  1. Implement the Default trait on the config struct
  2. Run confy::load()

Editing the config is done by confy::store(). So the creation and update of the config are done through Rust code.

So if I understand correctly, this crate is used to persist configurations between different executions. But not as a config file solution similar to dotenv or rc files (e.g. .bashrc, .vimrc), where people write a configuration file manually so they can override the program's behavior without re-compiling the code?

If the user is encouraged to directly edit the config file instead of using the confy::store() function, then I believe we need to put more thoughts into how a first-time user can create a new config file. Maybe the developer needs to implement a separate "first-time configuration wizard" CLI that help the user choose the configuration? It would be great to clarify the common use cases and patterns in the documentation besides the two core APIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions