Skip to content

Support using a TOML "dotfile" #12

@HTSagara

Description

@HTSagara

Description

Users want to be able to specify all of their options to your tool in a TOML formatted configuration file that they store in their home directory, instead of having to pass them all as command line arguments every time. For example, consider the following config file, ~/.your-toolname-config.toml

model = "gpt-4o"
api_key = "sk-...."
# etc...

Requirements

  1. The tool should look in the home dir for a "dotfile" TOML config (i.e., a file that starts with . and contains default options in TOML format)
  2. If the file is missing, ignore this
  3. If the file is present but can't be parsed as TOML, exit with an appropriate error message.
  4. If the file exists and no command line args override any values, the values in the config file should be used (e.g., use the model in the config)
  5. The program should ignore any options in the config file it doesn't recognize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions