Image from Using Codex CLI to build a web app

OpenAI’s Codex CLI is so hot right now.

Image 2 from Using Codex CLI to build a web app

The Claude Code-competing CLI (command line interface) allows users to generate and mange code directly in their terminal using OpenAI’s suite of models. While GPT-5 has had a rocky launch, the Thinking version of it (using “high” level reasoning) is starting to gain some serious popularity. After using it within Codex, I can see why.

ChatGPT Plus and Pro users can sign in with their accounts to use the agent for free, which allowed me to test its limits with building a web app.

Here’s what I built with it. And here’s how it was done:

Getting started with Codex CLI

Codex CLI is a terminal tool, which means it may not be for less technical folks. However, its also a pretty advanced AI agent tool, so if you can get it up and running there’s a good chance you can find your through using it intuitively.

I’ll be using Cursor, but the beauty of a CLI tool allows you to use any IDE (or even just your terminal). Open up Cursor, start a new project, and open up a new terminal.

Image 3 from Using Codex CLI to build a web app

Type the following commands, in order. One will install the CLI tool, one will get you logged into your ChatGPT account (alternatively, you can just use an API key), and will start up the Codex agent with the GPT-5 model with high reasoning.

npm install -g @openai/codex
codex login
codex -m gpt-5 -c model_reasoning_effort="high"

Codex will ask you some questions around permissions. Answer those as you please and you’re ready to go.

Image 4 from Using Codex CLI to build a web app


Your first prompt

Your first prompt within Codex for a new project should be focused on providing as many specific requirements as possible. You should give the agent enough detail in your description of your project for it to be able to knock out 90% of the project without any issues. That remaining 10% is often where the majority of back-and-forth happens with your coding agent, so we want to make sure that we’ve got a strong foundation for that to take place. Here’s what I used:

Create me a simple React-based web app. This site will be hosted on Cloudflare, and user auth and databases should be hosted on Supabase. Requirements for this app:

1. It's called "Prompt Scores". Overall, the site design is minimal and attractive, with simple but eye-catching animations and smooth UI/UX that mimics other high-quality sites out there.
2. The home page ("Explore") is where most of the site functionality is. There should be a search bar, and then a grid of prompts that users can vote on. Each prompt has specific Type set by the person who submitted them (such as "System Prompt" or "Chat Setup").
3. The search bar should be simple but intelligent, able to pinpoint the types of prompts that the user is looking for without much noise.
4. There are user accounts, so set up a simple sign up and auth flow that uses Supabase. There should be an Account page where the user
5. The Account page should be persistently linked in upper right (logo in the upper left). Next to the Account link, there should be a button that says "Submit Prompt". When clicked, a dialogue box should open up that allows them to submit a prompt, name the prompt, and selected a prelisted "Type" (they can only select one). There should also be a field that allows them to set "tags" that they can put whatever in that will help with search.
6. On the explore page, logged in users should be able to thumbs up prompts that they like. They can remove thumbs up if needed.
7. Below the search bar on the Explore page, there should be an option to filter by Type. The prompt cards should start sorted by amount of votes they have (most to fewest).