WEBVTT
Kind: captions
Language: en-CA

00:00:00.266 --> 00:00:02.266
This video will teach you Codex.

00:00:02.266 --> 00:00:06.033
I'll go through all of the important features, show
you how to set it up and install it,

00:00:06.033 --> 00:00:07.533
and assume no prior knowledge.

00:00:07.533 --> 00:00:10.533
So even if you're a complete beginner,
you'll be able to follow along.

00:00:10.600 --> 00:00:14.266
Now I'm going to be covering things
like computer use or browser control.

00:00:14.266 --> 00:00:18.666
I'm going to show you how to set it up for coding
model selection, all of the different commands

00:00:18.666 --> 00:00:22.966
like slash goal, and a lot of the new features
that I haven't seen many people cover.

00:00:23.000 --> 00:00:24.700
So with that said, stick around.

00:00:24.700 --> 00:00:27.133
Let's get into it and let me teach you Codex.

00:00:27.133 --> 00:00:29.333
So let's start by discussing what Codex is.

00:00:29.333 --> 00:00:32.433
We'll look at how we can use it
because there's actually many different ways.

00:00:32.433 --> 00:00:34.833
And then I'll start going through
all of the different features.

00:00:34.833 --> 00:00:37.533
There'll be timestamps down below
in case you want to skip forward.

00:00:37.533 --> 00:00:40.433
And keep in mind
I like to make things really thorough in detailed.

00:00:40.433 --> 00:00:44.400
So if you feel like I'm going to slow, fast
forward to the next section okay.

00:00:44.433 --> 00:00:46.266
So first what is Codex?

00:00:46.266 --> 00:00:50.533
Well Codex is essentially OpenAI's
answer to tools like Claude code.

00:00:50.533 --> 00:00:54.833
It's actually much more involved than Claude code
I would say it has a lot more features,

00:00:54.833 --> 00:00:57.266
and a lot of people don't know
about what you can do with it.

00:00:57.266 --> 00:00:59.700
Now, the basics is that you can use it to write code

00:00:59.700 --> 00:01:03.700
because it will give you access
to their top models like GPT 5.5.

00:01:03.733 --> 00:01:07.433
However, you can also use it
to control your computer, to automate

00:01:07.466 --> 00:01:10.500
tasks, to perform something repetitive for you.

00:01:10.500 --> 00:01:14.000
And you can even do something
like tell it to play a song on Spotify for you.

00:01:14.000 --> 00:01:17.000
And it can go and do that
by controlling your computer.

00:01:17.000 --> 00:01:19.700
So there's a lot of cool features
that are not just related to coding.

00:01:19.700 --> 00:01:22.100
I'm going to try to cover all of those in this video.

00:01:22.100 --> 00:01:26.900
So what I want to do is quickly cover how you can
use Codex, because there's a lot of different ways.

00:01:26.900 --> 00:01:30.033
And OpenAI has been very confusing
with the naming of Codex

00:01:30.033 --> 00:01:33.600
because they had models called Codex
like their actual LLMs.

00:01:33.600 --> 00:01:38.466
Now they have the tool called Codex,
and you can use it in like many different fashions.

00:01:38.466 --> 00:01:42.866
So for this video we're going to be using the stand
alone desktop application.

00:01:42.900 --> 00:01:45.833
The way this works is you download it
and install it on your computer.

00:01:45.833 --> 00:01:49.133
You can get it for windows, Mac
and then they don't have it for Linux right now.

00:01:49.133 --> 00:01:50.400
So just Windows or Mac.

00:01:50.400 --> 00:01:53.666
Now you'll sign into this
using your ChatGPT subscription.

00:01:53.666 --> 00:01:57.133
You can use it,
I believe, as low as $20 per month on the plus plan.

00:01:57.133 --> 00:02:02.400
Just keep in mind I do have the $200 per month plan,
so my usage limits will be significantly higher.

00:02:02.433 --> 00:02:04.400
Now the limits are typically very generous.

00:02:04.400 --> 00:02:07.300
You're probably going to get 5 or 10 times
the amount of usage.

00:02:07.300 --> 00:02:11.066
Then you would compare it to something
like Claude Code, so I wouldn't be too concerned

00:02:11.066 --> 00:02:11.933
with ripping through it.

00:02:11.933 --> 00:02:15.266
Unless you use the highest end models
and you're running it 24 over seven.

00:02:15.266 --> 00:02:17.666
Now you can also use this with an OpenAI API key.

00:02:17.666 --> 00:02:21.100
I definitely do not recommend that
because that's going to be very expensive.

00:02:21.100 --> 00:02:25.400
So first up, if you don't want to be downloaded
and installed Codex, I'll leave a link to it

00:02:25.400 --> 00:02:29.500
in the description sign in with your ChatGPT account,
then you're good to go

00:02:29.533 --> 00:02:33.066
now as well as the desktop app,
which again is what we're going to be using.

00:02:33.100 --> 00:02:35.033
They also have an IDE extension.

00:02:35.033 --> 00:02:38.300
You can install this in the popular editors
like cursor, Visual Studio

00:02:38.300 --> 00:02:43.100
Code and Windsurf and have access to the same Codex
interface inside of that editor.

00:02:43.100 --> 00:02:45.000
If you're a developer, you may want to do that.

00:02:45.000 --> 00:02:46.400
We also have CLI.

00:02:46.400 --> 00:02:50.833
Now this is a command line interface more familiar
to something like cloud Code, where you're

00:02:50.833 --> 00:02:54.000
not in kind of a nice graphical user interface,
which you'll see in a minute.

00:02:54.000 --> 00:02:57.533
But the advantage here is that you can run this on
something like Linux or a server,

00:02:57.533 --> 00:03:00.866
and you can have this as a remote machine
that's running 24 over seven.

00:03:00.900 --> 00:03:02.533
Same thing. You can sign in with your account.

00:03:02.533 --> 00:03:06.233
And then we have the cloud version
which is running directly in your browser.

00:03:06.233 --> 00:03:09.233
It's better if you can use the desktop version,
but if you want to do it

00:03:09.233 --> 00:03:12.266
from the browser on your phone or something,
you can do that.

00:03:12.300 --> 00:03:14.500
Okay, so those are the surfaces for Codex.

00:03:14.500 --> 00:03:17.433
Again, what we want to do is download
the desktop application,

00:03:17.433 --> 00:03:19.066
which is where we're going to be working.

00:03:19.066 --> 00:03:20.666
And now let's open up that app.

00:03:20.666 --> 00:03:24.100
So just open up the desktop application,
which is where we're going to be working

00:03:24.100 --> 00:03:27.833
and where I recommend you use Codex
because does the most number of features.

00:03:27.866 --> 00:03:29.866
Now let's start by going through the user interface.

00:03:29.866 --> 00:03:32.800
You can understand
what all of these buttons actually do.

00:03:32.800 --> 00:03:35.066
And then I promise
we'll go through all of the features.

00:03:35.066 --> 00:03:37.066
So here you have your main chat window.

00:03:37.066 --> 00:03:40.433
There's a few things you want to pay attention to,
like the model selector which we'll look at in

00:03:40.433 --> 00:03:44.233
a minute, the voice dictation
in case you want to use that the approval modes.

00:03:44.233 --> 00:03:47.000
So ask for approval approved for me or full access.

00:03:47.000 --> 00:03:50.100
And then being able to add different skills context.

00:03:50.100 --> 00:03:53.733
And then if you want
you can actually run commands by using this slash.

00:03:53.833 --> 00:03:54.733
So if you do forward slash

00:03:54.733 --> 00:03:58.066
you be able to see a list of all of this stuff
available which will be going through.

00:03:58.100 --> 00:04:01.466
You also have the ability
to organize different chats into projects.

00:04:01.466 --> 00:04:03.333
So you can see I have a few projects here.

00:04:03.333 --> 00:04:05.933
You can make a new one,
but we'll look at that in a few minutes.

00:04:05.933 --> 00:04:09.600
Now from the right hand side
you'll also notice that you have these toggle bars.

00:04:09.600 --> 00:04:12.833
So if you click on the right
it's going to show you a browser and a terminal.

