GPT Engineer — Generate Entire Codebases from Prompts
CLI tool that generates entire codebases from natural language prompts. Iterative refinement with human feedback. Supports Python, JS, and more.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install 84f451e1-0302-40e1-8dbd-f1942050a277 --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
GPT Engineer is a CLI tool that generates entire codebases from natural language prompts. You describe what you want to build in a text file, run the tool, and it produces a working project with multiple files, directory structure, and configuration. The tool supports iterative refinement: after generating code, you can provide feedback and it adjusts the implementation.
GPT Engineer is designed for developers who want to quickly prototype applications or generate boilerplate code from high-level descriptions.
How it saves time or tokens
Bootstrapping a new project involves creating directory structures, writing boilerplate, setting up configuration files, and wiring components together. GPT Engineer handles all of this from a single prompt. A project that takes an hour to scaffold manually can be generated in minutes. The iterative feedback loop means you refine rather than rewrite, saving time on subsequent iterations.
How to use
- Install GPT Engineer:
pip install gpt-engineer
- Create a project folder with a prompt file:
mkdir my-project && cd my-project
echo 'Create a snake game with Python and Pygame' > prompt
- Generate the code:
gpte .
- Review the generated files, provide feedback, and iterate:
gpte . --feedback 'Add a score counter and game-over screen'
Example
A prompt for generating a REST API:
Create a REST API with FastAPI that manages a todo list.
Requirements:
- CRUD endpoints for todos (create, read, update, delete)
- SQLite database with SQLAlchemy ORM
- Pydantic models for request/response validation
- CORS middleware for frontend integration
- Include a requirements.txt
File structure:
app/
main.py
models.py
database.py
schemas.py
requirements.txt
README.md
GPT Engineer generates all files with working code, ready to run with uvicorn app.main:app.
Related on TokRepo
- Coding tools — Browse AI code generation tools
- Automation tools — Explore development automation
Common pitfalls
- Writing vague prompts. GPT Engineer works best with specific, structured requirements. Include file structure, technology choices, and feature details in your prompt for better results.
- Not reviewing generated code before running it. AI-generated code may contain security vulnerabilities, incorrect logic, or outdated practices. Always review before deploying.
- Expecting production-ready code from a single generation. GPT Engineer produces a starting point. Plan for iteration and refinement to bring the code to production quality.
- Starting with an overly complex configuration instead of defaults. Begin with the minimal setup, verify it works, then customize incrementally. This approach catches configuration errors early and keeps troubleshooting straightforward.
常见问题
GPT Engineer supports any programming language since it uses LLMs for code generation. Python, JavaScript, TypeScript, Go, Rust, and others all work. The quality of output depends on the LLM's training data for each language.
Yes. GPT Engineer requires an OpenAI API key (or compatible provider key) set as an environment variable. You can configure the model and provider in the tool's settings.
After initial generation, you review the code and provide text feedback describing what to change. GPT Engineer reads the existing code and your feedback, then generates updated files. This iterative process continues until you are satisfied.
GPT Engineer the CLI tool is the open-source project. The team behind it also built Lovable, a web-based app builder. The CLI tool remains open source and community-maintained.
GPT Engineer is primarily designed for greenfield code generation. For modifying existing code, AI coding agents like Claude Code or Cursor are better suited since they understand existing project context.
引用来源 (3)
- GPT Engineer GitHub— GPT Engineer generates codebases from prompts
- GPT Engineer Documentation— CLI tool with iterative feedback loop
- OpenAI API Documentation— OpenAI API for code generation
来源与感谢
Created by Anton Osika. Licensed under MIT. gpt-engineer — ⭐ 55,200+
Thanks to Anton Osika and the community for pioneering prompt-to-codebase generation.
讨论
相关资产
Syft — Generate Software Bill of Materials from Container Images
Syft generates Software Bill of Materials (SBOMs) from container images and filesystems. It detects packages across OS and language ecosystems, outputting SPDX, CycloneDX, and custom formats for compliance, vulnerability scanning, and supply chain security.
minGPT — Minimal PyTorch GPT Implementation for Learning
minGPT by Andrej Karpathy is a clean, readable re-implementation of GPT in about 300 lines of PyTorch, designed for educational use and as a starting point for GPT-based research experiments.
GPT-SoVITS — Few-Shot Voice Cloning and Text-to-Speech
An open-source TTS system that can clone any voice from just one minute of audio data, combining GPT-style language modeling with VITS synthesis for natural speech generation.
RSS-Bridge — Generate RSS Feeds for Any Website
A self-hosted PHP application that generates RSS and Atom feeds for websites that do not provide them, with support for hundreds of sites.