gpt-engineer icon indicating copy to clipboard operation
gpt-engineer copied to clipboard

Add GPTE CLI argument to output system information

Open captivus opened this issue 9 months ago • 2 comments

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!

captivus avatar May 09 '24 17:05 captivus

What specific system information do you think should be included in --sysinfo @captivus ?

ATheorell avatar May 09 '24 18:05 ATheorell

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.

captivus avatar May 09 '24 21:05 captivus

@viborc can you assign me to this issue?

satya-nutella avatar May 16 '24 17:05 satya-nutella

Hey, @satya-nutella, please update us briefly about your progress with this, when you catch a moment.

viborc avatar May 23 '24 18:05 viborc

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?

viborc avatar May 30 '24 18:05 viborc

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 in main.py.
  • Implemented get_system_info and get_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.

Vikranth3140 avatar Jun 06 '24 19:06 Vikranth3140

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!

viborc avatar Jun 20 '24 16:06 viborc

Hey @viborc, if possible please review my PR and let me know if any changes are to be done :)

Vikranth3140 avatar Jun 29 '24 20:06 Vikranth3140

Hey @captivus, thanks a lot for reviewing and merging my PR. I think we can close this issue as #1169 fixes this issue :)

Vikranth3140 avatar Jul 07 '24 19:07 Vikranth3140

Closing! Thanks and congrats again on the PR @Vikranth3140!

captivus avatar Jul 07 '24 22:07 captivus