00:04:12.833 --> 00:04:17.600
That's because Codex can automatically control
a browser for you and test your applications.

00:04:17.600 --> 00:04:23.233
And then you can also toggle up the terminal or the
shell, which again Codex can control and use for you.

00:04:23.266 --> 00:04:25.466
You typically don't need to do this,
but I'm just showing you

00:04:25.466 --> 00:04:27.533
those views exist from the left hand side.

00:04:27.533 --> 00:04:32.900
You can also toggle this sidebar where you have
some of the important I don't know, buttons or views.

00:04:33.166 --> 00:04:36.433
If you want to access the settings menu,
you can click on your profile.

00:04:36.433 --> 00:04:39.433
You can go to profile or to settings for settings.

00:04:39.433 --> 00:04:43.500
If you are someone who's not going to do any coding,
you can switch this over to the everyday work mode.

00:04:43.500 --> 00:04:47.133
So it's going to be a little bit less technical,
but for most of us, we're going to want to stay here

00:04:47.133 --> 00:04:50.200
where we have access the browser, the terminal
and some other features.

00:04:50.233 --> 00:04:51.433
There's a ton of settings.

00:04:51.433 --> 00:04:54.266
Feel free to look through these and change
any of them if you want.

00:04:54.266 --> 00:04:56.233
But again, I'll go through them one by one.

00:04:56.233 --> 00:05:00.733
And then last thing, if you go and look at usage
and billing, you'll be able to see your usage,

00:05:00.733 --> 00:05:03.733
the plan that you're currently on,
if you have any balance or anything.

00:05:03.733 --> 00:05:05.833
Again, these are very generous limits.

00:05:05.833 --> 00:05:09.666
It's very unlikely that you're going to hit them,
especially if you're doing something somewhat normal.

00:05:09.666 --> 00:05:11.433
So I wouldn't stress out about it too much.

00:05:11.433 --> 00:05:13.933
Okay, so now that we've gone through that,
let's start looking at the models.

00:05:13.933 --> 00:05:16.633
Let's start running a few chats
and setting up some plugins

00:05:16.633 --> 00:05:20.200
so I can show you things like the computer control,
which is super cool.

00:05:20.200 --> 00:05:24.266
But first,
just a quick word from our sponsor boot dev.

00:05:24.300 --> 00:05:28.400
Now this is one of the best learning
platforms out there and actually a long term partner

00:05:28.400 --> 00:05:29.400
of this channel.

00:05:29.400 --> 00:05:33.266
Now, one of the biggest problems
that I see with people learning to code is boredom.

00:05:33.266 --> 00:05:38.333
They watch tutorials, copy code,
feel productive for a week, and then they quit now.

00:05:38.333 --> 00:05:40.900
But dev takes a completely different approach.

00:05:40.900 --> 00:05:45.066
It's very hands on and honestly,
it feels more like a game than a course.

00:05:45.100 --> 00:05:50.066
Now you're learning backend development by actually
building things, not just watching videos.

00:05:50.066 --> 00:05:53.800
You work through real challenges in Python SQL
and go earn

00:05:54.400 --> 00:05:58.000
level up five bosses and progress
through a full backend curriculum.

00:05:58.000 --> 00:06:01.266
Now it sounds a bit gimmicky,
but I promise you it actually works because you're

00:06:01.266 --> 00:06:04.266
doing the same kind of problem
solving that you do on the job.

00:06:04.266 --> 00:06:06.333
Now they also have an AI tutor called boots,

00:06:06.333 --> 00:06:10.200
which doesn't just dump answers on you,
it asks follow up questions and helps

00:06:10.200 --> 00:06:14.833
you reason through problems when you get stuck,
which is way closer to how you actually learn.

00:06:14.833 --> 00:06:19.066
Now, all of the content is free to read and watch,
and if you want the interactive coding,

00:06:19.066 --> 00:06:22.933
the progress tracking,
and the AI assistance, that's part of the paid plan.

00:06:23.000 --> 00:06:25.933
If you want to check it out,
go to dev and use my code

00:06:25.933 --> 00:06:29.233
tech with Tim to get 25% off your first year.

00:06:29.266 --> 00:06:31.633
Big thanks to Boot Dev for sponsoring this video.

00:06:31.633 --> 00:06:33.266
Now let's get back into it.

00:06:33.266 --> 00:06:35.933
So like I was saying,
let's have a look at the model selection.

00:06:35.933 --> 00:06:37.400
Now, for some reason you don't see this view.

00:06:37.400 --> 00:06:40.300
You can always just press a new chat
and it will bring this up.

00:06:40.300 --> 00:06:43.433
Now from here if you go to model selector
you're going to see that you have

00:06:43.433 --> 00:06:47.033
a reasoning level light medium high and extra high.

00:06:47.066 --> 00:06:50.633
Now of course you want to use the best reasoning
whenever you possibly can,

00:06:50.666 --> 00:06:54.066
but keep in mind
that this is going to take significantly longer.

00:06:54.066 --> 00:06:58.100
So the reasoning can kind of come down
to how long this is going to take.

00:06:58.133 --> 00:07:02.833
Of course, the higher reasoning, the better responses
and results that you're typically going to get,

00:07:02.833 --> 00:07:06.633
but it can increase the time by like 4 or 5,
sometimes ten x.

00:07:06.633 --> 00:07:10.800
I've had tasks here
taken 30 minutes to run in extra high reasonings.

00:07:10.800 --> 00:07:11.833
If you want something fast.

00:07:11.833 --> 00:07:13.433
If you're asking a quick question,

00:07:13.433 --> 00:07:17.333
you don't need super high reasoning
and you can put this in light or medium mode.

00:07:17.400 --> 00:07:20.333
Now, when it comes to the model itself,
you have a few options.

00:07:20.333 --> 00:07:23.333
GPT 5.5 is kind of the best one.

00:07:23.333 --> 00:07:27.500
The frontier coding model, the one you're going
to want to use for pretty much everything.

00:07:27.533 --> 00:07:32.400
GPT 5.4 is just the generation
before that that has kind of cheaper usage limits.

00:07:32.400 --> 00:07:35.700
I would never use this one. GPT 5.4 mini.

00:07:35.733 --> 00:07:38.700
This can be used for small, fast,
kind of efficient things

00:07:38.700 --> 00:07:42.400
where you're asking a question or you just want,
you know, quick UI change or something.

00:07:42.400 --> 00:07:46.433
And then 5.3 Codec
Spark is just an extremely fast model

00:07:46.433 --> 00:07:50.200
that you use again, for very minor
things that don't require a lot of intelligence.

00:07:50.200 --> 00:07:54.133
And specifically
when you're running out of the usage on GPT 5.5.

00:07:54.133 --> 00:07:57.600
So for 99% of you, you just keep GPT 5.5 on.

00:07:57.600 --> 00:07:59.533
Probably throw it in medium reasoning.

00:07:59.533 --> 00:08:02.933
If you have enough credits,
you can turn on this fast mode so it'll run faster.

00:08:02.933 --> 00:08:06.933
I pretty much always leave that on,
and then if you start running out of the usage,

00:08:06.933 --> 00:08:08.700
you can switch to some of these other models.

00:08:08.700 --> 00:08:10.500
You can change the speed back to default

00:08:10.500 --> 00:08:14.300
and you can adjust the reasoning,
but most of the time 5.5 medium.

00:08:14.300 --> 00:08:15.633
This is what you're going to keep it in.

00:08:15.633 --> 00:08:16.500
And if you're doing something

00:08:16.500 --> 00:08:20.666
more complicated, switch up the reasoning level
here to high or extra high.

00:08:20.700 --> 00:08:23.400
You can play around with it,
but that's pretty much all you need to know.

00:08:23.400 --> 00:08:26.066
Okay, so of course we're going to use this
and I'm going to show you a bunch of prompts.

00:08:26.066 --> 00:08:30.433
But I want to show you how to set this up so
we can do some really interesting things with Codex.

00:08:30.433 --> 00:08:33.033
So what we're going to do here is go to plugins.

00:08:33.033 --> 00:08:37.833
Now this is one of my favorite features of Codex
is all of the plugins that it has by default.

