Home
Login

A natural language-based AI code generation command-line tool that allows AI to automatically write and execute code.

MITPython 54.4kAntonOsikagpt-engineer Last Updated: 2025-05-14

GPT Engineer Project Detailed Introduction

Project Overview

GPT Engineer is a pioneering AI code generation experimentation platform developed by Anton Osika. Dubbed "The OG code generation experimentation platform," it is one of the pioneers of modern AI-assisted programming tools.

Project Address: https://github.com/AntonOsika/gpt-engineer

Core Features

GPT Engineer allows you to:

  • Natural Language Programming: Describe software requirements in natural language.
  • Automatic Code Generation: AI automatically writes and executes code.
  • Iterative Improvement: Request AI to implement improvements and optimizations.
  • Multimodal Support: Supports text and image input (suitable for models that support vision).

Installation Instructions

Stable Version Installation

python -m pip install gpt-engineer

Development Version Installation

git clone https://github.com/gpt-engineer-org/gpt-engineer.git
cd gpt-engineer
poetry install
poetry shell

System Requirements

  • Python Version: Actively supports Python 3.10 - 3.12
  • Historical Compatibility: Python 3.8 - 3.9's last supported version is 0.2.6
  • Operating System: Supports Linux, macOS, Windows (with dedicated Windows usage instructions)

Configuration Settings

API Key Configuration

Choose one of the following methods:

Environment Variable Method:

export OPENAI_API_KEY=[your api key]

Configuration File Method:

  • Copy the .env.template file and rename it to .env
  • Add your OPENAI_API_KEY in the .env file

Custom Models

Supports local models, Azure, and other models. See the project documentation for details.

Usage Instructions

Creating a New Project

  1. Create an empty folder on your computer.

  2. Create a file named prompt (without extension) inside the folder.

  3. Fill in the project instructions in the file.

  4. Run the command:

    gpte <project_dir>
    

    Example:

    gpte projects/my-new-project
    

Improving Existing Code

  1. Find the folder containing the code you want to improve.

  2. Create a prompt file inside the folder and fill in the improvement instructions.

  3. Run the command:

    gpte <project_dir> -i
    

    Example:

    gpte projects/my-old-project -i
    

Multimodal Input (Image Support)

For models that support vision, you can add images as context:

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

Advanced Features

Custom Preprompts

You can specify the "identity" of the AI agent by overriding the preprompts folder:

--use-custom-preprompts

Editing preprompts is a way to let the agent remember content between projects.

Benchmarking Functionality

GPT Engineer installs a bench binary that provides a simple benchmarking interface:

  • Supports benchmarking against popular public datasets.
  • Provides a template repository.
  • Currently supported benchmarking tools.

Docker Support

Provides Docker running method, see the Docker documentation in the project for details.

Supported Models

  • OpenAI Models: Via OpenAI API or Azure OpenAI API
  • Anthropic Models: Supports the Claude series
  • Open Source Models: Such as WizardCoder (requires additional setup)

Commercial Products

gptengineer.app

This is a commercial project dedicated to automatically generating web applications:

  • Provides a UI interface for non-technical users.
  • Connects to git-controlled code repositories.
  • The team actively supports the open-source community.

Project Evolution

This project is a pioneer of modern AI programming tools, laying the foundation for subsequent development. Currently recommended evolved versions include:

  • Managed Service: gptengineer.app
  • Well-maintained CLI: aider

Terms of Use

By running gpt-engineer, you agree to the project's Terms of Use.

Summary

GPT Engineer is a groundbreaking AI code generation tool that perfectly combines natural language with code generation, providing developers with a brand new programming experience. Whether you are a beginner or an experienced developer, you can use this tool to improve development efficiency and explore the infinite possibilities of AI-assisted programming.

Star History Chart