Consistent configuration design for environment variables
What would you like to be added?
Related: #3468
We should comprehensively redesign the environment variables (or, whole the settings) for configuring gemini-cli to provide consistency. As an example, I'll demonstrate the approach based on the currently existing configurations.
- contextFileName
- [settings.json]: The property
contextFileName - The environment variable
GEMINI_CLI_CONTEXT_FILE_NAME - The CLI option
--contextFileName
- [settings.json]: The property
- bugCommand.urlTemplate
- [settings.json]: The property
bugCommand.urlTemplate - The environment variable
GEMINI_CLI_BUG_COMMAND_URL_TEMPLATE- (Discussion) For configuration items that take objects, having environment variables accept JSON objects directly (
GEMINI_CLI_BUG_COMMAND='{"urlTemplate":"..."}') would be easier to implement, but the user experience would be slightly degraded.
- (Discussion) For configuration items that take objects, having environment variables accept JSON objects directly (
- The CLI option
--bugCommand='{"urlTemplate":"..."}'- (Discussion) For CLI options, it might be better to provide the most generalized option like
--settings='{"contextFileName":"...", ...}'and then provide individual options like--modelfor settings deemed to be frequently used.
- (Discussion) For CLI options, it might be better to provide the most generalized option like
- [settings.json]: The property
- and more...
Why is this needed?
Currently, the design of gemini-cli configuration lacks consistency.
- The naming conventions are inconsistent.
- For example, it would be good to have a prefix like
GEMINI_CLI_for environment variables as described above.
- For example, it would be good to have a prefix like
- Some settings can only be configured via environment variables (#3468), and other settings can only be configured via settings.json or command-line arguments.
- It would be better to allow the configuration from anywhere.
Additional context
No response
+1 to consistency
Found possible duplicate issues:
- #3468: (#0.9213629318096017)
- #4613: (#0.903864324092865)
Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.
It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.
Thank you for your contribution!