00:08:37.833 --> 00:08:43.266
And the fact that it can control your computer,
control your browser, control spreadsheets, access

00:08:43.266 --> 00:08:47.066
Google Drive, and do this in a really interactive
and intuitive way.

00:08:47.100 --> 00:08:50.500
Now, most of your tools like this like cloud code,
they can do the same thing,

00:08:50.500 --> 00:08:54.866
but I find Codex performs a lot better
and it's just way easier to understand.

00:08:54.866 --> 00:08:58.066
So what we're going to want to do
here is go to plugins and start installing

00:08:58.066 --> 00:09:00.533
some of the ones that you see on my computer
right now.

00:09:00.533 --> 00:09:02.666
So the first one is computer use.

00:09:02.666 --> 00:09:05.700
If you don't already have this installed,
you can install it and activate it.

00:09:05.700 --> 00:09:07.466
It may ask for some permissions here.

00:09:07.466 --> 00:09:09.933
And this is going to allow you
to control your computer.

00:09:09.933 --> 00:09:14.466
So you can tell it to open up an application
go to your browser, access Spotify.

00:09:14.500 --> 00:09:16.233
We're going to look at that in one second.

00:09:16.233 --> 00:09:18.333
Next plug in we're going to want is Chrome.

00:09:18.333 --> 00:09:20.466
So we're going to want to install this Chrome
plug in here.

00:09:20.466 --> 00:09:23.333
And then open up this Chrome extension okay.

00:09:23.333 --> 00:09:24.600
This Codex Chrome extension.

00:09:24.600 --> 00:09:26.600
You can see I already have mine installed here.

00:09:26.600 --> 00:09:29.900
And if I go to the view you can see
we have Codex and it's connected.

00:09:29.900 --> 00:09:32.533
And this will allow Codex to control your browser.

00:09:32.533 --> 00:09:33.633
So it can open up a tab.

00:09:33.633 --> 00:09:36.300
It can search for something.
It can debug your application.

00:09:36.300 --> 00:09:37.866
Make sure that you get that set up again.

00:09:37.866 --> 00:09:41.400
If you just press this open button
you can install the extension and link it.

00:09:41.433 --> 00:09:44.300
Another extension that I highly recommend is GitHub.

00:09:44.300 --> 00:09:49.400
If you're unfamiliar with git and GitHub, this
is essentially a version control software for code.

00:09:49.433 --> 00:09:53.866
This means that you can save your changes,
that you can recover them later on.

00:09:53.900 --> 00:09:55.233
You can store them in the clouds,

00:09:55.233 --> 00:09:58.333
you can use them from a different device
and you can share them with your teammates.

00:09:58.400 --> 00:10:02.033
This is a standard anytime you're building
even a medium sized project.

00:10:02.033 --> 00:10:04.633
Really any type of coding project,
you should be using this.

00:10:04.633 --> 00:10:06.866
So create a free GitHub account.

00:10:06.866 --> 00:10:07.400
Very easy.

00:10:07.400 --> 00:10:11.833
You can just go to github.com and then you can
connect your GitHub account here inside of Codex.

00:10:11.833 --> 00:10:15.233
So it can automatically make
what's called a repository, which is just storing

00:10:15.233 --> 00:10:18.933
your code effectively and upload it to the clouds
that you're not going to lose it.

00:10:18.933 --> 00:10:23.300
You can access it from other devices
and you can revert back in case Codex makes a change.

00:10:23.333 --> 00:10:25.800
It breaks whatever the version of your project is.

00:10:25.800 --> 00:10:29.466
I'm not going to be teaching
git in GitHub too much, but I do highly recommend

00:10:29.500 --> 00:10:31.300
that you set up that plugin and you can see

00:10:31.300 --> 00:10:35.533
we have a few other ones here like Google Drive,
presentations, spreadsheets, slack, Gmail.

00:10:35.533 --> 00:10:38.900
You can add as many of these as you want,
but I'm going to stick with these for right now.

00:10:38.900 --> 00:10:43.300
So now that we have the computer plugin installed,
I want to show you how to use this.

00:10:43.300 --> 00:10:47.333
So if I go and I use this at symbol,
you can see that I can actually reference

00:10:47.333 --> 00:10:50.666
different applications
and specifically this computer.

00:10:50.700 --> 00:10:51.066
Right.

00:10:51.066 --> 00:10:54.400
So from computer
what I can do is ask it to do something.

00:10:54.666 --> 00:10:56.900
So let's start by doing something simple.

00:10:56.900 --> 00:11:00.700
Open up notepad, close
any of the existing windows that are there,

00:11:00.700 --> 00:11:05.266
and then write a simple note
and describe your ideal day.

00:11:05.266 --> 00:11:07.933
I know you're a computer,
but just come up with something, okay?

00:11:07.933 --> 00:11:09.833
I'm just giving it kind of random prompt.

00:11:09.833 --> 00:11:10.133
By the way,

00:11:10.133 --> 00:11:14.233
if you're wondering what I'm using to prompt here,
I always use this tool called Whisper Flow.

00:11:14.400 --> 00:11:17.200
Very good for voice dictation,
especially in AI tools.

00:11:17.200 --> 00:11:19.133
I'll leave a link to it
so you can check it out. In the description.

00:11:19.133 --> 00:11:21.933
You can see that I use it a ton based on my usage.

00:11:21.933 --> 00:11:23.733
Very very good and free to try out.

00:11:23.733 --> 00:11:27.100
Okay, so let's run
this and let's see what we get here.

00:11:27.100 --> 00:11:29.233
And you can see that it's
going to use the computer plugin.

00:11:29.233 --> 00:11:31.233
And it should control my computer.

00:11:31.233 --> 00:11:36.233
And keep in mind that while it's controlling
my computer, I can still use the computer myself.

00:11:36.233 --> 00:11:39.066
So I can navigate into an application.
I can close something.

00:11:39.066 --> 00:11:41.866
I don't need to have it
kind of freely using the mouse,

00:11:41.866 --> 00:11:44.033
because it will actually use its own cursor.

00:11:44.033 --> 00:11:47.833
Okay, apologies, because it had a note there
that I didn't want you guys to see,

00:11:47.833 --> 00:11:49.033
so I had to kind of rerun this.

00:11:49.033 --> 00:11:49.666
But you can see that

00:11:49.666 --> 00:11:54.600
it actually just opened up my computer here, open up
notepad and wrote this note inside for me.

00:11:54.633 --> 00:11:54.833
Okay.

00:11:54.833 --> 00:11:58.700
So now if I want to say something,
can you continue this node and make it like double

00:11:58.700 --> 00:12:00.600
or triple the length? Don't worry if it's unsaved.

00:12:00.600 --> 00:12:01.833
Just keep writing okay.

00:12:01.833 --> 00:12:02.700
And let's hit enter.

00:12:02.700 --> 00:12:06.333
And again you'll see that
we kind of get that blue hue around our computer.

00:12:06.333 --> 00:12:07.666
And it's able to take over

00:12:07.666 --> 00:12:12.433
and do anything that we want,
which can be super useful, especially for automating,

00:12:12.466 --> 00:12:17.100
kind of like testing a website, going through a form,
running a task repetitively.

00:12:17.100 --> 00:12:17.866
You get the idea.

00:12:17.866 --> 00:12:20.433
So let's see how it works.
And you can see that just opened it.

00:12:20.433 --> 00:12:22.233
And then did it extend the note?

00:12:22.233 --> 00:12:26.033
I guess not, says thinking okay,
maybe it will take over again in a second.

00:12:26.200 --> 00:12:29.600
But when it does that you also see it's kind of
cursor appearing, which I think is pretty cool.

00:12:29.633 --> 00:12:31.833
Okay, so for some reason
it didn't keep controlling the note.

00:12:31.833 --> 00:12:33.266
But let's just do another example here.

00:12:33.266 --> 00:12:36.633
I'm going to say computer, open up Spotify,
find Drake's

00:12:36.633 --> 00:12:40.133
most popular song,
and then tell me what it is and play it okay.

00:12:40.200 --> 00:12:42.733
And let's just do this as an example
so we can see okay.

00:12:42.733 --> 00:12:45.500
So it actually found that Spotify
wasn't installed on my computer.

