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.53k stars 6.83k forks source link

Enhance `--sysinfo` with version data and environment variable insights #1195

Open Vikranth3140 opened 4 months ago

Vikranth3140 commented 4 months ago

This PR addresses #1194 by enhancing the --sysinfo command-line argument in the GPT-Engineer CLI tool. The --sysinfo argument now provides detailed system information, including the version of gpt-engineer and environment variables with sensitive data masked for security.

Changes Include:

Usage:

To use the enhanced --sysinfo feature, run the following command:

python main.py --sysinfo

This will display the following information:

Example Output:

gpt_engineer_version: 0.1.0
os: Linux
os_version: #1 SMP Wed Dec 15 10:30:14 UTC 2021
architecture: x86_64
python_version: 3.10.2 (default, Jan 14 2022, 00:00:00) [GCC 7.5.0]
packages: {"typer": "0.4.0", "openai": "0.10.1", ...}
env_variables: {"OPENAI_API_KEY": "*****", "OTHER_VAR": "value"}

Notes:

Please review the changes and provide feedback. Thank you!

captivus commented 4 months ago

Right on, @Vikranth3140! Can you work the version details to distinguish between pip installs and builds of the repo directly?

Vikranth3140 commented 4 months ago

Hey @captivus,

I've updated the get_gpt_engineer_version function to distinguish between pip installs and direct repo builds. The function now checks for the version via pip first and, if not found, retrieves the version from git tags for direct repo builds.

Thanks for the feedback! Please review the changes and let me know if any further adjustments are needed.

Vikranth3140 commented 4 months ago

Hey @captivus,

Below is an example of how the --sysinfo output will look:

python main.py --sysinfo

Output:

gpt_engineer_version: pip version: 0.1.0
os: Linux
os_version: #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024
architecture: x86_64
python_version: 3.10.13 (main, May 30 2024, 20:38:07) [GCC 9.4.0]
packages: 
accessible-pygments: 0.0.4
aiohttp: 3.9.5
aiosignal: 1.3.1
alabaster: 0.7.16
annotated-types: 0.6.0
... (and more)
env_variables: 
OPENAI_API_KEY: *****
OTHER_VAR: value

Thanks for the feedback! Please review the changes and let me know if any further adjustments are needed.

viborc commented 4 months ago

Great job with this @Vikranth3140!

@captivus, your review would be much appreciated. This LGTM, but I would love you to take a look at it, too.

Vikranth3140 commented 3 months ago

Hey @captivus,

Do let me know if any changes are needed

viborc commented 3 months ago

Hey @Vikranth3140, @captivus is a little less available right now, but we will look into this. It lgtm, but I'd still wait for his confirmation and green light.

Thanks for your swift work on this!

Hey @captivus,

Do let me know if any changes are needed

Vikranth3140 commented 1 month ago

Hey @viborc,

Any update on this PR as I have made the system information more verbose and all the checks have passed successfully.