You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, if a user launches ./edgee without an existing edgee.toml (or edgee.yaml) configuration file, the system exits without guidance. This can be confusing for new users. Instead, we should prompt the user to generate a default configuration file (edgee.toml), guiding them through the setup process interactively.
Proposed Solution
When ./edgee is launched and no configuration file is detected, the application should prompt the user with a series of questions, enabling them to easily set up their basic configuration. After gathering the necessary inputs, the system should auto-generate the edgee.toml file with the following structure:
Interactive Prompt: When no config file exists, ./edgee should prompt the user with questions for each key in the configuration (e.g., log level, http address, etc.). Default values should be provided, with an option to skip or accept defaults.
Modular Design: The prompt system should be flexible and easily extendable, allowing for additional questions or configuration nodes to be added in the future without requiring major refactoring.
Rust Compatibility: The implementation should be in Rust and follow best practices for CLI interactivity and file generation. Consider using libraries like dialoguer for prompt handling and toml-rs for generating the configuration file.
Error Handling: Handle cases where users input invalid values (e.g., incorrect IP address formats) with clear error messages and an option to re-enter valid input.
Benefits:
Improved user experience for first-time users.
Simplifies the initial setup process, reducing the barrier to entry for those new to Edgee.
Provides a foundation for future configuration options to be added easily.
Additional Context:
This prompt-based config generation will ensure that users can get started quickly and will be especially useful for those unfamiliar with Edgee’s configuration syntax. The system should also create the config file in the current directory where ./edgee is launched.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, if a user launches
./edgee
without an existingedgee.toml
(oredgee.yaml
) configuration file, the system exits without guidance. This can be confusing for new users. Instead, we should prompt the user to generate a default configuration file (edgee.toml
), guiding them through the setup process interactively.Proposed Solution
When
./edgee
is launched and no configuration file is detected, the application should prompt the user with a series of questions, enabling them to easily set up their basic configuration. After gathering the necessary inputs, the system should auto-generate theedgee.toml
file with the following structure:Requirements:
Interactive Prompt: When no config file exists, ./edgee should prompt the user with questions for each key in the configuration (e.g., log level, http address, etc.). Default values should be provided, with an option to skip or accept defaults.
Modular Design: The prompt system should be flexible and easily extendable, allowing for additional questions or configuration nodes to be added in the future without requiring major refactoring.
Rust Compatibility: The implementation should be in Rust and follow best practices for CLI interactivity and file generation. Consider using libraries like dialoguer for prompt handling and toml-rs for generating the configuration file.
Error Handling: Handle cases where users input invalid values (e.g., incorrect IP address formats) with clear error messages and an option to re-enter valid input.
Benefits:
Additional Context:
This prompt-based config generation will ensure that users can get started quickly and will be especially useful for those unfamiliar with Edgee’s configuration syntax. The system should also create the config file in the current directory where ./edgee is launched.
The text was updated successfully, but these errors were encountered: