• Promptstacks
  • Posts
  • 🧑‍💻 Developing A Full App With AI In Minutes

🧑‍💻 Developing A Full App With AI In Minutes

Not A Coder? Don't Let That Stop You

 [ 6 minute read ]

In the realm of software development, the winds of change are blowing.

The driving force behind this transformation is none other than GPT-Engineer, an AI-powered tool that is redefining the landscape of code generation and customisation.

This revolutionary tool, with its ability to generate entire codebases based on your specifications, is poised to become an indispensable ally in the developer’s toolkit.

It has already been viral in GitHub with more than 11k starts and will most likely be a buzzword in the coming weeks!

Intrigued?

Let’s explore this exciting new frontier together and get ahead! 👇🏻

The Rise of GPT-Engineer

GPT-Engineer is a cutting-edge AI-powered development tool designed to revolutionise code generation and customisation.

I know a lot of you might be wondering… why is GPT-Engineer different?

It simplifies the process of creating software. All you need to do is provide a prompt. GPT-engineer will then ask for clarification on the prompt and will then begin generating a whole codebase customised on your chosen coding style and functionality.

It’s different to using ChatGPT and Github copilot as it creates the whole code-base for you, even creating the different files.

Sounds too good to be true right? Well, this is just the start. Within the next few years, we’re likely to see far more advanced GPT-aided developer systems which with the click of your fingers, will be able to produce whole apps.

This is a game-changer in software development, as it allows:

  • Adaptable and dynamic development of apps

  • Iterating over several outputs to obtain the best coding app — in just minutes

  • Personalisation of your AI-agent to understand your coding preferences

And the best part of it all?

Setting up the environment for using GPT-Engineer is honestly pretty straightforward!

All you need to do is:

  1. Clone the GPT-Engineer repository contained in the following GitHub.

  1. Move to the GPT-Engineer folder and create a new Conda environment and activate it.

3. Install the prerequisites contained within the requirements.txt

4. Set up your OpenAI API Key. Not sure how to retrieve this? No worries, I’ll explain in a sec 😉

Here’s a quick overview of the above steps, with the exact code you need to add into your Terminal: 

# Clone the GPT-Engineer repository

git clone

# Navigate to the cloned repository

cd gpt-engineer

# Create a new Conda environment

conda create --name gpt-eng python=3.11.3

# Activate the Conda Environment

conda activate gpt-eng

# Install the prerequisites

pip install -r requirements.txt

# Set up your OpenAI API Key

export OPENAI_API_KEY=[your_api_key]

GPT-Engineer’s ability to generate entire codebases based on prompts is a game-changer.

For example, if you want to create a snake game, you can provide a detailed description of the game’s rules, features, and requirements in a single — and super long — prompt.

GPT-Engineer will then process this prompt and generate the code for the game.

Let’s see it in action.

How to run GPT-engineer

We can easily run GPT-engineer following these steps:

#1. How to get the OpenAI API key

In case you do not have an OpenAI account yet, go to the website and create one. Once your account is created, go to your account overview page.

You should see something like this:

OpenAI API main view.

Now click on your personal account profile

OpenAI API main view.

And go to the View API Keys

OpenAI API website. API keys view.

Click into the Create new secret key

OpenAI API website. API keys view.

And name it

OpenAI API website. Creating a new API key.

⚠️ Note: Keep a copy of this key because you can’t retrieve it from the web interface and we need it later!

#2. Make a New Empty Folder

Make a new folder at the location you want. This can be done manually or via the command line/Terminal. To create a new folder named “new-game” in the current directory, for example, type:

mkdir new-game

You can always do it manually as well!

Self-made screenshot. GPT-engineer folder.

#3. Copy Example Files

To begin with an example project structure, copy the contents of the example folder into your newly created folder. To copy the files and folders, use the following command.

cp -r example/* my-new-project/

Or alternatively you can do this manually

Self-made screenshot. Creating the main_prompt file within our new new-game project folder.

#3. Fill in the Main Prompt

Open a text editor and navigate to the main_prompt file in your new-gamefolder.

Replace the present content with the code-generating prompt of your choice. Make certain that your prompt properly specifies the necessary functionality or code structure of your chosen app.

No ideas…?

Let’s try the easiest one… following the example of the snake game.

Self-made screenshot. The sample prompt that comes in the repository.

MVC stands for Model, Controller, View - It’s how most apps are set up in terms of their files. By specifying MCV components, the prompt correctly places all the right methods and code in the right locations.

We need to spice it up a bit right?

No idea what to write or how to define the snake game?

That’s alright! We can easily ask to ChatGPT to generate a prompt for Snake.

Self-made screenshot. ChatGPT main view.

We copy and paste it into the main-prompt. And that’s it!

#4. Run the GPT Engineer Script

Navigate to the GPT-engineer root directory, which is the folder containing main.py . To run GPT Engineer and produce code depending on your main prompt, enter the following command:

python main.py new-game

This command tells GPT Engineer to process the main prompt in the new-game folder and create code. This prompt serves as the foundation for developing the Snake game.

⚠️ GPT-4 might have a better performance compared to GPT3.5. To get access to GPT-4 via API, you need to get into the waitlist here.

We will get the results within the workspace folder of the new-game folder.

Self-made screenshot, Workspace folder where the output can be found.

And then, you need to execute in the terminal/command line with the simple command:

python main.py

The snake game will start directly!

And that’s it.

If you want to create a more technical app, have a play around with ChatGPT and try out a few different ideas.

So, what does this mean for coding?

GPT-Engineer represents a new wave of AI-powered development tools, pioneered by their ability to generate entire codebases based on prompts.

From high-level prompting to seamless human-AI interaction, GPT-Engineer empowers developers to efficiently build and extend their projects, opening up new possibilities in the realm of AI-driven software development.

Despite its power, GPT-Engineer is not without its limitations. One of these is the lack of chain of thought prompting, which can improve reliability and ensure that requested functionality is not missed in the main prompt. In other words, you need to be very specific and clear in order that the system picks up on the correct elements of your idea.

GPT-Engineer is more than just a tool — it’s a game-changer.

Top AI videos 🧠

  1. These AI Tools Help You Code Better - Click here

  2. Installing GPT-Engineer (if you get stuck!)- click here

  3. 19 AI Tools You Should Know About - click here

Editors Double Product Pick 📺

Perplexity AI

Perplexity AI unlocks the power of knowledge with information discovery and sharing.

MyMap.AI

Build an amazing info map with AI. Turn complex concepts into map-like visuals for a better understanding.

Make Me A Midjourney 🤛 

If Snoop Dogg Was White, Blonde and From Sweden

Teach me how — Midjourney

Reddit Spotlight 🔦

ChatGPT Spelling Bee

Are you happy with this newsletter?

Login or Subscribe to participate in polls.