gpt-engineer
gpt-engineer copied to clipboard
Add GPTE CLI argument to output system information
When running GPTE, it will be quite helpful to be able to quickly generate useful system information for use in debugging issues.
For example, this should be invoked as gpte --sysinfo
.
This invocation should output system information in a standardized and useful way, so that users can readily copy and paste the output into GitHub, Discord, etc ...
Here are some requirements for this CLI argument:
- The CLI argument should use system-native commands or those available from the packages installed by GPTE (i.e. it should not require or install additional tools).
- The CLI argument should not expose personally identifiable or other sensitive information.
- When running
gpte --sysinfo
the application immediately outputs the system information without executing any of the other application flow and returns the user back to the command line. - When running gpte --sysinfo the application does not require an OpenAI (or any other LLM) API key but, rather, immediately generates the system information and outputs it.
Here are some examples of system information that should be returned by running gpte --sysinfo
:
Outputs of Linux operating system commands like:
-
uname -a
-
lsb_release -a
-
cat /proc/version
and, in Windows:
-
systeminfo
We should also include Python-specific information, like the output of:
-
pip freeze
-
python --version
-
which python
These are indicative but not comprehensive.
This is a great first issue for a new contributor!
What specific system information do you think should be included in --sysinfo @captivus ?
Outputs of Linux operating system commands like:
-
uname -a
-
lsb_release -a
-
cat /proc/version
and, in Windows:
-
systeminfo
We should also include Python-specific information, like the output of:
-
pip freeze
-
python --version
-
which python
These are indicative but not comprehensive. I've updated the original issue description to reflect this guidance.
@viborc can you assign me to this issue?
Hey, @satya-nutella, please update us briefly about your progress with this, when you catch a moment.
Thanks for joining today, @satya-nutella. Let's go and have a PR open with your work on this issue in the coming few days. Is that possible?
Hey @viborc , I've tried to implement the --sysinfo
CLI argument as suggested. This new feature outputs detailed system information, including the operating system, OS version, system architecture, Python version, and installed Python packages. This should help in debugging and troubleshooting.
Example Usage:
Run the following command to display the system information:
python main.py --sysinfo
Example Output:
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", ...}
Summary of Changes:
- Added
--sysinfo
option to the Typer CLI inmain.py
. - Implemented
get_system_info
andget_installed_packages
functions to gather and format system information.
Please review the changes and let me know if any adjustments are needed. I've created a pull request for this enhancement.
I see we are making good progress at https://github.com/gpt-engineer-org/gpt-engineer/pull/1169 so let's keep communicating about this issue there. Thanks for your good work and efforts!
Hey @viborc, if possible please review my PR and let me know if any changes are to be done :)
Hey @captivus, thanks a lot for reviewing and merging my PR. I think we can close this issue as #1169 fixes this issue :)
Closing! Thanks and congrats again on the PR @Vikranth3140!