gpt-engineer

CLI platform to experiment with codegen. Precursor to: https://lovable.dev

gpt-engineer

What is gpt-engineer

gpt-engineer is an innovative code generation platform that leverages artificial intelligence to transform natural language specifications into executable code. Designed primarily for developers and software engineers, this project addresses the challenge of rapid software development by allowing users to describe their requirements in plain language, while the AI autonomously generates and executes the corresponding code. Built using Python, gpt-engineer integrates various AI models, including OpenAI and Anthropic, and supports local and alternative models, making it a versatile tool in the AI and software development domain.

How to Use

Installation Instructions

  1. Stable Release: Install via pip:
    python -m pip install gpt-engineer
    
  2. Development Version:
    • Clone the repository:
      git clone https://github.com/gpt-engineer-org/gpt-engineer.git
      
    • Navigate to the project directory:
      cd gpt-engineer
      
    • Install dependencies using Poetry:
      poetry install
      
    • Activate the virtual environment:
      poetry shell
      

Setup Requirements

  • Python 3.10 - 3.12 is required. Previous versions (3.8 - 3.9) are only supported in version 0.2.6.
  • Set up your OpenAI API key by either:
    • Exporting it as an environment variable:
      export OPENAI_API_KEY=[your api key]
      
    • Creating a .env file from the .env.template and adding your API key.

Usage Examples

  • Create New Code:
    1. Create a project folder and a prompt file with instructions.
    2. Run:
      gpte <project_dir>
      
  • Improve Existing Code:
    1. Create a prompt file in the code folder.
    2. Run:
      gpte <project_dir> -i
      

For more detailed instructions, refer to the documentation.

Key Features

  • Natural Language Specification: Users can define software requirements in plain language, streamlining the development process.
  • AI Code Execution: The AI not only generates code but also executes it, allowing for immediate feedback and iteration.
  • Custom Pre-prompts: Users can customize the AI's behavior by modifying the preprompts folder, enabling memory retention across projects.
  • Vision Capabilities: Supports image inputs for models capable of processing visual data, enhancing context for code generation.
  • Support for Multiple Models: Integrates with OpenAI, Azure, and alternative models like WizardCoder, offering flexibility in AI usage.
  • Benchmarking Tools: Includes a benchmarking binary for evaluating custom agents against popular datasets like APPS and MBPP.
  • Open Source Community: Actively encourages contributions and collaboration, fostering a vibrant ecosystem for developers.
  • Cross-Platform Compatibility: Available for various operating systems, including instructions for Windows users and Docker support.

gpt-engineer stands out as a powerful tool for developers looking to harness AI for efficient code generation and software development.

Statistics

Stars
54,407
Forks
7,187
Watchers
54,407
!
Issues
39

Topics

#ai#autonomous-agent#code-generation#codebase-generation#codegen#coding-assistant#gpt-4#gpt-engineer#openai#python

Language

Python