SuperAPI AI Directory

gpt-engineer

GPT Engineer

Open website

About this tool

GPT Engineer is a command-line (CLI) platform for code generation experiments and the predecessor of lovable.dev (gptengineer.app). It enables users to: describe software in natural language; have AI write and execute code; ask AI to implement improvements.

Key capabilities

  • Specify software requirements in natural language, and AI automatically writes and executes code.
  • You can ask AI to make improvements to the code implementation.
  • Supports customizing the AI agent's "identity" by overriding the preprompts folder, which is implemented through the --use-custom-preprompts parameter; editing preprompts is a way to make the agent remember things across projects.
  • By default, text input is received through a prompt file, and image input can also be accepted for models with vision capabilities, used to add UX or architecture diagrams as additional context; specify the image directory through the --image_directory flag, and set a model with vision capabilities in the second CLI argument.
  • Built-in bench binary, providing a simple interface for benchmarking custom agent implementations against popular public datasets. Currently supported benchmarks: APPS, MBPP.
  • By default, supports OpenAI models (via the OpenAI API or Azure OpenAI API) and Anthropic models; with some additional setup, open-source models such as WizardCoder can also be run, see the documentation for details.

Usage Install (stable version): python -m pip install gpt-engineer Development version: git clone https://github.com/gpt-engineer-org/gpt-engineer.git cd gpt-engineer Use poetry shell to activate the virtual environment. The project actively supports Python 3.10 - 3.12. The last version supporting Python 3.8 - 3.9 is 0.2.6. Export environment variables (can be added to .bashrc to avoid repeating this every time the terminal starts): export OPENAI_API_KEY=[your api key] .env file: copy .env.template to .env, and add OPENAI_API_KEY to .env. Custom models: see the documentation, supports local models, Azure, etc. For Windows usage, see the Windows README. Other ways to run: use Docker (instructions available); you can also do everything in the browser.

Create new code (default usage):

  1. Create an empty folder for the project anywhere on your computer.
  2. In the new folder, create a file named prompt (no extension) and fill in the instructions.
  3. Run gpte <project_dir>, using a relative path to point to the folder. For example: when in the root of the gpt-engineer directory and the new folder is under projects/, run gpte projects/my-new-project.

Improve existing code:

  1. Find the code folder you want to improve anywhere on your computer.
  2. In the new folder, create a file named prompt (no extension) and fill in the instructions for improving the code.
  3. Run gpte <project_dir> -i, using a relative path to point to the folder. For example: when in the root of the gpt-engineer directory and the folder is under projects/, run gpte projects/my-old-project -i.

Benchmark custom agents: gpt-engineer installs the bench binary, providing a simple interface for benchmarking custom agent implementations against popular public datasets. The easiest way to get started with benchmarking is to look at the template repository, which contains detailed instructions and an agent template. Currently supported benchmarks: APPS, MBPP. The community has carried out different benchmarking plans, and the introduction can be found in the Loom video. Some community members have written research briefs that can be further advanced, see the relevant documentation for details.

Vision input example: gpte projects/example-vision gpt-4-vision-preview --prompt_file prompt/text --image_directory prompt/images -i

About gptengineer.app (GPT Engineer) gptengineer.app is a commercial project that automatically generates web apps, provides a UI for non-technical users, and connects to a git-controlled codebase. The gptengineer.app team actively supports the open-source community.

Community and governance The gpt-engineer community mission is to maintain the tools available to builders of coding agents and to foster open-source community collaboration. If you are interested in contributing, you are welcome to participate. For the broader vision, see the roadmap; you can join discord to learn how to contribute. gpt-engineer is governed by a board of long-term contributors; if you contribute regularly and are interested in shaping the future of gpt-engineer, you will be considered for inclusion on the board. By using gpt-engineer, you agree to its terms.