GPT-Engineer setup: generate a Python Snake project

Learn the demonstrated GPT-Engineer workflow with Conda, Python 3.11.3 and an OpenAI API key, then follow a Snake game prompt through code generation.

Player not loading? Watch on YouTube

Uploaded on June 14, 2023, this tutorial covers an early GPT-Engineer workflow using Python 3.11.3. The source does not identify a GPT-Engineer version. The presenter reports generating a working Snake game on his first attempt without edits or bug fixes; that result is his account of one example.

The setup starts with cloning the repository and creating a Conda environment to avoid Python package conflicts. He installs dependencies through requirements.txt, opens the project in Visual Studio Code and edits the example prompt. A later update in the supplied description says installation uses pip install gpt-engineer and places example files and output under projects/my-new-project/workspace. These are dated source instructions, not confirmation of the current setup.

The prompt requests Snake in Python, with MVC components in separate files and keyboard controls. GPT-Engineer asks for clarification about rules and code structure. The presenter uses ChatGPT to draft the game rules, pastes them into the terminal and follows the generated files in the workspace.

This coding assistant runs through a local terminal, but the demonstrated workflow requires an OpenAI account and API key rather than offline model inference. The presenter also says the tool did not appear to support reading and iterating on an existing codebase at the time.