00:12:45.500 --> 00:12:48.266
And it's going to now do this from Chrome
which is what I was trying to show.

00:12:48.266 --> 00:12:51.400
So I'm going to allow this to access my Chrome
browser okay.

00:12:51.433 --> 00:12:54.300
So we can see it opened this,
it actually started playing the song, I just paused,

00:12:54.300 --> 00:12:56.833
I don't want to get the copyright strike
and it found the song for me.

00:12:56.833 --> 00:12:59.500
And then if I go here
it says that this is the most popular one.

00:12:59.500 --> 00:13:01.733
Okay, I don't know if that's true,
but at least that's what it gave us.

00:13:01.733 --> 00:13:04.933
So the point is it can control Chrome,
it can control its own devices.

00:13:04.933 --> 00:13:05.700
So keep that in mind.

00:13:05.700 --> 00:13:06.666
That's super useful.

00:13:06.666 --> 00:13:09.800
But now let's move to some more coding
related features okay.

00:13:09.833 --> 00:13:11.266
So if we're done with the current chat

00:13:11.266 --> 00:13:14.533
here, what we can do is just press new chat
and open up a new one here.

00:13:14.533 --> 00:13:18.066
And what I'm going to do now
is I'm actually going to create a new project.

00:13:18.066 --> 00:13:21.033
Now, whenever you're coding,
I recommend that you make a new projects.

00:13:21.033 --> 00:13:26.333
You can organize all of your chats for that specific
project, and you can go back and find them easily.

00:13:26.400 --> 00:13:29.100
It's not required to do this,
but it's kind of a good practice.

00:13:29.100 --> 00:13:30.933
So you can see that I can make new project.

00:13:30.933 --> 00:13:32.700
I can use an existing folder.

00:13:32.700 --> 00:13:35.466
So maybe I have an existing code
repo that I want to use.

00:13:35.466 --> 00:13:36.266
I can open that up.

00:13:36.266 --> 00:13:38.133
And that's kind of what a project is.

00:13:38.133 --> 00:13:40.233
It's really just a folder on your computer.

00:13:40.233 --> 00:13:41.866
Or I can start one from scratch.

00:13:41.866 --> 00:13:45.633
So I'm going to start one from scratch, and I'm
just going to call this I don't know chess game.

00:13:45.633 --> 00:13:50.033
And what we'll do is we'll try to make
like an interactive chess game here using Codex.

00:13:50.033 --> 00:13:52.066
So you can see that it's made a new project for me.

00:13:52.066 --> 00:13:53.333
It's called Chess Game.

00:13:53.333 --> 00:13:56.233
And notice
that we have a few options here for the project.

00:13:56.233 --> 00:13:59.400
Now I have the ability to connect to Codex Web.

00:13:59.400 --> 00:14:04.500
This would essentially send all of the kind of info
to the cloud, which is a little bit more complicated.

00:14:04.533 --> 00:14:07.600
We can work locally,
which just means we're working on our own computer,

00:14:07.600 --> 00:14:09.033
which is what we're going to do here.

00:14:09.033 --> 00:14:11.133
Or we can create something called a work tree.

00:14:11.133 --> 00:14:16.033
Now we're going to look at work trees later, but
essentially this is a clone of this kind of project

00:14:16.033 --> 00:14:19.500
so that we can work on multiple things
at the same time without having a conflict.

00:14:19.500 --> 00:14:22.700
So for now, we're going to leave it in
the current location that it's in.

00:14:22.733 --> 00:14:25.466
You'll notice that it automatically
is connecting to get.

00:14:25.466 --> 00:14:27.466
So it's created a branch called main.

00:14:27.466 --> 00:14:30.466
And you can make different branches
if you're familiar with git.

00:14:30.466 --> 00:14:31.800
But we're not going to look at that for right now.

00:14:31.800 --> 00:14:35.533
I'm also just going to move this to full access mode,
just so I don't need to keep approving things.

00:14:35.533 --> 00:14:38.200
And you can see it's pretty straightforward
what you do here with those.

00:14:38.200 --> 00:14:40.000
So now let me give this a simple prompt.

00:14:40.000 --> 00:14:42.000
I want to create a simple chess game.

00:14:42.000 --> 00:14:46.400
I want to have a back end
which is using WebSockets and kind of keeping

00:14:46.433 --> 00:14:50.200
track of scores and ratings
and stuff in a database in people's usernames.

00:14:50.200 --> 00:14:53.200
And then I want to have a front end
where we can actually play this.

00:14:53.200 --> 00:14:57.266
I want it to be multiplayer, so I want two people
to be able to play against each other.

00:14:57.300 --> 00:15:01.500
We can keep it simple, have an MVP to start
and then build everything out.

00:15:01.533 --> 00:15:01.666
Okay.

00:15:01.666 --> 00:15:04.833
So I'm just giving it kind of, you know, prompt on
what I, what it is that I want it to do.

00:15:04.833 --> 00:15:06.433
I want it to build something out here.

00:15:06.433 --> 00:15:08.266
And we're going to go ahead and press enter.

00:15:08.266 --> 00:15:10.066
And I just want to show you how this works okay.

00:15:10.066 --> 00:15:12.200
So we can see here the Codex is now working.

00:15:12.200 --> 00:15:14.733
It's making multiple files.
We can see what it's doing.

00:15:14.733 --> 00:15:17.633
And I can kind of go into this
and inspect the different commands.

00:15:17.633 --> 00:15:19.400
But I want to see what's actually running.

00:15:19.400 --> 00:15:21.266
If I expand this right toggle.

00:15:21.266 --> 00:15:23.666
Now you'll notice that it's giving me a preview tab.

00:15:23.666 --> 00:15:26.666
We don't see anything right now because we're
just waiting for it to finish the files.

00:15:26.666 --> 00:15:31.000
But we will be able to see all of the different
files, code changes and all this stuff

00:15:31.000 --> 00:15:32.400
going on here in one second.

00:15:32.400 --> 00:15:35.666
And then if I go here to this kind of little,

00:15:35.700 --> 00:15:39.266
I don't know, to do list icon, you can see that
we have a bunch of options.

00:15:39.266 --> 00:15:40.866
So I can change where I want it to work.

00:15:40.866 --> 00:15:44.100
I can change the branch
I can commit or push directly to GitHub.

00:15:44.133 --> 00:15:47.433
Now it's not giving us any results
because it's not available online right now.

00:15:47.433 --> 00:15:49.033
It's just locally on our computer.

00:15:49.033 --> 00:15:49.833
But you get the idea.

00:15:49.833 --> 00:15:52.033
And then we can view the changes
which is making right now.

00:15:52.033 --> 00:15:53.633
So we're just waiting for those to finish.

00:15:53.633 --> 00:15:56.700
So there's a lot that will start happening
when you actually write code.

00:15:56.700 --> 00:15:59.000
And then I can also toggle open the terminal. Right.

00:15:59.000 --> 00:16:01.233
So I can run commands or see what's happening there.

00:16:01.233 --> 00:16:02.633
Let's go back into this view.

00:16:02.633 --> 00:16:06.200
And then I can open this
in any of the tools that are shown here.

00:16:06.200 --> 00:16:11.233
So if I wanted to open this in cursor and view all of
the code in IDE, I can press that button and do so.

00:16:11.233 --> 00:16:12.200
So let's wait a second for it.

00:16:12.200 --> 00:16:15.300
To finish writing this code, you can see that
it's starting to show me some of the files

00:16:15.300 --> 00:16:19.600
that we have inside of this folder,
and then we'll review it and see what we get okay.

00:16:19.633 --> 00:16:21.533
So just finished the first pass here.

00:16:21.533 --> 00:16:24.800
It says that it built the multiplayer
chess MVP and started locally.

00:16:24.800 --> 00:16:29.300
And if I press on any of the links here, you'll
notice that they'll actually open directly in Codex.

00:16:29.300 --> 00:16:31.266
So you can see that it's opened up right here.

00:16:31.266 --> 00:16:32.400
We kind of have this view.

00:16:32.400 --> 00:16:35.066
I can change the view,
make it large or small or whatever.

00:16:35.066 --> 00:16:38.133
So let's give a username maybe like Tim okay.

00:16:38.200 --> 00:16:39.400
And join the game.

00:16:39.400 --> 00:16:41.733
And then let's try to find a game okay.

00:16:41.733 --> 00:16:43.800
And then I'm just going to open up
another browser here.

00:16:43.800 --> 00:16:46.900
So you can see I can press this
plus button go browser.

00:16:46.900 --> 00:16:48.833
We can actually manually type.

00:16:48.833 --> 00:16:51.200
So localhost 3000 okay.

00:16:51.200 --> 00:16:55.533
And let's see maybe we can change this
as I don't know Joe or something.

00:16:55.866 --> 00:16:58.100
Okay. Join in and find a game.

00:16:58.100 --> 00:17:01.033
And you can see that we find a game
and then we can start playing.

00:17:01.033 --> 00:17:04.733
So I don't know let me try to move here
and see if it moves on this side.

00:17:04.733 --> 00:17:05.800
And it looks like it's working.

00:17:05.800 --> 00:17:08.033
So let's make a move like that

00:17:08.033 --> 00:17:12.100
I'm not going to play the full thing out,
but you guys get the idea that it is indeed working.

00:17:12.100 --> 00:17:14.700
We have a track of all the moves.
We have some leaderboard.

00:17:14.700 --> 00:17:19.933
And then maybe if I resign, you can see
now the ELO has updated and I want so says

00:17:20.000 --> 00:17:24.233
white wins by resignation
I mean pretty cool that that worked that fast.

00:17:24.266 --> 00:17:27.266
Now within this browser view
there's a few buttons you should be aware of.

00:17:27.266 --> 00:17:31.133
So if you have a look at this right hand side,
you can see that you can actually take a screenshot.

00:17:31.133 --> 00:17:33.000
If you do that, it will save it to the clipboard.

00:17:33.000 --> 00:17:37.233
And then you can copy that screenshot
or paste it sorry, into the chat

00:17:37.233 --> 00:17:41.066
in case you want to capture what's going on
inside of this window rather than doing it manually.

00:17:41.066 --> 00:17:44.900
And of course, ChatGPT and GPT here can do
image generation.

00:17:44.900 --> 00:17:46.000
It can view images.

00:17:46.000 --> 00:17:47.933
So that's I mean it should be straightforward.

00:17:47.933 --> 00:17:49.066
You also can annotate.

00:17:49.066 --> 00:17:53.200
So if you annotate this will allow you to select
different HTML elements.

00:17:53.200 --> 00:17:56.233
So for example maybe I'm going to select this
and I can say something like

00:17:56.266 --> 00:17:57.866
I don't really like this title.

00:17:57.866 --> 00:18:01.366
I think we can make it
look a lot better and put a chess logo okay.

00:18:01.433 --> 00:18:06.533
And then we can go here and we can actually
just update any of the values directly on screen.

00:18:06.533 --> 00:18:10.433
I'm not going to do that because I would prefer
just to prompt it, but I'm just going to run that.

00:18:10.466 --> 00:18:14.633
You can see we now have an annotation in chat
and I can start adding other annotations.

00:18:14.633 --> 00:18:18.300
So maybe I'm going to say
can we change the color of the board

00:18:18.300 --> 00:18:22.600
or have like a white or dark mode,
or maybe change the square colors?

00:18:22.800 --> 00:18:25.033
I'm just giving random prompts
going to show you this works.

00:18:25.033 --> 00:18:28.333
And you can see we have annotations
and I can say like go or something.

00:18:28.333 --> 00:18:32.033
And now it's going to have the annotations
that we made in the browser,

00:18:32.033 --> 00:18:35.066
and it's going to make those changes
which are a lot more targeted.

00:18:35.100 --> 00:18:37.833
Okay. So I just refresh
because I want to see what this was doing live.

00:18:37.833 --> 00:18:42.200
And you can see if I go here now and I refresh,
we've kind of changed what the board looks like.

00:18:42.233 --> 00:18:44.633
Obviously we've disconnected.
Now we're waiting to join.

00:18:44.633 --> 00:18:49.100
We can see we have the kind of chess icon and it's
essentially followed the annotations we asked for.

00:18:49.133 --> 00:18:49.333
Okay.

00:18:49.333 --> 00:18:54.700
So hopefully that gave you a bit of information on
how the general kind of coding works inside of Codex.

00:18:54.733 --> 00:18:56.033
It's very good for me.

00:18:56.033 --> 00:18:59.100
I really like this user interface,
and I like using this application.

00:18:59.100 --> 00:19:03.866
And I mean, you can see that it gives us pretty
good results, even though I didn't do anything crazy.

00:19:03.866 --> 00:19:06.066
So now let's move to a few more advanced features.

00:19:06.066 --> 00:19:08.633
Let's start by having a look at some basic commands.

00:19:08.633 --> 00:19:11.633
So commands are just anything
that start with a slash.

00:19:11.633 --> 00:19:16.600
And there's a ton of built in commands inside
of cloud code or not cloud code inside of Codex.

00:19:16.600 --> 00:19:20.433
I'm not going to go over all of them,
but I'll show you a few that you should be aware of.

00:19:20.466 --> 00:19:24.600
So first, if we do slash,
we're going to want to look at status.

00:19:24.633 --> 00:19:26.866
Now status will just show you your usage limit.

00:19:26.866 --> 00:19:29.700
So you can see that for a five hour limit I'm at 98%.

00:19:29.700 --> 00:19:32.433
And for my seven day limit I'm at 99%.

00:19:32.433 --> 00:19:34.400
It also gives me my context limit.

00:19:34.400 --> 00:19:39.466
Now the context can be viewed
using this little kind of circular icon down here.

00:19:39.466 --> 00:19:42.533
It won't give you a detailed breakdown,
but you'll be able to see

00:19:42.533 --> 00:19:45.866
how much you've used, how much is left,
and how many tokens are there.

00:19:45.900 --> 00:19:49.700
Now, depending on the models you're using,
the context size can change, but this is something

00:19:49.700 --> 00:19:54.500
that's useful to be aware of because if the context
gets too large, which means you have too many,

00:19:54.500 --> 00:19:59.933
you know, too much conversation, history,
tool calls, etc., you will need to compact that.

00:20:00.100 --> 00:20:02.266
Now there's actually a command
that can do this for you.

00:20:02.266 --> 00:20:04.066
It's called slash compact.

00:20:04.066 --> 00:20:06.000
Now what slash compact will do

00:20:06.000 --> 00:20:09.800
is it will take everything that you have
in your current conversation history.

00:20:09.800 --> 00:20:13.233
So all of the tool calls, all of the code,
anything that it's understood

00:20:13.233 --> 00:20:17.266
in this whole conversation that we've had,
and it will generate a summary of that

00:20:17.266 --> 00:20:21.133
and then add that to kind of a new,
fresh conversation that you'll start.

00:20:21.133 --> 00:20:24.300
So you'll notice that after I did that,
we now if we look at the

00:20:24.333 --> 00:20:27.200
what is it
context use here, we've only used for percent.

00:20:27.200 --> 00:20:29.100
So it's taken 22% there.

00:20:29.100 --> 00:20:31.633
It's condensed it down given us a summary.

00:20:31.633 --> 00:20:33.000
And now we can continue.

00:20:33.000 --> 00:20:37.933
Now it's not a great idea to compact super early
because you want to use up the context window.

00:20:37.933 --> 00:20:42.466
But as soon as you start
getting to 70%, 80%, 90% context,

00:20:42.500 --> 00:20:46.133
you typically want to compacted
because you're going to get better results.

00:20:46.133 --> 00:20:50.066
Because as the model fills up with context,
it performs worse.

00:20:50.100 --> 00:20:51.233
This is pretty well known.

00:20:51.233 --> 00:20:52.900
I'm not going to go into all of the details.

00:20:52.900 --> 00:20:54.700
Just be aware that command exists.

00:20:54.700 --> 00:21:00.300
You can use it in Codex will automatically compact
for you if you're going to go past your context.

00:21:00.300 --> 00:21:05.300
So you may want to do it at a time that you decide,
rather than waiting for it to do it automatically.

