Loading video player…

Setting Up the Project

Resource mentioned in this lesson: uv Installation Guide

00:00 In order to use Codex CLI to implement a feature in a project, you need a project to work on. And that’s going to be provided as a downloadable for this course. So there’s a project called rpcontacts that you’ll want to download.

00:18 And after you download it, you’ll want to cd into the folder rpcontacts.

00:26 Now, if you inspect the contents of this folder with ls -al, you should find a couple of files and directories already there, namely a src directory that contains the source code for a partially completed project and a couple of files that have project metadata and whatnot.

00:47 This Python project is managed by uv. That’s why in the intro lesson, uv was mentioned as a prerequisite. So assuming you followed the installation instructions and that you have uv installed, you can now try to run the app from the project.

01:05 And to do that, you just type uv run rpcontacts. And once you press Enter, uv will automatically set up a virtual environment, it’ll install the dependencies for this project, and it’ll open a TUI, a text user interface like the one you see on the screen.

01:24 Now this TUI is supposed to help you manage your contacts. So this is a contact book app that was built with textual and Python. And you can press the Add button on the top right corner of the interface.

01:37 And when you do, it opens a modal screen where you can create a contact. For example, you can just fill in this with some random information and an example.example.com.

01:49 And then you can, for example, use your keyboard keys. You can press Tab twice and then Enter to create the contact. So this is what the interface looks like.

01:58 And it will list all of the contacts you create. Now the thing is, the buttons Delete and Clear All that are also shown on the right, those are there in the user interface, but they do not work yet.

02:12 If you highlight the contact you create and you press the button Delete, it doesn’t delete the contact. And if you try and click the button Clear All, it also doesn’t clear all of the contacts. And this is precisely the feature that you will implement in this course.

02:27 Now to exit the app, you’ll want to press Q to open a confirmation dialog and then you press Yes to quit the app. So this lets you test that you’re able to download everything and that uv set up the environment correctly.

02:43 What you also need to do is initialize a GitHub repository at the root of the project. The reason being, you’re going to use Codex CLI to work in this project, which means LLMs will change your code.

02:57 And you never know if the changes that the LLM makes are good or not. So having a GitHub repository and frequently committing the current changes in your repo makes it easy to roll back any unwanted changes or any bad changes that the LLM makes.

03:15 So to initialize a repository, you can type git init . and then you can type git add . to add everything in the directory. You already have a useful .gitignore file so you can confidently add everything.

03:30 And then what you want to type is git commit -m "First commit." You want to press Enter to effectively commit the initial state of your project into the repository so that the changes you make in the upcoming lessons can be easily rolled back if something goes wrong or if something doesn’t look how you would want it to look like.

03:53 Once you’ve completed all of these setup steps, feel free to move on to the next lesson where you’ll start setting up Codex CLI.

Become a Member to join the conversation.