AntonOsika /gpt-engineer

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

★ 54,964⑂ 7,264👁 9⑃ 636● 502▤ 21◈ 134
PythonMITCreated 2023-04-29
54,964
stars
+1
7,264
forks
9
watchers
636
prs
502
issues
21
releases
134
discussions

README

gpt-engineer





!GitHub Release


The OG code genereation experimentation platform!

If you are looking for the evolution that is an opinionated, managed service – check out gptengineer.app.

If you are looking for a well maintained hackable CLI for – check out aider.


gpt-engineer lets you:
- Specify software in natural language
- Sit back and watch as an AI writes and executes the code
- Ask the AI to implement improvements

 Getting Started

 Install gpt-engineer

For stable release:

- python -m pip install gpt-engineer

For development:
- git clone https://github.com/gpt-engineer-org/gpt-engineer.git
- cd gpt-engineer
- poetry install
- poetry shell to activate the virtual environment

We actively support Python 3.10 - 3.12. The last version to support Python 3.8 - 3.9 was 0.2.6.

 Setup API key

Choose one of:
- Export env variable (you can add this to .bashrc so that you don't have to do it each time you start the terminal)
    - export OPENAI_API_KEY=[your api key]
- .env file:
    - Create a copy of .env.template named .env
    - Add your OPENAI_API_KEY in .env
- Custom model:
    - See docs, supports local model, azure, etc.

Check the Windows README for Windows usage.

Other ways to run:
- Use Docker (instructions)
- Do everything in your browser:


 Create new code (default usage)
- Create an empty folder for your project anywhere on your computer
- Create a file called prompt (no extension) inside your new folder and fill it with instructions
- Run gpte  with a relative path to your folder
  - For example: gpte projects/my-new-project from the gpt-engineer directory root with your new folder in projects/

 Improve existing code
- Locate a folder with code which you want to improve anywhere on your computer
- Create a file called prompt (no extension) inside your new folder and fill it with instructions for how you want to improve the code
- Run gpte  -i with a relative path to your folder
  - For example: gpte projects/my-old-project -i from the gpt-engineer directory root with your folder in projects/

 Benchmark custom agents
- gpt-engineer installs the binary 'bench', which gives you a simple interface for benchmarking your own agent implementations against popular public datasets.
- The easiest way to get started with benchmarking is by checking out the template repo, which contains detailed instructions and an agent template.
- Currently supported benchmark:
  - APPS
  - MBPP

The community has started work with different benchmarking initiatives, as described in this Loom video.

 Research
Some of our community members have worked on different research briefs that could be taken further. See this document if you are interested.

 Terms
By running gpt-engineer, you agree to our terms.


 Relation to gptengineer.app (GPT Engineer)
gptengineer.app is a commercial project for the automatic generation of web apps.
It features a UI for non-technical users connected to a git-controlled codebase.
The gptengineer.app team is actively

Top issues

Discussions

Latest release

v0.3.1 v0.3.1 2024-06-06
Highlights

We have a new release, v0.3.1, ready for you! 

The main changes in this release include:

🚀 Default model upgrade - GPT-4o is now the default model version by @AntonOsika 
📊 Benchmark development -  Laid the groundwork for benchmark-driven development by @ATheorell 
🐋 Docker stability with a hotfix for Docker image by @k1lgor
🚧 Enhanced error handling by @similato87 
 
❤️ We also welcome our new first-time contributor @ceddy4395! 

 What's Changed

 Retry diff failures (fixed by gptengineer by pasting errors into prompt 🔥) by @AntonOsika in https://github.com/gpt-en

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON