Back/Engineering/ChatGPT/Codex
BeginnerEngineeringChatGPTCodex

How to Use OpenAI Codex to Understand and Modify a New Codebase

Learn how to use an AI coding assistant like Codex to quickly get a new project running locally and make simple code changes using natural language, perfect for semi-technical roles or exploring unfamiliar repositories.

From How I AI

How I AI: 3 Advanced Codex Workflows for Faster, Smarter Development with OpenAI's Alex Embiricos

with Claire Vo

How to Use OpenAI Codex to Understand and Modify a New Codebase

Tools Used

ChatGPT

OpenAI conversational AI

Codex

OpenAI's cloud-based AI software engineering agent that can execute code, run tests, and handle complex multi-file tasks autonomously.

Step-by-Step Guide

1

Set Up Codex in Your IDE

First, install the Codex extension in your IDE, such as VS Code, from the marketplace. The extension is included with a ChatGPT Plus plan. Once installed, a Codex icon will appear in your sidebar.

Pro Tip: For easier access, drag the Codex icon from the primary sidebar to the secondary sidebar on the right.
2

Ask for Setup Instructions

When you open a new or unfamiliar project, instead of searching for a README or asking a teammate, open the Codex chat and ask how to get started. The AI will analyze the repository and provide the necessary commands to run the project locally.

Prompt:
How do I play this game?
3

Request a Change with Natural Language

Once the project is running, you can make simple changes conversationally. Open the Codex chat and describe the desired change in plain English. Codex will form a plan, identify the relevant code, and present you with a file diff for approval.

Prompt:
jump is way too big, lower please.

Become a 10x PM.
For just $5 / month.

We've made ChatPRD affordable so everyone from engineers to founders to Chief Product Officers can benefit from an AI PM.