00:21:05.333 --> 00:21:08.933
Now, another thing that we can do,
which is sometimes useful, is we can fork this.

00:21:08.933 --> 00:21:12.233
Now you can see that if we type slash fork,
it will allow us to fork this chat

00:21:12.233 --> 00:21:16.533
into a local or new work tree,
which we're going to look at effectively.

00:21:16.533 --> 00:21:20.666
What this will do is take everything that we've done
and just create a complete copy of it,

00:21:20.666 --> 00:21:26.033
so we can work in multiple agents at the same time
without them having any conflict.

00:21:26.033 --> 00:21:29.233
So they both will kind of work in their own
copy of the code base,

00:21:29.233 --> 00:21:33.066
and then they can go
and kind of joy in everything together.

00:21:33.100 --> 00:21:34.700
Fix any of the merge conflicts.

00:21:34.700 --> 00:21:36.466
When we get to the final version again,

00:21:36.466 --> 00:21:39.266
we'll look at fork in a minute,
but that is a command to be aware of.

00:21:39.266 --> 00:21:42.100
You have the fast mode feedback.
We're not going to do that.

00:21:42.100 --> 00:21:45.833
A NIT goal and some other kind of modes
that we'll look at here in a second.

00:21:45.866 --> 00:21:46.933
Few last things to be aware of.

00:21:46.933 --> 00:21:48.100
You can also pin chats.

00:21:48.100 --> 00:21:50.433
So if we want this chat to be available
we can pin it.

00:21:50.433 --> 00:21:53.200
And then we can create new chats
inside of the same project.

00:21:53.200 --> 00:21:54.800
So you can see it's in chess game here.

00:21:54.800 --> 00:21:57.933
And we can decide how we want to work
and just have another agent either

00:21:57.933 --> 00:22:00.033
running at the same time or in a new chat.

00:22:00.033 --> 00:22:04.133
If we want to ask for something different
and kind of forget the previous conversation history

00:22:04.200 --> 00:22:07.333
we had here. Anyways, let's go to a new chat.

00:22:07.333 --> 00:22:12.733
Now we're inside of chess game, and let's use
a new mode that we haven't seen yet, which is plan.

00:22:12.733 --> 00:22:16.133
So if we use slash plan, we can enable plan mode.

00:22:16.133 --> 00:22:17.733
You'll see that it's here and now.

00:22:17.733 --> 00:22:22.200
With plan mode, what we can do is
we can ask this something a little bit more detailed.

00:22:22.200 --> 00:22:23.800
We can describe what we want.

00:22:23.800 --> 00:22:26.400
And Codex will prompt us with different questions

00:22:26.400 --> 00:22:30.233
and kind of clarifying details
before it goes and executes the plan.

00:22:30.266 --> 00:22:34.400
Pretty straightforward, but typically you want
to make a plan before you do something too complex.

00:22:34.400 --> 00:22:39.200
So really for our chess game, we should have started
in plan mode, built the plan, and then execute it.

00:22:39.200 --> 00:22:42.100
I was just saving it for later
because it's a little bit more complex.

00:22:42.100 --> 00:22:44.933
So now maybe I want to expand this chess game.

00:22:44.933 --> 00:22:47.200
I want to have puzzles. I want to have a leaderboard.

00:22:47.200 --> 00:22:50.400
I want to have maybe a big UI,
I want to have whatever accounts.

00:22:50.400 --> 00:22:52.400
So let's start generating a plan for that.

00:22:52.400 --> 00:22:54.700
I want to expand our chess game.

00:22:54.700 --> 00:22:59.266
I want to have a better landing page
so that a user can see their stats,

00:22:59.266 --> 00:23:03.900
and they have the ability to either play a game
or play a puzzle or go to like a practice board.

00:23:03.900 --> 00:23:05.800
I want to generate a few different game modes,

00:23:05.800 --> 00:23:09.833
and I want to really polish this up
and make it kind of like a Chess.com clone.

00:23:09.866 --> 00:23:11.733
Let's start with just the MVP features.

00:23:11.733 --> 00:23:13.133
Can you generate a plan for this?

00:23:13.133 --> 00:23:18.000
Ask me any questions you need to okay,
so let's go here and press enter.

00:23:18.000 --> 00:23:21.066
And because it's in plan
mode it's going to map everything out.

00:23:21.066 --> 00:23:26.100
And it should start asking us some questions
and prompting us so that it can generate that for us.

00:23:26.133 --> 00:23:26.400
Okay.

00:23:26.400 --> 00:23:29.433
So we can see that it's now
prompting us with a few questions in the bottom here.

00:23:29.433 --> 00:23:34.133
So it says for the first MVP pass,
which mode set should the landing page launch?

00:23:34.233 --> 00:23:36.066
We can have add bot game, add

00:23:36.066 --> 00:23:40.066
time modes or core three ship
the landing page, live game, daily star puzzles.

00:23:40.066 --> 00:23:41.033
Let's go with that.

00:23:41.033 --> 00:23:43.400
How should the user stats work for an MVP?

00:23:43.400 --> 00:23:44.400
Let's just go.

00:23:44.400 --> 00:23:46.433
Username. Profiles okay.

00:23:46.433 --> 00:23:49.833
Username. Login. Expand stats. Okay.

00:23:49.866 --> 00:23:52.466
How deep should the puzzle mode be an MVP?

00:23:52.466 --> 00:23:53.633
Let's just do.

00:23:54.633 --> 00:23:55.233
Yes. Small

00:23:55.233 --> 00:23:58.500
bundled puzzled library that looks good
and that we continue.

00:23:58.533 --> 00:24:00.300
Now while it's doing this, also mention

00:24:00.300 --> 00:24:03.333
that if you open up the sidebar here,
you'll see a few more options.

00:24:03.333 --> 00:24:07.400
Because we're in this kind of coding environment,
we can now view all of the files.

00:24:07.400 --> 00:24:09.433
If we want to look at this,
we see we have the database.

00:24:09.433 --> 00:24:11.100
We can open up the server right.

00:24:11.100 --> 00:24:15.900
And you can modify the code, or you can add comments
directly inside of here or tag different things.

00:24:15.900 --> 00:24:18.300
And now you'll see that it's generating the plan.

00:24:18.300 --> 00:24:20.466
I believe the plan will be stored in this repo.

00:24:20.466 --> 00:24:23.666
I might just need to refresh,
but we should be able to view it.

00:24:23.666 --> 00:24:25.400
So if I want to look at the plan here,

00:24:25.400 --> 00:24:29.466
you can see we can open it up
and it gives us everything that needs to be done.

00:24:29.500 --> 00:24:29.900
Okay.

00:24:29.900 --> 00:24:33.600
So I could just implement this plan right
and just start running with that.

00:24:33.600 --> 00:24:37.700
But what I want to show you now is another mode
that's super useful,

00:24:37.733 --> 00:24:41.300
that is going to get things done
a lot more efficiently for us without us

00:24:41.300 --> 00:24:45.100
having to keep approving things
or prompting the model multiple times.

00:24:45.100 --> 00:24:47.033
And that is called goal.

00:24:47.033 --> 00:24:50.700
So there is this slash command called slash goal.

00:24:50.733 --> 00:24:54.600
Now if we use this let me just actually type it out.

00:24:54.633 --> 00:24:59.733
What will happen
is that codex will run until a goal is achieved.

00:24:59.733 --> 00:25:00.666
Now this is kind of

00:25:00.666 --> 00:25:04.733
that agent loops that you may have heard
about recently that everyone's talking about.

00:25:04.800 --> 00:25:06.033
They have that built in now.

00:25:06.033 --> 00:25:09.200
So what we can do is we can say, hey,
here's the goal.

00:25:09.200 --> 00:25:14.433
And we just set a high level objective, and Codex
will keep going until the goal is achieved.

00:25:14.433 --> 00:25:18.066
So it will plan, it will execute
and then it will review if it's achieved the goal.

00:25:18.066 --> 00:25:20.400
And if it hasn't, it will just keep running.

00:25:20.400 --> 00:25:24.000
So it's not just going to do one pass or implement
one set of features.

00:25:24.000 --> 00:25:26.300
It will go until the goal is achieved.

