AryanK1511 / github-echo

A command-line tool built to obtain in-depth, actionable information about GitHub repositories that is often challenging to decipher manually.
https://pypi.org/project/gh-echo/
MIT License
14 stars 5 forks source link

Feature Request: Add Support for TOML "Dotfile" Configuration #46

Closed Fahad-Ali-Khan-ca closed 1 month ago

Fahad-Ali-Khan-ca commented 1 month ago

Issue:
Users would like the option to specify configuration settings for the tool via a TOML file located in their home directory. This would allow them to store default options in a configuration file rather than passing them as command-line arguments every time.

Proposed Solution:
I propose adding support for a TOML configuration file in the user’s home directory (e.g., ~/.github-echo-config.toml). The tool would read and apply configuration settings from this file, with the ability to override them via command-line arguments.

Details:

  1. The tool should look for a .toml file in the home directory.
  2. If the config file is missing, it should be ignored.
  3. If the config file is present but cannot be parsed, the tool should exit with an appropriate error message.
  4. Any settings specified in the config file should be used unless overridden by command-line arguments.
  5. The tool should ignore any options in the config file that it doesn’t recognize.

Example Config File:

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

TOML Parsing Library:
There are several well-maintained TOML libraries available. I will research and select one that best fits the project’s existing codebase.