gpt-engineer-org / gpt-engineer

Platform to experiment with the AI Software Engineer. Terminal based. NOTE: Very different from https://gptengineer.app
MIT License
52.41k stars 6.82k forks source link

Implement a Unified Configuration File for Project Settings #1165

Open similato87 opened 5 months ago

similato87 commented 5 months ago

Feature description

I propose the implementation of a general, unified configuration file in TOML format for the gpt-engineer project. This configuration file would serve as a centralized repository for various project settings, including but not limited to:

The file should be persistent on the disk and should be presented to users upon each run of the application. While users will be encouraged to review and modify the settings as needed, they will not be forced to make changes. The system should offer the option to open this configuration file with the user’s default editor, with a simple bypass option that proceeds without opening the file but notifies the user of its existence and purpose.

Motivation/Application

Currently, the project has several configuration files managing different aspects of the application. Having a single, unified configuration file would simplify the management of these settings and enhance the maintainability of the codebase. This approach would also streamline the user experience and provide a clear, consistent method for setting and reviewing configurations.

The proposed configuration file in TOML format ensures readability and ease of use, aligning with modern best practices for configuration management. By reducing the complexity and fragmentation of configuration management, we can improve both developer and user experience, facilitating easier updates and modifications as the project evolves.

Request for Community Input

I invite all contributors to suggest what additional configurations might be relevant for inclusion in this unified file and to propose ideas on how best to implement this feature. Your insights and expertise are invaluable as we work to make this enhancement beneficial for everyone.

Policy and info

similato87 commented 5 months ago

Hi @ATheorell,

Could you please review the proposed feature description for the general config file? Does it align with your expectations, or do you have alternative suggestions? Your insights are invaluable to the development of this feature.

As a preliminary step, would you recommend creating a config.toml in the project root directory? This would allow the gpte command to load configurations at the first step when executed. At the same time, I plan to deprecate both the env and the env template. Users would be required to configure all settings, including API keys, prior to the initial run.

ATheorell commented 5 months ago

First of all, thank you so much for pushing a comprehensive discussion about this very needed feature @similato87 :)

Some thoughts:

More things will probably pop up along the way :)

similato87 commented 5 months ago

Hi Axel and Erik,

First, thank you, @ATheorell , for reminding us about the existing configuration handling, and @ErikBjare , for providing the initial project_config.py. It's a solid foundation, but we might need to make some adjustments to use it as our configuration utility library effectively.

I fully agree that we should maintain our current behavior to avoid confusing our users. However, I suggest we also offer an alternative approach for those who might prefer to set up API keys and other parameters in a single file. Some users may appreciate the simplicity of having all configurations in one place. We can introduce this option in the README while preserving the original logic for existing users.

Axel, I'd like to hear your thoughts on the sections for the unified configuration file. Specifically:

ATheorell commented 5 months ago

As we discussed in the meeting, I think the config should include defaults for all, or nearly all of the cli arguments.