00:25:26.300 --> 00:25:28.033
Now, in order to use this effectively,

00:25:28.033 --> 00:25:32.000
you need to set a good goal
and the conditions for the goal to be achieved.

00:25:32.033 --> 00:25:35.066
Now, in our case,
we already have the plan so we can effectively

00:25:35.066 --> 00:25:38.300
just say keep running
until the entire plan is implemented.

00:25:38.300 --> 00:25:40.333
It will then run check if the plan is done.

00:25:40.333 --> 00:25:41.900
If it's not, it will keep going.

00:25:41.900 --> 00:25:43.400
If it is, it will finish.

00:25:43.400 --> 00:25:48.233
So this will allow it to run for a long
period of time, which also will use a lot of usage.

00:25:48.233 --> 00:25:49.733
So keep that in mind.

00:25:49.733 --> 00:25:52.466
So for the goal I'm going to say okay, keep running

00:25:52.466 --> 00:25:55.666
and implement
the entire plan until the plan is fully finished.

00:25:55.666 --> 00:26:00.333
Everything is tested, everything is working
and we are confident to deploy this.

00:26:00.633 --> 00:26:03.666
Again, not the best prompt in the world,
but I'm just showing you the usage here.

00:26:03.666 --> 00:26:07.000
And now that the plan is enabled, we have goal set.

00:26:07.066 --> 00:26:11.633
I can press enter and you can see that
it's going to pursue this goal and start running.

00:26:11.633 --> 00:26:13.466
And we can view this is the goal.

00:26:13.466 --> 00:26:15.466
And it's going through all of the different steps.

00:26:15.466 --> 00:26:19.633
And it will just be this infinite loop
which can take a very long time to run.

00:26:19.666 --> 00:26:19.933
All right.

00:26:19.933 --> 00:26:22.900
So the goal has just finished it
built this application for us.

00:26:22.900 --> 00:26:26.133
I don't know if it's fully working,
but you guys get the idea and it's done.

00:26:26.200 --> 00:26:29.900
So now let's have a look at some more features
and start going through it okay.

00:26:29.933 --> 00:26:31.000
So first things first.

00:26:31.000 --> 00:26:34.600
If you look at any of these chats
you have the ability to right click them.

00:26:34.600 --> 00:26:36.833
You can pin them rename them.

00:26:36.833 --> 00:26:40.733
You can also fork them into a local version
or a new work tray.

00:26:40.733 --> 00:26:44.400
Now I want to really briefly discuss
what a work tree is,

00:26:44.400 --> 00:26:48.233
because it's a little bit complicated,
and we'll save the full usage for a part two.

00:26:48.266 --> 00:26:51.100
So let me know if you guys want to see
that in the comments down below.

00:26:51.100 --> 00:26:53.866
Now, if I try to open a new project here, right.

00:26:53.866 --> 00:26:54.700
So I've gone sorry.

00:26:54.700 --> 00:26:55.266
New chat.

00:26:55.266 --> 00:26:58.033
Okay, so I want new chat.
And then I selected Chess Game.

00:26:58.033 --> 00:27:02.066
And then what I did is rather than selecting
work locally, I selected new work tree.

00:27:02.066 --> 00:27:05.266
I have the ability to create a local environment.

00:27:05.300 --> 00:27:10.266
Now the reason this is important is that if you want
to run parallel agents at the same time,

00:27:10.266 --> 00:27:15.466
they should be working in their own
copy of the repository or the project that you have.

00:27:15.533 --> 00:27:18.733
If they work on the same files,
there can be conflicts

00:27:18.733 --> 00:27:22.633
because they're touching the same information
at the same time, and that's not good.

00:27:22.666 --> 00:27:25.466
So the solution to this is a work tree.

00:27:25.466 --> 00:27:27.466
This is provided by git.

00:27:27.466 --> 00:27:31.000
Again it's a little bit
complicated to setup and a bit confusing to use.

00:27:31.000 --> 00:27:32.933
So I'm not going to go through all of the details.

00:27:32.933 --> 00:27:36.933
But if you do want to run
parallel agents at the same time,

00:27:36.933 --> 00:27:39.933
you have multiple tasks going,
this is what you would use.

00:27:39.933 --> 00:27:43.800
You have to configure the environment first,
which you can ask Codex to help you do,

00:27:43.800 --> 00:27:47.800
and then you can change the branches and stuff
in order to work on the different features.

00:27:47.800 --> 00:27:51.300
And now you'll have different agents
because you can run multiple at the same time,

00:27:51.700 --> 00:27:54.633
working in these kind of copies of the same repo.

00:27:54.633 --> 00:27:58.733
Again, this is a more advanced developer feature,
so I'm not going to dive into it too much.

00:27:58.800 --> 00:28:01.133
Now, another feature that's somewhat related to this.

00:28:01.133 --> 00:28:02.733
Let's go back to local copy.

00:28:02.733 --> 00:28:05.700
Here is this tool called Slash Review.

00:28:05.700 --> 00:28:08.833
Now this is a code review
that can automatically compare

00:28:08.833 --> 00:28:13.733
any changes that have been made
in the current session against what's in GitHub.

00:28:13.800 --> 00:28:14.266
Okay.

00:28:14.266 --> 00:28:18.800
So if I go to maybe this right now
and I go slash review,

00:28:18.833 --> 00:28:22.000
you can see that
I can review this against a base branch.

00:28:22.000 --> 00:28:26.400
So a branch in git if you're familiar with that
or review any uncommitted changes.

00:28:26.400 --> 00:28:30.133
So if I go slash review right
and then uncommitted changes

00:28:30.233 --> 00:28:34.633
it's going to start looking at all of the changes
that it made here and automatically review

00:28:34.633 --> 00:28:39.300
them to make sure that they're good
before we push them to get or before we commit them.

00:28:39.300 --> 00:28:43.333
This is a pretty useful feature that Codex has,
and this is something you should always do

00:28:43.400 --> 00:28:47.600
after you've done a large amount of changes
before you push them to remote repository.

00:28:47.600 --> 00:28:49.066
And if you don't know what that means, don't worry.

00:28:49.066 --> 00:28:51.100
But if you're a developer,
you'll understand the value

00:28:51.100 --> 00:28:55.400
of having a built in shortcut
that will do all of those passes and checks for you.

00:28:55.433 --> 00:28:58.833
Okay, so you can see that it's done
the review and it's given us some comments now.

00:28:58.833 --> 00:29:02.233
And it said, hey, these are errors that I found
after doing the code review.

00:29:02.266 --> 00:29:04.266
Right. So let me go ahead and fix them okay.

00:29:04.266 --> 00:29:07.866
So let's move to the next feature
which is memory and context.

00:29:07.900 --> 00:29:10.866
Now this is less maybe, I don't know demo

00:29:10.866 --> 00:29:13.900
wise and more me explaining how this works
because I want you to understand this.

00:29:13.900 --> 00:29:16.833
So if I make a new chat right here okay.

00:29:16.833 --> 00:29:20.466
And we go into this and I'm working locally,
I want you to see something.

00:29:20.600 --> 00:29:25.100
What did I do in my last session
when I was working on the chess game?

00:29:25.200 --> 00:29:29.433
Now, the reason why I'm going to run this prompt
and show you the result, is that you need

00:29:29.433 --> 00:29:32.433
to understand that by default,

00:29:32.466 --> 00:29:36.433
Codex doesn't
remember things that you worked on in the past.

00:29:36.433 --> 00:29:41.433
Anytime you create a new chat,
what it's doing is reviewing anything that you have

00:29:41.433 --> 00:29:44.466
in your current repo,
kind of trying to load in information

00:29:44.466 --> 00:29:47.866
and find any context that's relevant
and then give you an answer.

00:29:47.866 --> 00:29:50.933
But by default
it doesn't remember everything that you did.

00:29:50.933 --> 00:29:53.500
So it won't have the full conversation history.

00:29:53.500 --> 00:29:55.066
It won't know maybe preferences

00:29:55.066 --> 00:29:59.066
that you told it, and it can forget things
because it doesn't remember by default.

00:29:59.100 --> 00:30:02.900
The only reason this actually just gave me a response
is because it looked inside

00:30:02.900 --> 00:30:07.433
of my project here that I'm inside of
and was able to find that information.

00:30:07.433 --> 00:30:13.233
But if I go to a new chat and I say and I remove
the project, what did I work on for my chess game?

00:30:13.400 --> 00:30:17.033
And I just ask it something really vague like that,
it shouldn't know.

00:30:17.200 --> 00:30:20.800
At least I don't think it will know
because it's not going to have any of that context.

00:30:20.833 --> 00:30:23.833
The reason why I'm mentioning this
is that you need to understand that

00:30:23.833 --> 00:30:27.800
anytime you make a new session,
you're effectively starting from scratch.

00:30:27.800 --> 00:30:31.633
And anything that you want this to know,
it has to already exist as a file.

00:30:31.633 --> 00:30:34.700
It has to be saved persistently
so Codex can read it in.

00:30:34.700 --> 00:30:39.333
And you can see here that it's not able
to really find the information very well for me here.

00:30:39.333 --> 00:30:42.933
And it has to actually go
and look through the different conversation history

00:30:42.933 --> 00:30:46.233
and threads to find this information
so it can find it.

00:30:46.233 --> 00:30:51.433
But the only reason it can do that is because it's
searching through the threads and it's very slow.

00:30:51.433 --> 00:30:53.900
And again, it's not going to remember everything
by default.

00:30:53.900 --> 00:30:57.333
The reason why I'm mentioning this
is that you can fix this problem

00:30:57.333 --> 00:31:01.233
by creating something called an agent dot file.

00:31:01.233 --> 00:31:06.133
Now this is something that's common
in all of your code base tools, CLI based tools,

00:31:06.166 --> 00:31:10.066
whatever AI agents
where you can make effectively a memory file

00:31:10.066 --> 00:31:15.800
that will always be loaded into the prompt
or into the model before you start working with it.

00:31:15.800 --> 00:31:17.533
Now this is a really good file to create,

00:31:17.533 --> 00:31:20.600
especially when you're working on larger projects
with multiple people,

00:31:20.600 --> 00:31:25.133
because you can store preferences,
different tools or stacks that you want to use.

00:31:25.200 --> 00:31:28.333
I wouldn't say credentials,
but you can store just important

00:31:28.333 --> 00:31:31.400
info that you don't want to have to keep
telling the model over and over again.

00:31:31.433 --> 00:31:33.466
So for example, I can tell this.

00:31:33.466 --> 00:31:37.200
I would like you to create an agent file
with all of the conventions

00:31:37.400 --> 00:31:39.666
for this project, specifically the tech stack

00:31:39.666 --> 00:31:43.266
that we're using, how to run it,
and what we've set up so far.

00:31:43.900 --> 00:31:44.400
Okay.

00:31:44.400 --> 00:31:48.300
And what this will do now is create a new file for us
called agents.

00:31:48.833 --> 00:31:50.000
You'll see it in a second.

00:31:50.000 --> 00:31:52.433
It's automatically making it starts
with all capitals.

00:31:52.433 --> 00:31:55.666
And it's going to fill this file
with important info then.

00:31:55.666 --> 00:32:00.300
Now we're never going to forget
or Codex will never forget because this is by default

00:32:00.300 --> 00:32:04.066
automatically load it into Codex
anytime we make a new conversation.

00:32:04.066 --> 00:32:06.833
So let's give this a second to make the file
and see what it looks like.

00:32:06.833 --> 00:32:09.900
So let's open this up
and you can see that it gives us

00:32:09.900 --> 00:32:13.400
project conventions,
direction, tech stack, how to run it, etc..

00:32:13.433 --> 00:32:18.400
So now if we make a new conversation,
I go, what are the project conventions?

00:32:18.400 --> 00:32:22.033
It's not going to have to search
through a bunch of files to find this.

00:32:22.066 --> 00:32:28.033
It can just get it directly from its kind of system
info now, because it will have been loaded in and MD.

00:32:28.033 --> 00:32:30.433
So you can see it just immediately
gives us the result.

00:32:30.433 --> 00:32:35.233
It doesn't need to read anything because it was
already loaded in when we started the conversation.

00:32:35.233 --> 00:32:39.000
If we look at the context,
you can see the context is slightly

00:32:39.000 --> 00:32:42.333
higher usage than normal
because it's started by loading that file.

00:32:42.500 --> 00:32:43.800
I hope that that makes sense to you.

00:32:43.800 --> 00:32:48.100
I know that's not the best explanation possible,
but anything that you want to be kind of long

00:32:48.133 --> 00:32:51.100
term, persistent info
that's going to be used all of the time,

00:32:51.100 --> 00:32:56.100
you want to put it in this agents
MD file and tell Codex to create that for you.

00:32:56.100 --> 00:32:58.100
And you can continually update this

00:32:58.100 --> 00:33:02.466
to improve the performance of the model
you use in a particular project.

00:33:02.500 --> 00:33:06.900
Okay, so that is kind of the agents, the in memory
info that you need to know.

00:33:06.900 --> 00:33:09.200
And the last thing we'll look at is scheduled tasks.

00:33:09.200 --> 00:33:12.333
Now I'm not going to actually create these,
but I'm just going to mention that they exist

00:33:12.400 --> 00:33:16.200
just like cloud code or other tools
that you may have used, you can create scheduled

00:33:16.233 --> 00:33:19.933
tasks that run automatically for you,
assuming your computer is on.

00:33:19.933 --> 00:33:24.500
So you can make a daily brief where every morning
it opens your computer, searches

00:33:24.500 --> 00:33:26.000
the news and gives you some info.

00:33:26.000 --> 00:33:29.200
You can do a weekly review where it tells
you all the things you worked on.

00:33:29.200 --> 00:33:32.233
You can do project monitor where
if something changes, we do this.

00:33:32.233 --> 00:33:36.100
So if I do create via chat, for example,
I can make it to set up a scheduled

00:33:36.133 --> 00:33:39.466
task for me automatically,
or I can go to templates and I can pick one.

00:33:39.466 --> 00:33:41.933
So maybe like this, this is what I want to do.

00:33:41.933 --> 00:33:45.466
I want to run it in this chat or in a work tree.

00:33:45.833 --> 00:33:47.266
I want to in this project.

00:33:47.266 --> 00:33:49.300
I want it to repeat at this time.

00:33:49.300 --> 00:33:50.800
Then this is the model that I want to use.

00:33:50.800 --> 00:33:52.400
Okay. So again you can make these.

00:33:52.400 --> 00:33:56.000
You can have them set to run
and you can set this up to kind of automatically

00:33:56.000 --> 00:33:59.133
do things for you,
which is useful if you want some automations.

00:33:59.133 --> 00:34:01.833
But for me I don't really need any.
So I don't have those setup as of now.

00:34:01.833 --> 00:34:05.500
And then of course, you can search
through all of your chats and a bunch of other stuff,

00:34:05.500 --> 00:34:10.733
and we can go crazy and we can go to add MCP servers.

00:34:10.733 --> 00:34:12.333
We can control the browser use.

00:34:12.333 --> 00:34:16.633
We can do computer use, hooks, connections,
git environments, work trees.

00:34:16.633 --> 00:34:19.333
There is a lot more to go over,
but I'm going to save that for a part two.

00:34:19.333 --> 00:34:23.466
If you guys let me know in the comments
that you want to see an advanced version of this

00:34:23.500 --> 00:34:27.900
that is going to wrap up this video,
that was a pretty comprehensive overview of Codex,

00:34:27.933 --> 00:34:32.700
a lot of the features, how to use it, some good
demos, setting up a lot of the important plugins.

00:34:32.700 --> 00:34:35.900
At this point, you know, probably 90% of Codex.

00:34:35.966 --> 00:34:39.633
If you want the extra 10%, let me know
and I will happily make an advanced version.

00:34:39.633 --> 00:34:43.666
For those of you that are devs and are kind of past
some of the beginner stuff that I showed here.

00:34:43.666 --> 00:34:44.900
Anyway, I hope you enjoyed.

00:34:44.900 --> 00:34:48.633
If you did leave a like subscribe
and I will see you in the next one.

