0:00.266–0:02.266
This video will teach you Codex.
0:02.266–0:04.384
I'll go through all of the important features,
0:04.384–0:06.121
show you how to set it up and install it,
0:06.121–0:07.533
and assume no prior knowledge.
0:07.533–0:09.188
So even if you're a complete beginner,
0:09.188–0:10.600
you'll be able to follow along.
0:10.600–0:14.266
Now I'm going to be covering things like computer use or browser control.
0:14.266–0:17.403
I'm going to show you how to set it up for coding model selection,
0:17.403–0:19.711
all of the different commands like slash goal,
0:19.711–0:23.000
and a lot of the new features that I haven't seen many people cover.
0:23.000–0:24.700
So with that said, stick around.
0:24.700–0:27.133
Let's get into it and let me teach you Codex.
0:27.133–0:29.333
So let's start by discussing what Codex is.
0:29.333–0:32.433
We'll look at how we can use it because there's actually many different ways.
0:32.433–0:34.833
And then I'll start going through all of the different features.
0:34.833–0:37.533
There'll be timestamps down below in case you want to skip forward.
0:37.533–0:40.433
And keep in mind I like to make things really thorough in detailed.
0:40.433–0:44.433
So if you feel like I'm going to slow, fast forward to the next section okay.
0:44.433–0:46.266
So first what is Codex?
0:46.266–0:50.533
Well Codex is essentially OpenAI's answer to tools like Claude code.
0:50.533–0:54.595
It's actually much more involved than Claude code I would say it has a lot more features,
0:54.595–0:57.266
and a lot of people don't know about what you can do with it.
0:57.266–1:03.733
Now, the basics is that you can use it to write code because it will give you access to their top models like GPT 5.5.
1:03.733–1:06.905
However, you can also use it to control your computer,
1:06.905–1:08.033
to automate tasks,
1:08.033–1:10.500
to perform something repetitive for you.
1:10.500–1:14.000
And you can even do something like tell it to play a song on Spotify for you.
1:14.000–1:17.000
And it can go and do that by controlling your computer.
1:17.000–1:19.700
So there's a lot of cool features that are not just related to coding.
1:19.700–1:22.100
I'm going to try to cover all of those in this video.
1:22.100–1:24.885
So what I want to do is quickly cover how you can use Codex,
1:24.885–1:26.900
because there's a lot of different ways.
1:26.900–1:33.600
And OpenAI has been very confusing with the naming of Codex because they had models called Codex like their actual LLMs.
1:33.600–1:35.627
Now they have the tool called Codex,
1:35.627–1:38.466
and you can use it in like many different fashions.
1:38.466–1:42.900
So for this video we're going to be using the stand alone desktop application.
1:42.900–1:45.833
The way this works is you download it and install it on your computer.
1:45.833–1:46.967
You can get it for windows,
1:46.967–1:49.133
Mac and then they don't have it for Linux right now.
1:49.133–1:50.400
So just Windows or Mac.
1:50.400–1:53.666
Now you'll sign into this using your ChatGPT subscription.
1:53.666–1:54.451
You can use it,
1:54.451–1:55.040
I believe,
1:55.040–1:57.133
as low as $20 per month on the plus plan.
1:57.133–1:59.767
Just keep in mind I do have the $200 per month plan,
1:59.767–2:02.433
so my usage limits will be significantly higher.
2:02.433–2:04.400
Now the limits are typically very generous.
2:04.400–2:07.300
You're probably going to get 5 or 10 times the amount of usage.
2:07.300–2:09.641
Then you would compare it to something like Claude Code,
2:09.641–2:11.933
so I wouldn't be too concerned with ripping through it.
2:11.933–2:15.266
Unless you use the highest end models and you're running it 24 over seven.
2:15.266–2:17.666
Now you can also use this with an OpenAI API key.
2:17.666–2:21.100
I definitely do not recommend that because that's going to be very expensive.
2:21.100–2:21.704
So first up,
2:21.704–2:24.484
if you don't want to be downloaded and installed Codex,
2:24.484–2:28.292
I'll leave a link to it in the description sign in with your ChatGPT account,
2:28.292–2:30.890
then you're good to go now as well as the desktop app,
2:30.890–2:33.100
which again is what we're going to be using.
2:33.100–2:35.033
They also have an IDE extension.
2:35.033–2:37.972
You can install this in the popular editors like cursor,
2:37.972–2:43.100
Visual Studio Code and Windsurf and have access to the same Codex interface inside of that editor.
2:43.100–2:44.050
If you're a developer,
2:44.050–2:45.000
you may want to do that.
2:45.000–2:46.400
We also have CLI.
2:46.400–2:50.011
Now this is a command line interface more familiar to something like cloud Code,
2:50.011–2:52.706
where you're not in kind of a nice graphical user interface,
2:52.706–2:54.000
which you'll see in a minute.
2:54.000–2:57.705
But the advantage here is that you can run this on something like Linux or a server,
2:57.705–3:00.900
and you can have this as a remote machine that's running 24 over seven.
3:00.900–3:01.299
Same thing.
3:01.299–3:02.533
You can sign in with your account.
3:02.533–3:06.233
And then we have the cloud version which is running directly in your browser.
3:06.233–3:08.432
It's better if you can use the desktop version,
3:08.432–3:11.533
but if you want to do it from the browser on your phone or something,
3:11.533–3:12.300
you can do that.
3:12.300–3:12.614
Okay,
3:12.614–3:14.500
so those are the surfaces for Codex.
3:14.500–3:14.819
Again,
3:14.819–3:17.261
what we want to do is download the desktop application,
3:17.261–3:19.066
which is where we're going to be working.
3:19.066–3:20.666
And now let's open up that app.
3:20.666–3:22.526
So just open up the desktop application,
3:22.526–3:27.833
which is where we're going to be working and where I recommend you use Codex because does the most number of features.
3:27.866–3:29.866
Now let's start by going through the user interface.
3:29.866–3:32.800
You can understand what all of these buttons actually do.
3:32.800–3:35.066
And then I promise we'll go through all of the features.
3:35.066–3:37.066
So here you have your main chat window.
3:37.066–3:39.121
There's a few things you want to pay attention to,
3:39.121–3:41.426
like the model selector which we'll look at in a minute,
3:41.426–3:43.381
the voice dictation in case you want to use that
3:43.381–3:44.233
the approval modes.
3:44.233–3:47.000
So ask for approval approved for me or full access.
3:47.000–3:50.100
And then being able to add different skills context.
3:50.100–3:52.668
And then if you want you can actually run commands
3:52.668–3:53.833
by using this slash.
3:53.833–3:55.498
So if you do forward slash you be able to see
3:55.498–3:56.925
a list of all of this stuff available
3:56.925–3:58.100
which will be going through.
3:58.100–4:01.466
You also have the ability to organize different chats into projects.
4:01.466–4:03.333
So you can see I have a few projects here.
4:03.333–4:04.269
You can make a new one,
4:04.269–4:05.933
but we'll look at that in a few minutes.
4:05.933–4:08.100
Now from the right hand side you'll also notice
4:08.100–4:09.600
that you have these toggle bars.
4:09.600–4:11.720
So if you click on the right it's going to show you
4:11.720–4:12.833
a browser and a terminal.
4:12.833–4:16.152
That's because Codex can automatically control a browser for you
4:16.152–4:17.600
and test your applications.
4:17.600–4:20.715
And then you can also toggle up the terminal or the shell,
4:20.715–4:23.266
which again Codex can control and use for you.
4:23.266–4:24.772
You typically don't need to do this,
4:24.772–4:26.529
but I'm just showing you those views exist
4:26.529–4:27.533
from the left hand side.
4:27.533–4:29.279
You can also toggle this sidebar
4:29.279–4:31.930
where you have some of the important I don't know,
4:31.930–4:33.166
buttons or views.
4:33.166–4:35.025
If you want to access the settings menu,
4:35.025–4:36.433
you can click on your profile.
4:36.433–4:39.433
You can go to profile or to settings for settings.
4:39.433–4:41.466
If you are someone who's not going to do any coding,
4:41.466–4:43.500
you can switch this over to the everyday work mode.
4:43.500–4:45.366
So it's going to be a little bit less technical,
4:45.366–4:46.084
but for most of us,
4:46.084–4:47.329
we're going to want to stay here
4:47.329–4:48.669
where we have access the browser,
4:48.669–4:50.233
the terminal and some other features.
4:50.233–4:51.433
There's a ton of settings.
4:51.433–4:52.797
Feel free to look through these
4:52.797–4:54.266
and change any of them if you want.
4:54.266–4:54.772
But again,
4:54.772–4:56.233
I'll go through them one by one.
4:56.233–4:57.177
And then last thing,
4:57.177–4:58.955
if you go and look at usage and billing,
4:58.955–5:00.455
you'll be able to see your usage,
5:00.455–5:02.066
the plan that you're currently on,
5:02.066–5:03.733
if you have any balance or anything.
5:03.733–5:04.115
Again,
5:04.115–5:05.833
these are very generous limits.
5:05.833–5:07.619
It's very unlikely that you're going to hit them,
5:07.619–5:09.666
especially if you're doing something somewhat normal.
5:09.666–5:11.433
So I wouldn't stress out about it too much.
5:11.433–5:12.800
Okay, so now that we've gone through that,
5:12.800–5:13.933
let's start looking at the models.
5:13.933–5:15.442
Let's start running a few chats
5:15.442–5:16.776
and setting up some plugins
5:16.776–5:19.214
so I can show you things like the computer control,
5:19.214–5:20.200
which is super cool.
5:20.200–5:24.300
But first, just a quick word from our sponsor boot dev.
5:24.300–5:26.997
Now this is one of the best learning platforms out there
5:26.997–5:29.400
and actually a long term partner of this channel.
5:29.400–5:33.266
Now, one of the biggest problems that I see with people learning to code is boredom.
5:33.266–5:34.641
They watch tutorials,
5:34.641–5:35.293
copy code,
5:35.293–5:36.958
feel productive for a week,
5:36.958–5:38.333
and then they quit now.
5:38.333–5:40.900
But dev takes a completely different approach.
5:40.900–5:41.959
It's very hands on
5:41.959–5:45.100
and honestly, it feels more like a game than a course.
5:45.100–5:48.734
Now you're learning backend development by actually building things,
5:48.734–5:50.066
not just watching videos.
5:50.066–5:53.359
You work through real challenges in Python SQL and go
5:53.359–5:54.931
earn level up five bosses
5:54.931–5:58.000
and progress through a full backend curriculum.
5:58.000–5:59.296
Now it sounds a bit gimmicky,
5:59.296–6:00.863
but I promise you it actually works
6:00.863–6:04.266
because you're doing the same kind of problem solving that you do on the job.
6:04.266–6:06.403
Now they also have an AI tutor called boots,
6:06.403–6:08.362
which doesn't just dump answers on you,
6:08.362–6:09.728
it asks follow up questions
6:09.728–6:12.577
and helps you reason through problems when you get stuck,
6:12.577–6:14.833
which is way closer to how you actually learn.
6:14.833–6:17.215
Now, all of the content is free to read and watch,
6:17.215–6:19.181
and if you want the interactive coding,
6:19.181–6:20.372
the progress tracking,
6:20.372–6:21.504
and the AI assistance,
6:21.504–6:23.000
that's part of the paid plan.
6:23.000–6:24.781
If you want to check it out,
6:24.781–6:25.347
go to dev
6:25.347–6:27.209
and use my code tech with Tim
6:27.209–6:29.266
to get 25% off your first year.
6:29.266–6:31.633
Big thanks to Boot Dev for sponsoring this video.
6:31.633–6:33.266
Now let's get back into it.
6:33.266–6:34.155
So like I was saying,
6:34.155–6:35.933
let's have a look at the model selection.
6:35.933–6:37.400
Now, for some reason you don't see this view.
6:37.400–6:39.082
You can always just press a new chat
6:39.082–6:40.300
and it will bring this up.
6:40.300–6:42.457
Now from here if you go to model selector
6:42.457–6:47.066
you're going to see that you have a reasoning level light medium high and extra high.
6:47.066–6:50.807
Now of course you want to use the best reasoning whenever you possibly can,
6:50.807–6:54.066
but keep in mind that this is going to take significantly longer.
6:54.066–6:58.133
So the reasoning can kind of come down to how long this is going to take.
6:58.133–7:03.588
Of course, the higher reasoning, the better responses and results that you're typically going to get,
7:03.588–7:06.633
but it can increase the time by like 4 or 5, sometimes ten x.
7:06.633–7:10.800
I've had tasks here taken 30 minutes to run in extra high reasonings.
7:10.800–7:11.833
If you want something fast.
7:11.833–7:15.249
If you're asking a quick question, you don't need super high reasoning
7:15.249–7:17.400
and you can put this in light or medium mode.
7:17.400–7:20.333
Now, when it comes to the model itself, you have a few options.
7:20.333–7:23.333
GPT 5.5 is kind of the best one.
7:23.333–7:27.533
The frontier coding model, the one you're going to want to use for pretty much everything.
7:27.533–7:32.400
GPT 5.4 is just the generation before that that has kind of cheaper usage limits.
7:32.400–7:34.627
I would never use this one.
7:34.627–7:35.733
GPT 5.4 mini.
7:35.733–7:39.810
This can be used for small, fast, kind of efficient things where you're asking a question
7:39.810–7:42.400
or you just want, you know, quick UI change or something.
7:42.400–7:47.826
And then 5.3 Codec Spark is just an extremely fast model that you use again, for very minor things
7:47.826–7:50.200
that don't require a lot of intelligence.
7:50.200–7:54.133
And specifically when you're running out of the usage on GPT 5.5.
7:54.133–7:57.600
So for 99% of you, you just keep GPT 5.5 on.
7:57.600–7:59.533
Probably throw it in medium reasoning.
7:59.533–8:00.755
If you have enough credits,
8:00.755–8:02.030
you can turn on this fast mode
8:02.030–8:02.933
so it'll run faster.
8:02.933–8:04.541
I pretty much always leave that on,
8:04.541–8:06.648
and then if you start running out of the usage,
8:06.648–8:08.700
you can switch to some of these other models.
8:08.700–8:10.824
You can change the speed back to default
8:10.824–8:12.626
and you can adjust the reasoning,
8:12.626–8:14.300
but most of the time 5.5 medium.
8:14.300–8:15.633
This is what you're going to keep it in.
8:15.633–8:17.978
And if you're doing something more complicated,
8:17.978–8:20.700
switch up the reasoning level here to high or extra high.
8:20.700–8:21.753
You can play around with it,
8:21.753–8:23.400
but that's pretty much all you need to know.
8:23.400–8:24.695
Okay, so of course we're going to use this
8:24.695–8:26.066
and I'm going to show you a bunch of prompts.
8:26.066–8:27.824
But I want to show you how to set this up
8:27.824–8:30.433
so we can do some really interesting things with Codex.
8:30.433–8:33.033
So what we're going to do here is go to plugins.
8:33.033–8:35.529
Now this is one of my favorite features of Codex
8:35.529–8:37.833
is all of the plugins that it has by default.
8:37.833–8:40.387
And the fact that it can control your computer,
8:40.387–8:41.631
control your browser,
8:41.631–8:42.941
control spreadsheets,
8:42.941–8:44.119
access Google Drive,
8:44.119–8:47.100
and do this in a really interactive and intuitive way.
8:47.100–8:49.607
Now, most of your tools like this like cloud code,
8:49.607–8:50.952
they can do the same thing,
8:50.952–8:52.848
but I find Codex performs a lot better
8:52.848–8:54.866
and it's just way easier to understand.
8:54.866–8:56.485
So what we're going to want to do here
8:56.485–8:57.187
is go to plugins
8:57.187–9:00.533
and start installing some of the ones that you see on my computer right now.
9:00.533–9:02.666
So the first one is computer use.
9:02.666–9:04.325
If you don't already have this installed,
9:04.325–9:05.700
you can install it and activate it.
9:05.700–9:07.466
It may ask for some permissions here.
9:07.466–9:09.933
And this is going to allow you to control your computer.
9:09.933–9:12.374
So you can tell it to open up an application
9:12.374–9:13.490
go to your browser,
9:13.490–9:14.500
access Spotify.
9:14.500–9:16.233
We're going to look at that in one second.
9:16.233–9:18.333
Next plug in we're going to want is Chrome.
9:18.333–9:20.466
So we're going to want to install this Chrome plug in here.
9:20.466–9:23.333
And then open up this Chrome extension okay.
9:23.333–9:24.600
This Codex Chrome extension.
9:24.600–9:26.600
You can see I already have mine installed here.
9:26.600–9:27.639
And if I go to the view
9:27.639–9:28.861
you can see we have Codex
9:28.861–9:29.900
and it's connected.
9:29.900–9:32.533
And this will allow Codex to control your browser.
9:32.533–9:33.633
So it can open up a tab.
9:33.633–9:34.921
It can search for something.
9:34.921–9:36.300
It can debug your application.
9:36.300–9:37.866
Make sure that you get that set up again.
9:37.866–9:39.437
If you just press this open button
9:39.437–9:41.433
you can install the extension and link it.
9:41.433–9:44.300
Another extension that I highly recommend is GitHub.
9:44.300–9:46.451
If you're unfamiliar with git and GitHub,
9:46.451–9:49.433
this is essentially a version control software for code.
9:49.433–9:51.857
This means that you can save your changes,
9:51.857–9:53.900
that you can recover them later on.
9:53.900–9:55.147
You can store them in the clouds,
9:55.147–9:56.671
you can use them from a different device
9:56.671–9:58.400
and you can share them with your teammates.
9:58.400–10:02.033
This is a standard anytime you're building even a medium sized project.
10:02.033–10:03.541
Really any type of coding project,
10:03.541–10:04.633
you should be using this.
10:04.633–10:06.866
So create a free GitHub account.
10:06.866–10:07.400
Very easy.
10:07.400–10:08.747
You can just go to github.com
10:08.747–10:11.833
and then you can connect your GitHub account here inside of Codex.
10:11.833–10:14.376
So it can automatically make what's called a repository,
10:14.376–10:16.337
which is just storing your code effectively
10:16.337–10:17.502
and upload it to the clouds
10:17.502–10:18.933
that you're not going to lose it.
10:18.933–10:20.728
You can access it from other devices
10:20.728–10:23.333
and you can revert back in case Codex makes a change.
10:23.333–10:25.800
It breaks whatever the version of your project is.
10:25.800–10:28.136
I'm not going to be teaching git in GitHub too much,
10:28.136–10:30.527
but I do highly recommend that you set up that plugin
10:30.527–10:32.474
and you can see we have a few other ones here
10:32.474–10:35.533
like Google Drive, presentations, spreadsheets, slack, Gmail.
10:35.533–10:37.051
You can add as many of these as you want,
10:37.051–10:38.900
but I'm going to stick with these for right now.
10:38.900–10:41.578
So now that we have the computer plugin installed,
10:41.578–10:43.300
I want to show you how to use this.
10:43.300–10:45.108
So if I go and I use this at symbol,
10:45.108–10:48.791
you can see that I can actually reference different applications
10:48.791–10:50.700
and specifically this computer.
10:50.700–10:51.066
Right.
10:51.066–10:54.666
So from computer what I can do is ask it to do something.
10:54.666–10:56.900
So let's start by doing something simple.
10:56.900–10:58.048
Open up notepad,
10:58.048–11:01.411
close any of the existing windows that are there,
11:01.411–11:03.298
and then write a simple note
11:03.298–11:05.266
and describe your ideal day.
11:05.266–11:06.323
I know you're a computer,
11:06.323–11:07.933
but just come up with something, okay?
11:07.933–11:09.833
I'm just giving it kind of random prompt.
11:09.833–11:12.412
By the way, if you're wondering what I'm using to prompt here,
11:12.412–11:14.400
I always use this tool called Whisper Flow.
11:14.400–11:17.200
Very good for voice dictation, especially in AI tools.
11:17.200–11:18.585
I'll leave a link to it so you can check it out.
11:18.585–11:19.133
In the description.
11:19.133–11:21.933
You can see that I use it a ton based on my usage.
11:21.933–11:23.733
Very very good and free to try out.
11:23.733–11:25.187
Okay, so let's run this
11:25.187–11:27.100
and let's see what we get here.
11:27.100–11:29.233
And you can see that it's going to use the computer plugin.
11:29.233–11:31.233
And it should control my computer.
11:31.233–11:34.310
And keep in mind that while it's controlling my computer,
11:34.310–11:36.233
I can still use the computer myself.
11:36.233–11:38.027
So I can navigate into an application.
11:38.027–11:39.066
I can close something.
11:39.066–11:41.764
I don't need to have it kind of freely using the mouse,
11:41.764–11:44.033
because it will actually use its own cursor.
11:44.033–11:44.876
Okay, apologies,
11:44.876–11:47.685
because it had a note there that I didn't want you guys to see,
11:47.685–11:49.033
so I had to kind of rerun this.
11:49.033–11:52.172
But you can see that it actually just opened up my computer here,
11:52.172–11:52.942
open up notepad
11:52.942–11:54.633
and wrote this note inside for me.
11:54.633–11:54.833
Okay.
11:54.833–11:56.303
So now if I want to say something,
11:56.303–11:57.500
can you continue this node
11:57.500–11:59.514
and make it like double or triple the length?
11:59.514–12:00.600
Don't worry if it's unsaved.
12:00.600–12:01.833
Just keep writing okay.
12:01.833–12:02.700
And let's hit enter.
12:02.700–12:06.333
And again you'll see that we kind of get that blue hue around our computer.
12:06.333–12:09.361
And it's able to take over and do anything that we want,
12:09.361–12:10.842
which can be super useful,
12:10.842–12:12.457
especially for automating,
12:12.457–12:14.206
kind of like testing a website,
12:14.206–12:15.418
going through a form,
12:15.418–12:17.100
running a task repetitively.
12:17.100–12:17.866
You get the idea.
12:17.866–12:18.942
So let's see how it works.
12:18.942–12:20.433
And you can see that just opened it.
12:20.433–12:22.233
And then did it extend the note?
12:22.233–12:22.856
I guess not,
12:22.856–12:23.915
says thinking okay,
12:23.915–12:26.200
maybe it will take over again in a second.
12:26.200–12:28.540
But when it does that you also see it's kind of cursor appearing,
12:28.540–12:29.633
which I think is pretty cool.
12:29.633–12:29.849
Okay,
12:29.849–12:31.833
so for some reason it didn't keep controlling the note.
12:31.833–12:33.266
But let's just do another example here.
12:33.266–12:34.808
I'm going to say computer,
12:34.808–12:35.789
open up Spotify,
12:35.789–12:37.681
find Drake's most popular song,
12:37.681–12:40.200
and then tell me what it is and play it okay.
12:40.200–12:42.733
And let's just do this as an example so we can see okay.
12:42.733–12:45.500
So it actually found that Spotify wasn't installed on my computer.
12:45.500–12:48.266
And it's going to now do this from Chrome which is what I was trying to show.
12:48.266–12:51.433
So I'm going to allow this to access my Chrome browser okay.
12:51.433–12:52.443
So we can see it opened this,
12:52.443–12:53.848
it actually started playing the song,
12:53.848–12:54.374
I just paused,
12:54.374–12:56.833
I don't want to get the copyright strike and it found the song for me.
12:56.833–12:59.500
And then if I go here it says that this is the most popular one.
12:59.500–12:59.696
Okay,
12:59.696–13:00.597
I don't know if that's true,
13:00.597–13:01.733
but at least that's what it gave us.
13:01.733–13:03.473
So the point is it can control Chrome,
13:03.473–13:04.933
it can control its own devices.
13:04.933–13:05.700
So keep that in mind.
13:05.700–13:06.666
That's super useful.
13:06.666–13:09.833
But now let's move to some more coding related features okay.
13:09.833–13:11.800
So if we're done with the current chat here,
13:11.800–13:14.533
what we can do is just press new chat and open up a new one here.
13:14.533–13:18.066
And what I'm going to do now is I'm actually going to create a new project.
13:18.066–13:18.267
Now,
13:18.267–13:19.323
whenever you're coding,
13:19.323–13:21.033
I recommend that you make a new projects.
13:21.033–13:24.251
You can organize all of your chats for that specific project,
13:24.251–13:26.400
and you can go back and find them easily.
13:26.400–13:27.671
It's not required to do this,
13:27.671–13:29.100
but it's kind of a good practice.
13:29.100–13:30.933
So you can see that I can make new project.
13:30.933–13:32.700
I can use an existing folder.
13:32.700–13:35.466
So maybe I have an existing code repo that I want to use.
13:35.466–13:36.266
I can open that up.
13:36.266–13:38.133
And that's kind of what a project is.
13:38.133–13:40.233
It's really just a folder on your computer.
13:40.233–13:41.866
Or I can start one from scratch.
13:41.866–13:43.432
So I'm going to start one from scratch,
13:43.432–13:45.633
and I'm just going to call this I don't know chess game.
13:45.633–13:50.033
And what we'll do is we'll try to make like an interactive chess game here using Codex.
13:50.033–13:52.066
So you can see that it's made a new project for me.
13:52.066–13:53.333
It's called Chess Game.
13:53.333–13:56.233
And notice that we have a few options here for the project.
13:56.233–13:59.400
Now I have the ability to connect to Codex Web.
13:59.400–14:04.533
This would essentially send all of the kind of info to the cloud, which is a little bit more complicated.
14:04.533–14:09.033
We can work locally, which just means we're working on our own computer, which is what we're going to do here.
14:09.033–14:11.133
Or we can create something called a work tree.
14:11.133–14:13.168
Now we're going to look at work trees later,
14:13.168–14:15.712
but essentially this is a clone of this kind of project
14:15.712–14:18.200
so that we can work on multiple things at the same time
14:18.200–14:19.500
without having a conflict.
14:19.500–14:22.733
So for now, we're going to leave it in the current location that it's in.
14:22.733–14:25.466
You'll notice that it automatically is connecting to get.
14:25.466–14:27.466
So it's created a branch called main.
14:27.466–14:30.466
And you can make different branches if you're familiar with git.
14:30.466–14:31.800
But we're not going to look at that for right now.
14:31.800–14:33.782
I'm also just going to move this to full access mode,
14:33.782–14:35.533
just so I don't need to keep approving things.
14:35.533–14:38.200
And you can see it's pretty straightforward what you do here with those.
14:38.200–14:40.000
So now let me give this a simple prompt.
14:40.000–14:42.000
I want to create a simple chess game.
14:42.000–14:43.309
I want to have a back end
14:43.309–14:44.825
which is using WebSockets
14:44.825–14:46.824
and kind of keeping track of scores
14:46.824–14:47.513
and ratings
14:47.513–14:48.822
and stuff in a database
14:48.822–14:50.200
in people's usernames.
14:50.200–14:51.700
And then I want to have a front end
14:51.700–14:53.200
where we can actually play this.
14:53.200–14:54.536
I want it to be multiplayer,
14:54.536–14:57.266
so I want two people to be able to play against each other.
14:57.300–14:58.560
We can keep it simple,
14:58.560–14:59.680
have an MVP to start
14:59.680–15:01.533
and then build everything out.
15:01.533–15:01.666
Okay.
15:01.666–15:02.752
So I'm just giving it kind of,
15:02.752–15:03.114
you know,
15:03.114–15:03.747
prompt on what I,
15:03.747–15:04.833
what it is that I want it to do.
15:04.833–15:06.433
I want it to build something out here.
15:06.433–15:08.266
And we're going to go ahead and press enter.
15:08.266–15:10.066
And I just want to show you how this works okay.
15:10.066–15:12.200
So we can see here the Codex is now working.
15:12.200–15:13.466
It's making multiple files.
15:13.466–15:14.733
We can see what it's doing.
15:14.733–15:17.633
And I can kind of go into this and inspect the different commands.
15:17.633–15:19.400
But I want to see what's actually running.
15:19.400–15:21.266
If I expand this right toggle.
15:21.266–15:23.666
Now you'll notice that it's giving me a preview tab.
15:23.666–15:24.765
We don't see anything right now
15:24.765–15:26.666
because we're just waiting for it to finish the files.
15:26.666–15:29.346
But we will be able to see all of the different files,
15:29.346–15:32.400
code changes and all this stuff going on here in one second.
15:32.400–15:34.956
And then if I go here to this kind of little,
15:34.956–15:36.710
I don't know, to do list icon,
15:36.710–15:39.266
you can see that we have a bunch of options.
15:39.266–15:40.866
So I can change where I want it to work.
15:40.866–15:42.048
I can change the branch
15:42.048–15:44.133
I can commit or push directly to GitHub.
15:44.133–15:45.533
Now it's not giving us any results
15:45.533–15:47.433
because it's not available online right now.
15:47.433–15:49.033
It's just locally on our computer.
15:49.033–15:49.833
But you get the idea.
15:49.833–15:52.033
And then we can view the changes which is making right now.
15:52.033–15:53.633
So we're just waiting for those to finish.
15:53.633–15:55.422
So there's a lot that will start happening
15:55.422–15:56.700
when you actually write code.
15:56.700–15:58.729
And then I can also toggle open the terminal.
15:58.729–15:59.000
Right.
15:59.000–16:01.233
So I can run commands or see what's happening there.
16:01.233–16:02.633
Let's go back into this view.
16:02.633–16:06.200
And then I can open this in any of the tools that are shown here.
16:06.200–16:09.555
So if I wanted to open this in cursor and view all of the code in IDE,
16:09.555–16:11.233
I can press that button and do so.
16:11.233–16:12.200
So let's wait a second for it.
16:12.200–16:13.469
To finish writing this code,
16:13.469–16:17.486
you can see that it's starting to show me some of the files that we have inside of this folder,
16:17.486–16:19.633
and then we'll review it and see what we get okay.
16:19.633–16:21.533
So just finished the first pass here.
16:21.533–16:24.800
It says that it built the multiplayer chess MVP and started locally.
16:24.800–16:26.501
And if I press on any of the links here,
16:26.501–16:29.300
you'll notice that they'll actually open directly in Codex.
16:29.300–16:31.266
So you can see that it's opened up right here.
16:31.266–16:32.400
We kind of have this view.
16:32.400–16:33.421
I can change the view,
16:33.421–16:35.066
make it large or small or whatever.
16:35.066–16:38.200
So let's give a username maybe like Tim okay.
16:38.200–16:39.400
And join the game.
16:39.400–16:41.733
And then let's try to find a game okay.
16:41.733–16:43.800
And then I'm just going to open up another browser here.
16:43.800–16:46.900
So you can see I can press this plus button go browser.
16:46.900–16:48.833
We can actually manually type.
16:48.833–16:51.200
So localhost 3000 okay.
16:51.200–16:55.866
And let's see maybe we can change this as I don't know Joe or something.
16:55.866–16:56.251
Okay.
16:56.251–16:58.100
Join in and find a game.
16:58.100–17:01.033
And you can see that we find a game and then we can start playing.
17:01.033–17:04.733
So I don't know let me try to move here and see if it moves on this side.
17:04.733–17:05.800
And it looks like it's working.
17:05.800–17:07.327
So let's make a move like that
17:07.327–17:09.427
I'm not going to play the full thing out,
17:09.427–17:10.700
but you guys get the idea
17:10.700–17:12.100
that it is indeed working.
17:12.100–17:13.579
We have a track of all the moves.
17:13.579–17:14.700
We have some leaderboard.
17:14.700–17:16.391
And then maybe if I resign,
17:16.391–17:18.544
you can see now the ELO has updated
17:18.544–17:21.312
and I want so says white wins by resignation
17:21.312–17:24.266
I mean pretty cool that that worked that fast.
17:24.266–17:27.266
Now within this browser view there's a few buttons you should be aware of.
17:27.266–17:29.028
So if you have a look at this right hand side,
17:29.028–17:31.133
you can see that you can actually take a screenshot.
17:31.133–17:31.707
If you do that,
17:31.707–17:33.000
it will save it to the clipboard.
17:33.000–17:34.839
And then you can copy that screenshot
17:34.839–17:35.728
or paste it sorry,
17:35.728–17:39.524
into the chat in case you want to capture what's going on inside of this window
17:39.524–17:41.066
rather than doing it manually.
17:41.066–17:44.900
And of course, ChatGPT and GPT here can do image generation.
17:44.900–17:46.000
It can view images.
17:46.000–17:47.933
So that's I mean it should be straightforward.
17:47.933–17:49.066
You also can annotate.
17:49.066–17:53.200
So if you annotate this will allow you to select different HTML elements.
17:53.200–17:55.207
So for example maybe I'm going to select this
17:55.207–17:57.866
and I can say something like I don't really like this title.
17:57.866–17:59.953
I think we can make it look a lot better
17:59.953–18:01.433
and put a chess logo okay.
18:01.433–18:02.657
And then we can go here
18:02.657–18:06.533
and we can actually just update any of the values directly on screen.
18:06.533–18:09.183
I'm not going to do that because I would prefer just to prompt it,
18:09.183–18:10.466
but I'm just going to run that.
18:10.466–18:12.579
You can see we now have an annotation in chat
18:12.579–18:14.633
and I can start adding other annotations.
18:14.633–18:18.351
So maybe I'm going to say can we change the color of the board
18:18.351–18:20.400
or have like a white or dark mode,
18:20.400–18:22.800
or maybe change the square colors?
18:22.800–18:25.033
I'm just giving random prompts going to show you this works.
18:25.033–18:26.712
And you can see we have annotations
18:26.712–18:28.333
and I can say like go or something.
18:28.333–18:31.789
And now it's going to have the annotations that we made in the browser,
18:31.789–18:35.100
and it's going to make those changes which are a lot more targeted.
18:35.100–18:35.295
Okay.
18:35.295–18:37.833
So I just refresh because I want to see what this was doing live.
18:37.833–18:39.902
And you can see if I go here now and I refresh,
18:39.902–18:42.233
we've kind of changed what the board looks like.
18:42.233–18:43.498
Obviously we've disconnected.
18:43.498–18:44.633
Now we're waiting to join.
18:44.633–18:46.355
We can see we have the kind of chess icon
18:46.355–18:49.133
and it's essentially followed the annotations we asked for.
18:49.133–18:49.333
Okay.
18:49.333–18:54.733
So hopefully that gave you a bit of information on how the general kind of coding works inside of Codex.
18:54.733–18:56.033
It's very good for me.
18:56.033–18:57.566
I really like this user interface,
18:57.566–18:59.100
and I like using this application.
18:59.100–19:01.948
And I mean, you can see that it gives us pretty good results,
19:01.948–19:03.866
even though I didn't do anything crazy.
19:03.866–19:06.066
So now let's move to a few more advanced features.
19:06.066–19:08.633
Let's start by having a look at some basic commands.
19:08.633–19:11.633
So commands are just anything that start with a slash.
19:11.633–19:16.600
And there's a ton of built in commands inside of cloud code or not cloud code inside of Codex.
19:16.600–19:18.188
I'm not going to go over all of them,
19:18.188–19:20.466
but I'll show you a few that you should be aware of.
19:20.466–19:24.633
So first, if we do slash, we're going to want to look at status.
19:24.633–19:26.866
Now status will just show you your usage limit.
19:26.866–19:29.700
So you can see that for a five hour limit I'm at 98%.
19:29.700–19:32.433
And for my seven day limit I'm at 99%.
19:32.433–19:34.400
It also gives me my context limit.
19:34.400–19:39.466
Now the context can be viewed using this little kind of circular icon down here.
19:39.466–19:41.386
It won't give you a detailed breakdown,
19:41.386–19:43.597
but you'll be able to see how much you've used,
19:43.597–19:44.411
how much is left,
19:44.411–19:45.900
and how many tokens are there.
19:45.900–19:48.059
Now, depending on the models you're using,
19:48.059–19:49.498
the context size can change,
19:49.498–19:51.957
but this is something that's useful to be aware of
19:51.957–19:53.876
because if the context gets too large,
19:53.876–19:55.375
which means you have too many,
19:55.375–19:57.054
you know, too much conversation,
19:57.054–19:57.534
history,
19:57.534–19:58.434
tool calls, etc.,
19:58.434–20:00.100
you will need to compact that.
20:00.100–20:02.266
Now there's actually a command that can do this for you.
20:02.266–20:04.066
It's called slash compact.
20:04.066–20:09.800
Now what slash compact will do is it will take everything that you have in your current conversation history.
20:09.800–20:11.019
So all of the tool calls,
20:11.019–20:11.811
all of the code,
20:11.811–20:15.588
anything that it's understood in this whole conversation that we've had,
20:15.588–20:17.477
and it will generate a summary of that
20:17.477–20:21.133
and then add that to kind of a new, fresh conversation that you'll start.
20:21.133–20:23.134
So you'll notice that after I did that,
20:23.134–20:25.699
we now if we look at the what is it context use here,
20:25.699–20:27.200
we've only used for percent.
20:27.200–20:29.100
So it's taken 22% there.
20:29.100–20:31.633
It's condensed it down given us a summary.
20:31.633–20:33.000
And now we can continue.
20:33.000–20:35.499
Now it's not a great idea to compact super early
20:35.499–20:37.933
because you want to use up the context window.
20:37.933–20:40.297
But as soon as you start getting to 70%,
20:40.297–20:40.592
80%,
20:40.592–20:41.405
90% context,
20:41.405–20:46.133
you typically want to compacted because you're going to get better results.
20:46.133–20:48.856
Because as the model fills up with context,
20:48.856–20:50.100
it performs worse.
20:50.100–20:51.233
This is pretty well known.
20:51.233–20:52.900
I'm not going to go into all of the details.
20:52.900–20:54.700
Just be aware that command exists.
20:54.700–21:00.300
You can use it in Codex will automatically compact for you if you're going to go past your context.
21:00.300–21:02.707
So you may want to do it at a time that you decide,
21:02.707–21:05.333
rather than waiting for it to do it automatically.
21:05.333–21:05.548
Now,
21:05.548–21:06.837
another thing that we can do,
21:06.837–21:08.073
which is sometimes useful,
21:08.073–21:08.933
is we can fork this.
21:08.933–21:11.086
Now you can see that if we type slash fork,
21:11.086–21:14.316
it will allow us to fork this chat into a local or new work tree,
21:14.316–21:16.533
which we're going to look at effectively.
21:16.533–21:21.449
What this will do is take everything that we've done and just create a complete copy of it,
21:21.449–21:26.033
so we can work in multiple agents at the same time without them having any conflict.
21:26.033–21:29.654
So they both will kind of work in their own copy of the code base,
21:29.654–21:33.100
and then they can go and kind of joy in everything together.
21:33.100–21:34.700
Fix any of the merge conflicts.
21:34.700–21:36.399
When we get to the final version again,
21:36.399–21:37.726
we'll look at fork in a minute,
21:37.726–21:39.266
but that is a command to be aware of.
21:39.266–21:40.803
You have the fast mode feedback.
21:40.803–21:42.100
We're not going to do that.
21:42.100–21:45.866
A NIT goal and some other kind of modes that we'll look at here in a second.
21:45.866–21:46.933
Few last things to be aware of.
21:46.933–21:48.100
You can also pin chats.
21:48.100–21:50.433
So if we want this chat to be available we can pin it.
21:50.433–21:53.200
And then we can create new chats inside of the same project.
21:53.200–21:54.800
So you can see it's in chess game here.
21:54.800–22:00.033
And we can decide how we want to work and just have another agent either running at the same time or in a new chat.
22:00.033–22:05.054
If we want to ask for something different and kind of forget the previous conversation history we had here.
22:05.054–22:05.755
Anyways,
22:05.755–22:07.333
let's go to a new chat.
22:07.333–22:09.133
Now we're inside of chess game,
22:09.133–22:11.902
and let's use a new mode that we haven't seen yet,
22:11.902–22:12.733
which is plan.
22:12.733–22:14.389
So if we use slash plan,
22:14.389–22:16.133
we can enable plan mode.
22:16.133–22:17.733
You'll see that it's here and now.
22:17.733–22:18.563
With plan mode,
22:18.563–22:22.200
what we can do is we can ask this something a little bit more detailed.
22:22.200–22:23.800
We can describe what we want.
22:23.800–22:30.233
And Codex will prompt us with different questions and kind of clarifying details before it goes and executes the plan.
22:30.266–22:31.362
Pretty straightforward,
22:31.362–22:34.400
but typically you want to make a plan before you do something too complex.
22:34.400–22:35.771
So really for our chess game,
22:35.771–22:37.486
we should have started in plan mode,
22:37.486–22:38.229
built the plan,
22:38.229–22:39.200
and then execute it.
22:39.200–22:42.100
I was just saving it for later because it's a little bit more complex.
22:42.100–22:44.933
So now maybe I want to expand this chess game.
22:44.933–22:45.936
I want to have puzzles.
22:45.936–22:47.200
I want to have a leaderboard.
22:47.200–22:48.643
I want to have maybe a big UI,
22:48.643–22:50.400
I want to have whatever accounts.
22:50.400–22:52.400
So let's start generating a plan for that.
22:52.400–22:54.700
I want to expand our chess game.
22:54.700–22:58.643
I want to have a better landing page so that a user can see their stats,
22:58.643–23:03.900
and they have the ability to either play a game or play a puzzle or go to like a practice board.
23:03.900–23:06.132
I want to generate a few different game modes,
23:06.132–23:09.866
and I want to really polish this up and make it kind of like a Chess.com clone.
23:09.866–23:11.733
Let's start with just the MVP features.
23:11.733–23:13.133
Can you generate a plan for this?
23:13.133–23:15.734
Ask me any questions you need to okay,
23:15.734–23:18.000
so let's go here and press enter.
23:18.000–23:21.066
And because it's in plan mode it's going to map everything out.
23:21.066–23:26.133
And it should start asking us some questions and prompting us so that it can generate that for us.
23:26.133–23:26.400
Okay.
23:26.400–23:29.433
So we can see that it's now prompting us with a few questions in the bottom here.
23:29.433–23:31.356
So it says for the first MVP pass,
23:31.356–23:34.233
which mode set should the landing page launch?
23:34.233–23:35.559
We can have add bot game,
23:35.559–23:38.343
add time modes or core three ship the landing page,
23:38.343–23:38.939
live game,
23:38.939–23:40.066
daily star puzzles.
23:40.066–23:41.033
Let's go with that.
23:41.033–23:43.400
How should the user stats work for an MVP?
23:43.400–23:44.400
Let's just go.
23:44.400–23:45.196
Username.
23:45.196–23:46.433
Profiles okay.
23:46.433–23:47.360
Username.
23:47.360–23:47.978
Login.
23:47.978–23:49.318
Expand stats.
23:49.318–23:49.866
Okay.
23:49.866–23:52.466
How deep should the puzzle mode be an MVP?
23:52.466–23:54.633
Let's just do.
23:54.633–23:54.900
Yes.
23:54.900–23:58.533
Small bundled puzzled library that looks good and that we continue.
23:58.533–23:59.733
Now while it's doing this,
23:59.733–24:01.969
also mention that if you open up the sidebar here,
24:01.969–24:03.333
you'll see a few more options.
24:03.333–24:05.845
Because we're in this kind of coding environment,
24:05.845–24:07.400
we can now view all of the files.
24:07.400–24:08.370
If we want to look at this,
24:08.370–24:09.433
we see we have the database.
24:09.433–24:11.100
We can open up the server right.
24:11.100–24:12.430
And you can modify the code,
24:12.430–24:15.900
or you can add comments directly inside of here or tag different things.
24:15.900–24:18.300
And now you'll see that it's generating the plan.
24:18.300–24:20.466
I believe the plan will be stored in this repo.
24:20.466–24:22.002
I might just need to refresh,
24:22.002–24:23.666
but we should be able to view it.
24:23.666–24:25.514
So if I want to look at the plan here,
24:25.514–24:26.917
you can see we can open it up
24:26.917–24:29.500
and it gives us everything that needs to be done.
24:29.500–24:29.900
Okay.
24:29.900–24:31.929
So I could just implement this plan right
24:31.929–24:33.600
and just start running with that.
24:33.600–24:35.186
But what I want to show you now
24:35.186–24:37.235
is another mode that's super useful,
24:37.235–24:40.540
that is going to get things done a lot more efficiently for us
24:40.540–24:42.919
without us having to keep approving things
24:42.919–24:45.100
or prompting the model multiple times.
24:45.100–24:47.033
And that is called goal.
24:47.033–24:50.733
So there is this slash command called slash goal.
24:50.733–24:52.053
Now if we use this
24:52.053–24:54.633
let me just actually type it out.
24:54.633–24:57.712
What will happen is that codex will run
24:57.712–24:59.733
until a goal is achieved.
24:59.733–25:01.381
Now this is kind of that agent loops
25:01.381–25:03.199
that you may have heard about recently
25:03.199–25:04.800
that everyone's talking about.
25:04.800–25:06.033
They have that built in now.
25:06.033–25:07.843
So what we can do is we can say,
25:07.843–25:09.200
hey, here's the goal.
25:09.200–25:11.403
And we just set a high level objective,
25:11.403–25:12.849
and Codex will keep going
25:12.849–25:14.433
until the goal is achieved.
25:14.433–25:15.138
So it will plan,
25:15.138–25:15.843
it will execute
25:15.843–25:18.066
and then it will review if it's achieved the goal.
25:18.066–25:18.974
And if it hasn't,
25:18.974–25:20.400
it will just keep running.
25:20.400–25:22.232
So it's not just going to do one pass
25:22.232–25:24.000
or implement one set of features.
25:24.000–25:26.300
It will go until the goal is achieved.
25:26.300–25:28.283
Now, in order to use this effectively,
25:28.283–25:29.584
you need to set a good goal
25:29.584–25:32.033
and the conditions for the goal to be achieved.
25:32.033–25:32.893
Now, in our case,
25:32.893–25:34.122
we already have the plan
25:34.122–25:35.658
so we can effectively just say
25:35.658–25:38.300
keep running until the entire plan is implemented.
25:38.300–25:40.333
It will then run check if the plan is done.
25:40.333–25:40.936
If it's not,
25:40.936–25:41.900
it will keep going.
25:41.900–25:42.425
If it is,
25:42.425–25:43.400
it will finish.
25:43.400–25:46.327
So this will allow it to run for a long period of time,
25:46.327–25:48.233
which also will use a lot of usage.
25:48.233–25:49.733
So keep that in mind.
25:49.733–25:51.627
So for the goal I'm going to say okay,
25:51.627–25:53.899
keep running and implement the entire plan
25:53.899–25:55.666
until the plan is fully finished.
25:55.666–25:56.970
Everything is tested,
25:56.970–25:58.274
everything is working
25:58.274–26:00.633
and we are confident to deploy this.
26:00.633–26:02.149
Again, not the best prompt in the world,
26:02.149–26:03.666
but I'm just showing you the usage here.
26:03.666–26:05.862
And now that the plan is enabled,
26:05.862–26:07.066
we have goal set.
26:07.066–26:07.967
I can press enter
26:07.967–26:10.604
and you can see that it's going to pursue this goal
26:10.604–26:11.633
and start running.
26:11.633–26:13.466
And we can view this is the goal.
26:13.466–26:15.466
And it's going through all of the different steps.
26:15.466–26:17.550
And it will just be this infinite loop
26:17.550–26:19.666
which can take a very long time to run.
26:19.666–26:19.933
All right.
26:19.933–26:21.302
So the goal has just finished
26:21.302–26:22.900
it built this application for us.
26:22.900–26:24.437
I don't know if it's fully working,
26:24.437–26:25.497
but you guys get the idea
26:25.497–26:26.200
and it's done.
26:26.200–26:28.339
So now let's have a look at some more features
26:28.339–26:29.933
and start going through it okay.
26:29.933–26:31.000
So first things first.
26:31.000–26:32.560
If you look at any of these chats
26:32.560–26:34.600
you have the ability to right click them.
26:34.600–26:35.810
You can pin them
26:35.810–26:36.833
rename them.
26:36.833–26:39.563
You can also fork them into a local version
26:39.563–26:40.733
or a new work tray.
26:40.733–26:43.733
Now I want to really briefly discuss what a work tree is,
26:43.733–26:45.885
because it's a little bit complicated,
26:45.885–26:48.266
and we'll save the full usage for a part two.
26:48.266–26:51.100
So let me know if you guys want to see that in the comments down below.
26:51.100–26:53.866
Now, if I try to open a new project here, right.
26:53.866–26:54.700
So I've gone sorry.
26:54.700–26:55.266
New chat.
26:55.266–26:56.501
Okay, so I want new chat.
26:56.501–26:58.033
And then I selected Chess Game.
26:58.033–27:00.839
And then what I did is rather than selecting work locally,
27:00.839–27:02.066
I selected new work tree.
27:02.066–27:05.300
I have the ability to create a local environment.
27:05.300–27:10.487
Now the reason this is important is that if you want to run parallel agents at the same time,
27:10.487–27:13.806
they should be working in their own copy of the repository
27:13.806–27:15.533
or the project that you have.
27:15.533–27:17.076
If they work on the same files,
27:17.076–27:18.250
there can be conflicts
27:18.250–27:21.583
because they're touching the same information at the same time,
27:21.583–27:22.666
and that's not good.
27:22.666–27:25.466
So the solution to this is a work tree.
27:25.466–27:27.466
This is provided by git.
27:27.466–27:29.682
Again it's a little bit complicated to setup
27:29.682–27:31.000
and a bit confusing to use.
27:31.000–27:32.933
So I'm not going to go through all of the details.
27:32.933–27:36.396
But if you do want to run parallel agents at the same time,
27:36.396–27:38.312
you have multiple tasks going,
27:38.312–27:39.933
this is what you would use.
27:39.933–27:42.024
You have to configure the environment first,
27:42.024–27:43.729
which you can ask Codex to help you do,
27:43.729–27:47.800
and then you can change the branches and stuff in order to work on the different features.
27:47.800–27:49.743
And now you'll have different agents
27:49.743–27:52.125
because you can run multiple at the same time,
27:52.125–27:54.633
working in these kind of copies of the same repo.
27:54.633–27:56.929
Again, this is a more advanced developer feature,
27:56.929–27:58.800
so I'm not going to dive into it too much.
27:58.800–28:01.133
Now, another feature that's somewhat related to this.
28:01.133–28:02.733
Let's go back to local copy.
28:02.733–28:05.700
Here is this tool called Slash Review.
28:05.700–28:07.109
Now this is a code review
28:07.109–28:12.183
that can automatically compare any changes that have been made in the current session
28:12.183–28:13.800
against what's in GitHub.
28:13.800–28:14.266
Okay.
28:14.266–28:16.500
So if I go to maybe this right now
28:16.500–28:18.047
and I go slash review,
28:18.047–28:22.000
you can see that I can review this against a base branch.
28:22.000–28:24.459
So a branch in git if you're familiar with that
28:24.459–28:26.400
or review any uncommitted changes.
28:26.400–28:27.922
So if I go slash review right
28:27.922–28:29.575
and then uncommitted changes
28:29.575–28:33.148
it's going to start looking at all of the changes that it made here
28:33.148–28:34.868
and automatically review them
28:34.868–28:37.911
to make sure that they're good before we push them to get
28:37.911–28:39.300
or before we commit them.
28:39.300–28:41.517
This is a pretty useful feature that Codex has,
28:41.517–28:43.507
and this is something you should always do
28:43.507–28:45.553
after you've done a large amount of changes
28:45.553–28:47.600
before you push them to remote repository.
28:47.600–28:48.682
And if you don't know what that means,
28:48.682–28:49.066
don't worry.
28:49.066–28:50.310
But if you're a developer,
28:50.310–28:53.025
you'll understand the value of having a built in shortcut
28:53.025–28:55.433
that will do all of those passes and checks for you.
28:55.433–28:57.311
Okay, so you can see that it's done the review
28:57.311–28:58.833
and it's given us some comments now.
28:58.833–28:59.601
And it said, hey,
28:59.601–29:02.266
these are errors that I found after doing the code review.
29:02.266–29:02.545
Right.
29:02.545–29:04.266
So let me go ahead and fix them okay.
29:04.266–29:06.172
So let's move to the next feature
29:06.172–29:07.900
which is memory and context.
29:07.900–29:09.040
Now this is less maybe,
29:09.040–29:10.120
I don't know demo wise
29:10.120–29:11.980
and more me explaining how this works
29:11.980–29:13.900
because I want you to understand this.
29:13.900–29:16.833
So if I make a new chat right here okay.
29:16.833–29:17.757
And we go into this
29:17.757–29:19.050
and I'm working locally,
29:19.050–29:20.600
I want you to see something.
29:20.600–29:22.645
What did I do in my last session
29:22.645–29:25.200
when I was working on the chess game?
29:25.200–29:28.140
Now, the reason why I'm going to run this prompt
29:28.140–29:29.648
and show you the result,
29:29.648–29:31.533
is that you need to understand
29:31.533–29:34.548
that by default, Codex doesn't remember things
29:34.548–29:36.433
that you worked on in the past.
29:36.433–29:38.104
Anytime you create a new chat,
29:38.104–29:42.183
what it's doing is reviewing anything that you have in your current repo,
29:42.183–29:44.256
kind of trying to load in information
29:44.256–29:46.328
and find any context that's relevant
29:46.328–29:47.866
and then give you an answer.
29:47.866–29:50.933
But by default it doesn't remember everything that you did.
29:50.933–29:53.500
So it won't have the full conversation history.
29:53.500–29:55.902
It won't know maybe preferences that you told it,
29:55.902–29:57.074
and it can forget things
29:57.074–29:59.100
because it doesn't remember by default.
29:59.100–30:01.942
The only reason this actually just gave me a response
30:01.942–30:04.397
is because it looked inside of my project here
30:04.397–30:05.366
that I'm inside of
30:05.366–30:07.433
and was able to find that information.
30:07.433–30:08.825
But if I go to a new chat
30:08.825–30:09.366
and I say
30:09.366–30:10.990
and I remove the project,
30:10.990–30:13.400
what did I work on for my chess game?
30:13.400–30:16.031
And I just ask it something really vague like that,
30:16.031–30:17.200
it shouldn't know.
30:17.200–30:18.640
At least I don't think it will know
30:18.640–30:20.833
because it's not going to have any of that context.
30:20.833–30:22.503
The reason why I'm mentioning this
30:22.503–30:23.942
is that you need to understand
30:23.942–30:25.670
that anytime you make a new session,
30:25.670–30:27.800
you're effectively starting from scratch.
30:27.800–30:29.908
And anything that you want this to know,
30:29.908–30:31.633
it has to already exist as a file.
30:31.633–30:33.405
It has to be saved persistently
30:33.405–30:34.700
so Codex can read it in.
30:34.700–30:35.688
And you can see here
30:35.688–30:39.333
that it's not able to really find the information very well for me here.
30:39.333–30:41.466
And it has to actually go and look through
30:41.466–30:44.038
the different conversation history and threads
30:44.038–30:46.233
to find this information so it can find it.
30:46.233–30:47.945
But the only reason it can do that
30:47.945–30:50.418
is because it's searching through the threads
30:50.418–30:51.433
and it's very slow.
30:51.433–30:51.868
And again,
30:51.868–30:53.900
it's not going to remember everything by default.
30:53.900–30:56.138
The reason why I'm mentioning this
30:56.138–30:58.145
is that you can fix this problem
30:58.145–31:01.233
by creating something called an agent dot file.
31:01.233–31:03.429
Now this is something that's common
31:03.429–31:05.259
in all of your code base tools,
31:05.259–31:06.284
CLI based tools,
31:06.284–31:07.455
whatever AI agents
31:07.455–31:10.164
where you can make effectively a memory file
31:10.164–31:12.726
that will always be loaded into the prompt
31:12.726–31:15.800
or into the model before you start working with it.
31:15.800–31:17.678
Now this is a really good file to create,
31:17.678–31:20.125
especially when you're working on larger projects
31:20.125–31:21.206
with multiple people,
31:21.206–31:22.914
because you can store preferences,
31:22.914–31:25.200
different tools or stacks that you want to use.
31:25.200–31:26.494
I wouldn't say credentials,
31:26.494–31:28.165
but you can store just important info
31:28.165–31:31.433
that you don't want to have to keep telling the model over and over again.
31:31.433–31:32.449
So for example,
31:32.449–31:33.466
I can tell this.
31:33.466–31:35.659
I would like you to create an agent file
31:35.659–31:38.263
with all of the conventions for this project,
31:38.263–31:40.936
specifically the tech stack that we're using,
31:40.936–31:41.690
how to run it,
31:41.690–31:43.900
and what we've set up so far.
31:43.900–31:44.400
Okay.
31:44.400–31:45.844
And what this will do now
31:45.844–31:48.833
is create a new file for us called agents.
31:48.833–31:50.000
You'll see it in a second.
31:50.000–31:52.433
It's automatically making it starts with all capitals.
31:52.433–31:55.666
And it's going to fill this file with important info then.
31:55.666–31:57.372
Now we're never going to forget
31:57.372–31:58.816
or Codex will never forget
31:58.816–32:02.097
because this is by default automatically load it into Codex
32:02.097–32:04.066
anytime we make a new conversation.
32:04.066–32:05.765
So let's give this a second to make the file
32:05.765–32:06.833
and see what it looks like.
32:06.833–32:07.984
So let's open this up
32:07.984–32:10.963
and you can see that it gives us project conventions,
32:10.963–32:11.640
direction,
32:11.640–32:12.317
tech stack,
32:12.317–32:13.061
how to run it,
32:13.061–32:13.433
etc..
32:13.433–32:15.798
So now if we make a new conversation,
32:15.798–32:16.114
I go,
32:16.114–32:18.400
what are the project conventions?
32:18.400–32:22.066
It's not going to have to search through a bunch of files to find this.
32:22.066–32:25.547
It can just get it directly from its kind of system info now,
32:25.547–32:28.033
because it will have been loaded in and MD.
32:28.033–32:30.433
So you can see it just immediately gives us the result.
32:30.433–32:31.994
It doesn't need to read anything
32:31.994–32:35.233
because it was already loaded in when we started the conversation.
32:35.233–32:36.626
If we look at the context,
32:36.626–32:39.944
you can see the context is slightly higher usage than normal
32:39.944–32:42.500
because it's started by loading that file.
32:42.500–32:43.800
I hope that that makes sense to you.
32:43.800–32:46.440
I know that's not the best explanation possible,
32:46.440–32:49.081
but anything that you want to be kind of long term,
32:49.081–32:52.043
persistent info that's going to be used all of the time,
32:52.043–32:54.104
you want to put it in this agents MD file
32:54.104–32:56.100
and tell Codex to create that for you.
32:56.100–33:02.500
And you can continually update this to improve the performance of the model you use in a particular project.
33:02.500–33:02.855
Okay,
33:02.855–33:04.558
so that is kind of the agents,
33:04.558–33:06.900
the in memory info that you need to know.
33:06.900–33:09.200
And the last thing we'll look at is scheduled tasks.
33:09.200–33:11.142
Now I'm not going to actually create these,
33:11.142–33:13.137
but I'm just going to mention that they exist
33:13.137–33:15.726
just like cloud code or other tools that you may have used,
33:15.726–33:18.585
you can create scheduled tasks that run automatically for you,
33:18.585–33:19.933
assuming your computer is on.
33:19.933–33:21.402
So you can make a daily brief
33:21.402–33:23.765
where every morning it opens your computer,
33:23.765–33:26.000
searches the news and gives you some info.
33:26.000–33:27.120
You can do a weekly review
33:27.120–33:29.200
where it tells you all the things you worked on.
33:29.200–33:30.413
You can do project monitor
33:30.413–33:31.737
where if something changes,
33:31.737–33:32.233
we do this.
33:32.233–33:33.542
So if I do create via chat,
33:33.542–33:34.228
for example,
33:34.228–33:37.346
I can make it to set up a scheduled task for me automatically,
33:37.346–33:39.466
or I can go to templates and I can pick one.
33:39.466–33:40.562
So maybe like this,
33:40.562–33:41.933
this is what I want to do.
33:41.933–33:45.833
I want to run it in this chat or in a work tree.
33:45.833–33:47.266
I want to in this project.
33:47.266–33:49.300
I want it to repeat at this time.
33:49.300–33:50.800
Then this is the model that I want to use.
33:50.800–33:51.042
Okay.
33:51.042–33:52.400
So again you can make these.
33:52.400–33:53.699
You can have them set to run
33:53.699–33:56.889
and you can set this up to kind of automatically do things for you,
33:56.889–33:59.133
which is useful if you want some automations.
33:59.133–34:00.428
But for me I don't really need any.
34:00.428–34:01.833
So I don't have those setup as of now.
34:01.833–34:03.104
And then of course,
34:03.104–34:05.727
you can search through all of your chats
34:05.727–34:07.475
and a bunch of other stuff,
34:07.475–34:08.667
and we can go crazy
34:08.667–34:10.733
and we can go to add MCP servers.
34:10.733–34:12.333
We can control the browser use.
34:12.333–34:13.630
We can do computer use,
34:13.630–34:14.039
hooks,
34:14.039–34:14.858
connections,
34:14.858–34:15.950
git environments,
34:15.950–34:16.633
work trees.
34:16.633–34:17.770
There is a lot more to go over,
34:17.770–34:19.333
but I'm going to save that for a part two.
34:19.333–34:23.586
If you guys let me know in the comments that you want to see an advanced version of this
34:23.586–34:25.348
that is going to wrap up this video,
34:25.348–34:27.961
that was a pretty comprehensive overview of Codex,
34:27.961–34:29.054
a lot of the features,
34:29.054–34:29.723
how to use it,
34:29.723–34:30.573
some good demos,
34:30.573–34:32.700
setting up a lot of the important plugins.
34:32.700–34:33.685
At this point,
34:33.685–34:34.341
you know,
34:34.341–34:35.966
probably 90% of Codex.
34:35.966–34:37.115
If you want the extra 10%,
34:37.115–34:37.608
let me know
34:37.608–34:39.633
and I will happily make an advanced version.
34:39.633–34:40.874
For those of you that are devs
34:40.874–34:43.666
and are kind of past some of the beginner stuff that I showed here.
34:43.666–34:44.042
Anyway,
34:44.042–34:44.900
I hope you enjoyed.
34:44.900–34:46.766
If you did leave a like subscribe
34:46.766–34:48.633
and I will see you in the next one.
0:00.266–0:02.266
This video will teach you Codex.
本影片將教你使用 Codex。
0:02.266–0:04.384
I'll go through all of the important features,
我會介紹所有重要功能,示範如何設定與安裝,並假設你沒有任何先前知識。
0:04.384–0:06.121
show you how to set it up and install it,
因此,即使你是完全的新手,也能輕鬆跟上。
0:06.121–0:07.533
and assume no prior knowledge.
接下來,我將涵蓋電腦操作或瀏覽器控制等內容。
0:07.533–0:09.188
So even if you're a complete beginner,
我會示範如何設定程式碼模型選擇、所有不同的指令(例如斜線指令 goal),以及許多我尚未見很多人介紹的新功能。
0:09.188–0:10.600
you'll be able to follow along.
所以,請繼續觀看。
0:10.600–0:14.266
Now I'm going to be covering things like computer use or browser control.
讓我們開始吧,讓我來教你 Codex。
0:14.266–0:17.403
I'm going to show you how to set it up for coding model selection,
那麼,我們先從討論 Codex 是什麼開始。
0:17.403–0:19.711
all of the different commands like slash goal,
我們將探討如何使用它,因為實際上有多種不同的使用方式。
0:19.711–0:23.000
and a lot of the new features that I haven't seen many people cover.
接著,我將開始介紹所有不同的功能。
0:23.000–0:24.700
So with that said, stick around.
下方會有時間戳記,如果你想要跳過某些部分。
0:24.700–0:27.133
Let's get into it and let me teach you Codex.
請記住,我喜歡把事情做得非常詳盡和細緻。
0:27.133–0:29.333
So let's start by discussing what Codex is.
所以,如果你覺得我講得太慢,可以快轉到下一個章節,沒關係。
0:29.333–0:32.433
We'll look at how we can use it because there's actually many different ways.
那麼,首先,Codex 是什麼?
0:32.433–0:34.833
And then I'll start going through all of the different features.
嗯,Codex 本質上是 OpenAI 對 Claude code 等工具的回應。
0:34.833–0:37.533
There'll be timestamps down below in case you want to skip forward.
我認為它實際上比 Claude code 更複雜,它擁有更多功能,而且很多人不知道你可以用它做什麼。
0:37.533–0:40.433
And keep in mind I like to make things really thorough in detailed.
現在,基本功能是你可以用它來撰寫程式碼,因為它會讓你存取他們頂級的模型,例如 GPT 5.5。
0:40.433–0:44.433
So if you feel like I'm going to slow, fast forward to the next section okay.
然而,你也可以用它來控制你的電腦、自動化任務,或為你執行重複性工作。
0:44.433–0:46.266
So first what is Codex?
你甚至可以告訴它為你播放 Spotify 上的歌曲。
0:46.266–0:50.533
Well Codex is essentially OpenAI's answer to tools like Claude code.
它可以透過控制你的電腦來完成這些動作。
0:50.533–0:54.595
It's actually much more involved than Claude code I would say it has a lot more features,
所以有很多很酷的功能,並不僅限於編碼相關。
0:54.595–0:57.266
and a lot of people don't know about what you can do with it.
我將在這個影片中嘗試涵蓋所有這些功能。
0:57.266–1:03.733
Now, the basics is that you can use it to write code because it will give you access to their top models like GPT 5.5.
所以我想快速介紹如何使用 Codex,因為有很多不同的使用方式。
1:03.733–1:06.905
However, you can also use it to control your computer,
而 OpenAI 在 Codex 的命名上一直讓人感到困惑,因為他們曾有名為 Codex 的模型,就像他們的實際大型語言模型一樣。
1:06.905–1:08.033
to automate tasks,
現在他們有一個名為 Codex 的工具,你可以以多種不同的方式使用它。
1:08.033–1:10.500
to perform something repetitive for you.
因此,在這個影片中,我們將使用獨立桌面應用程式。
1:10.500–1:14.000
And you can even do something like tell it to play a song on Spotify for you.
運作方式是你下載並安裝它到你的電腦上。
1:14.000–1:17.000
And it can go and do that by controlling your computer.
你可以為 Windows 和 Mac 下載,而他們目前還沒有提供 Linux 版本。
1:17.000–1:19.700
So there's a lot of cool features that are not just related to coding.
所以僅限於 Windows 或 Mac。
1:19.700–1:22.100
I'm going to try to cover all of those in this video.
現在,你需要使用你的 ChatGPT 訂閱來登入這個應用程式。
1:22.100–1:24.885
So what I want to do is quickly cover how you can use Codex,
我相信你可以使用 Plus 方案,每月低至 20 美元來使用它。
1:24.885–1:26.900
because there's a lot of different ways.
請記住,我擁有每月 200 美元的方案,所以我的使用限制會顯著更高。
1:26.900–1:33.600
And OpenAI has been very confusing with the naming of Codex because they had models called Codex like their actual LLMs.
現在的限制通常非常寬鬆。
1:33.600–1:35.627
Now they have the tool called Codex,
你可能會獲得比預期多 5 到 10 倍的使用量。
1:35.627–1:38.466
and you can use it in like many different fashions.
與 Claude Code 等東西相比,你不太需要擔心會用完額度。
1:38.466–1:42.900
So for this video we're going to be using the stand alone desktop application.
除非你使用最高階的模型,並且全天候 24 小時運行它。
1:42.900–1:45.833
The way this works is you download it and install it on your computer.
現在你也可以使用 OpenAI API 金鑰來使用這個工具。
1:45.833–1:46.967
You can get it for windows,
我絕對不建議那樣做,因為那會非常昂貴。
1:46.967–1:49.133
Mac and then they don't have it for Linux right now.
首先,如果你不想下載和安裝 Codex,我會在描述中留下連結,使用你的 ChatGPT 帳號登入,然後你就可以開始使用了,此外還有桌面應用程式,這正是我們將要使用的。
1:49.133–1:50.400
So just Windows or Mac.
他們還提供 IDE 擴充功能。
1:50.400–1:53.666
Now you'll sign into this using your ChatGPT subscription.
您可以在 Cursor、Visual Studio Code 和 Windsurf 等熱門編輯器中安裝此功能,並在該編輯器內使用相同的 Codex 介面。
1:53.666–1:54.451
You can use it,
如果您是開發人員,您可能希望這樣做。
1:54.451–1:55.040
I believe,
我們也有命令列介面(CLI)。
1:55.040–1:57.133
as low as $20 per month on the plus plan.
這是一種命令列介面,比較類似 Cloud Code 這類工具,您不會看到那種友善的圖形使用者介面,這在稍後您會看到。
1:57.133–1:59.767
Just keep in mind I do have the $200 per month plan,
但這裡的優勢在於,您可以在 Linux 或伺服器上執行此功能,並將其作為一台 24 小時運行的遠端機器。
1:59.767–2:02.433
so my usage limits will be significantly higher.
情況相同。
2:02.433–2:04.400
Now the limits are typically very generous.
您可以使用您的帳戶登入。
2:04.400–2:07.300
You're probably going to get 5 or 10 times the amount of usage.
接著我們有雲端版本,它直接在您的瀏覽器中運行。
2:07.300–2:09.641
Then you would compare it to something like Claude Code,
如果您能使用桌面版會更好,但如果您想從手機上的瀏覽器使用,也可以這樣做。
2:09.641–2:11.933
so I wouldn't be too concerned with ripping through it.
好的,這些就是 Codex 的各種使用介面。
2:11.933–2:15.266
Unless you use the highest end models and you're running it 24 over seven.
再次強調,我們希望下載桌面應用程式,因為我們將在那裡進行操作。
2:15.266–2:17.666
Now you can also use this with an OpenAI API key.
現在讓我們開啟該應用程式。
2:17.666–2:21.100
I definitely do not recommend that because that's going to be very expensive.
只需開啟桌面應用程式,我們將在那裡工作,我也建議您使用 Codex,因為它提供的功能最多。
2:21.100–2:21.704
So first up,
現在讓我們先瀏覽一下使用者介面。
2:21.704–2:24.484
if you don't want to be downloaded and installed Codex,
您可以了解這些按鈕實際上的功能。
2:24.484–2:28.292
I'll leave a link to it in the description sign in with your ChatGPT account,
然後我保證我們會介紹所有功能。
2:28.292–2:30.890
then you're good to go now as well as the desktop app,
在這裡您會看到主要的聊天視窗。
2:30.890–2:33.100
which again is what we're going to be using.
有幾件事您需要注意,例如模型選擇器(我們稍後會看)、語音輸入(如果您想使用該功能)以及核准模式。
2:33.100–2:35.033
They also have an IDE extension.
因此,您可以選擇請求核准、由我核准或完全存取。
2:35.033–2:37.972
You can install this in the popular editors like cursor,
接著是可以新增不同的技能與上下文。
2:37.972–2:43.100
Visual Studio Code and Windsurf and have access to the same Codex interface inside of that editor.
接著,如果你想的話,你可以使用這個斜線來執行指令。
2:43.100–2:44.050
If you're a developer,
所以如果你輸入斜線,你就能看到所有可用的功能列表,這些功能都會在後面介紹。
2:44.050–2:45.000
you may want to do that.
你還擁有將不同對話組織成專案的能力。
2:45.000–2:46.400
We also have CLI.
所以你可以看到我這裡有幾個專案。
2:46.400–2:50.011
Now this is a command line interface more familiar to something like cloud Code,
你可以建立新的專案,但我們稍後再來看這個部分。
2:50.011–2:52.706
where you're not in kind of a nice graphical user interface,
現在,從右側你會注意到這些切換欄位。
2:52.706–2:54.000
which you'll see in a minute.
所以如果你點擊右側,它會顯示瀏覽器終端機。
2:54.000–2:57.705
But the advantage here is that you can run this on something like Linux or a server,
這是因為 Codex 可以自動為你控制瀏覽器並測試你的應用程式。
2:57.705–3:00.900
and you can have this as a remote machine that's running 24 over seven.
接著你也可以切換顯示終端機或 Shell,同樣地,Codex 可以為你控制和使用它。
3:00.900–3:01.299
Same thing.
你通常不需要這樣做,但我只是要讓你從左側知道這些視角是存在的。
3:01.299–3:02.533
You can sign in with your account.
你也可以切換這個側邊欄,裡面有一些重要的按鈕或視角。
3:02.533–3:06.233
And then we have the cloud version which is running directly in your browser.
如果你想存取設定選單,你可以點擊你的個人資料。
3:06.233–3:08.432
It's better if you can use the desktop version,
你可以前往個人資料或設定來進行設定。
3:08.432–3:11.533
but if you want to do it from the browser on your phone or something,
如果你是不會進行任何編碼的人,你可以將其切換到日常工作的模式。
3:11.533–3:12.300
you can do that.
所以它會比較不那麼技術性,但對我們大多數人來說,我們會希望停留在這裡,以便存取瀏覽器、終端機和其他一些功能。
3:12.300–3:12.614
Okay,
這裡有大量的設定選項。
3:12.614–3:14.500
so those are the surfaces for Codex.
歡迎瀏覽這些設定並根據需要進行更改。
3:14.500–3:14.819
Again,
但同樣地,我會逐一介紹它們。
3:14.819–3:17.261
what we want to do is download the desktop application,
最後一件事,如果你去查看用量和計費,你將能夠看到你的用量、目前所在的方案,以及是否有任何餘額或其他資訊。
3:17.261–3:19.066
which is where we're going to be working.
同樣地,這些限制非常寬鬆。
3:19.066–3:20.666
And now let's open up that app.
要達到這些上限的機會非常低,尤其是如果你做的事情還算正常的話。
3:20.666–3:22.526
So just open up the desktop application,
所以我不建議你為此過度擔心。
3:22.526–3:27.833
which is where we're going to be working and where I recommend you use Codex because does the most number of features.
好了,既然我們已經介紹完這些內容,讓我們開始查看模型。
3:27.866–3:29.866
Now let's start by going through the user interface.
讓我們開始運行一些聊天並設定一些外掛程式,這樣我可以向你展示電腦控制等功能,這非常酷。
3:29.866–3:32.800
You can understand what all of these buttons actually do.
但在開始之前,先讓我們聽聽贊助商 Boot.dev 的介紹。
3:32.800–3:35.066
And then I promise we'll go through all of the features.
這是目前最好的學習平台之一,也是這個頻道的長期合作夥伴。
3:35.066–3:37.066
So here you have your main chat window.
我發現人們學習編程時最大的問題之一是無聊。
3:37.066–3:39.121
There's a few things you want to pay attention to,
他們觀看教學影片、複製程式碼,覺得自己很有生產力,但一週後就放棄了。
3:39.121–3:41.426
like the model selector which we'll look at in a minute,
但 Dev 採取了完全不同的方法。
3:41.426–3:43.381
the voice dictation in case you want to use that
它非常注重實作,誠實說,感覺更像是一款遊戲而不是一門課程。
3:43.381–3:44.233
the approval modes.
現在你是透過實際建構東西來學習後端開發,而不只是觀看影片。
3:44.233–3:47.000
So ask for approval approved for me or full access.
你會透過 Python 和 SQL 的實際挑戰,擊敗五個關卡首領,並完成完整的後端課程。
3:47.000–3:50.100
And then being able to add different skills context.
這聽起來有點花俏,但我保證它確實有效,因為你正在進行與工作中相同的問題解決過程。
3:50.100–3:52.668
And then if you want you can actually run commands
他們還有一位名為 Boot 的 AI 導師,它不會直接丟給你答案,而是會提出後續問題,並在你卡住時幫助你推理問題,這更接近你實際學習的方式。
3:52.668–3:53.833
by using this slash.
現在,所有內容都可以免費閱讀和觀看,如果你想進行互動式編程、進度追蹤和 AI 輔助,這些屬於付費方案的一部分。
3:53.833–3:55.498
So if you do forward slash you be able to see
如果你想查看,請前往 dev 並使用我的代碼 tech with Tim,以獲得第一年 25% 的折扣。
3:55.498–3:56.925
a list of all of this stuff available
衷心感謝 Boot.dev 贊助本影片。
3:56.925–3:58.100
which will be going through.
現在讓我們回到正題。
3:58.100–4:01.466
You also have the ability to organize different chats into projects.
就像我剛才說的,讓我們來看看模型選擇。
4:01.466–4:03.333
So you can see I have a few projects here.
現在,不知為何你沒有看到這個視圖。
4:03.333–4:04.269
You can make a new one,
你隨時可以按下「新增對話」來顯示這個畫面。
4:04.269–4:05.933
but we'll look at that in a few minutes.
接著,如果你前往模型選擇器,你會看到推理等級有輕度、中度、高度和極高四種選項。
4:05.933–4:08.100
Now from the right hand side you'll also notice
當然,你總是希望盡可能使用最佳的推理能力,但請記住這會顯著增加耗時。
4:08.100–4:09.600
that you have these toggle bars.
因此,推理等級的選擇某種程度上取決於任務需要花費多少時間。
4:09.600–4:11.720
So if you click on the right it's going to show you
當然,推理等級越高,你通常會獲得更好的回應和結果,但耗時可能會增加 4 到 5 倍,有時甚至高達 10 倍。
4:11.720–4:12.833
a browser and a terminal.
我曾有任務在極高推理模式下運行了 30 分鐘。
4:12.833–4:16.152
That's because Codex can automatically control a browser for you
如果你想要快速完成。
4:16.152–4:17.600
and test your applications.
如果你只是問一個簡單的問題,不需要超級高的推理等級,你可以將其設為輕度或中度模式。
4:17.600–4:20.715
And then you can also toggle up the terminal or the shell,
接下來,關於模型本身,你有幾個選項。
4:20.715–4:23.266
which again Codex can control and use for you.
GPT 5.5 算是其中最好的選擇。
4:23.266–4:24.772
You typically don't need to do this,
這是前沿編碼模型,幾乎所有情況你都應該使用它。
4:24.772–4:26.529
but I'm just showing you those views exist
GPT 5.4 是上一代版本,具有相對較低的用量限制。
4:26.529–4:27.533
from the left hand side.
我從來不會使用這個版本。
4:27.533–4:29.279
You can also toggle this sidebar
您也可以切換這個側邊欄
4:29.279–4:31.930
where you have some of the important I don't know,
這可用於小型、快速且高效的任務,例如你只是問個問題,或者只想進行快速的 UI 變更等。
4:31.930–4:33.166
buttons or views.
而 5.3 Codec Spark 是一個極度快速的模型,適用於那些不需要太多智能的微小任務。
4:33.166–4:35.025
If you want to access the settings menu,
特別是當你在 GPT 5.5 上的用量即將耗盡時。
4:35.025–4:36.433
you can click on your profile.
所以對於 99% 的用戶來說,你只需保持 GPT 5.5 開啟即可。
4:36.433–4:39.433
You can go to profile or to settings for settings.
建議將其設為中度推理。
4:39.433–4:41.466
If you are someone who's not going to do any coding,
如果你有足够的信用額度,可以開啟此快速模式以加快運行速度。
4:41.466–4:43.500
you can switch this over to the everyday work mode.
我幾乎都會一直開啟這個選項,然後如果你開始耗盡使用額度,你可以切換到這些其他模型。
4:43.500–4:45.366
So it's going to be a little bit less technical,
你可以將速度恢復為預設值,並調整推理層級,但大多數時候使用 5.5 中等推理即可。
4:45.366–4:46.084
but for most of us,
這就是你應該保持的設定。
4:46.084–4:47.329
we're going to want to stay here
如果你正在處理更複雜的事情,請在此處將推理層級切換為高或超高。
4:47.329–4:48.669
where we have access the browser,
你可以隨意嘗試,但這基本上就是你需要了解的所有內容。
4:48.669–4:50.233
the terminal and some other features.
好的,當然我們會使用這個功能,我會展示許多提示詞。
4:50.233–4:51.433
There's a ton of settings.
但我想向你展示如何設定這個功能,以便我們能利用 Codex 做一些非常有趣的事情。
4:51.433–4:52.797
Feel free to look through these
所以我們接下來要做的是前往外掛程式。
4:52.797–4:54.266
and change any of them if you want.
現在,Codex 我最喜歡的功能之一就是它預設擁有的所有外掛程式。
4:54.266–4:54.772
But again,
而且它能控制你的電腦、瀏覽器、試算表,存取 Google Drive,並以非常互動且直觀的方式執行這些操作。
4:54.772–4:56.233
I'll go through them one by one.
現在,大多數像 Cloud Code 這樣的工具也能做到同樣的事情,但我發現 Codex 的表現好得多,而且更容易理解。
4:56.233–4:57.177
And then last thing,
所以我們接下來要做的是前往外掛程式,並開始安裝你在我電腦上看到的某些外掛程式。
4:57.177–4:58.955
if you go and look at usage and billing,
第一個是電腦使用(Computer Use)。
4:58.955–5:00.455
you'll be able to see your usage,
如果你尚未安裝這個,你可以安裝並啟用它。
5:00.455–5:02.066
the plan that you're currently on,
它可能會在此要求一些權限。
5:02.066–5:03.733
if you have any balance or anything.
如果您有任何餘額或其他內容。
5:03.733–5:04.115
Again,
所以你可以告訴它開啟應用程式、前往瀏覽器、存取 Spotify。
5:04.115–5:05.833
these are very generous limits.
我們馬上就會看到這一點。
5:05.833–5:07.619
It's very unlikely that you're going to hit them,
接下來我們想要的外掛程式是 Chrome。
5:07.619–5:09.666
especially if you're doing something somewhat normal.
所以我們要在這裡安裝這個 Chrome 外掛程式。
5:09.666–5:11.433
So I wouldn't stress out about it too much.
接著開啟這個 Chrome 擴充功能,好的。
5:11.433–5:12.800
Okay, so now that we've gone through that,
這個 Codex Chrome 擴充功能。
5:12.800–5:13.933
let's start looking at the models.
你可以看到我的已經安裝在這裡了。
5:13.933–5:15.442
Let's start running a few chats
如果我進入檢視頁面,你可以看到我們有 Codex 並且已連線。
5:15.442–5:16.776
and setting up some plugins
這將允許 Codex 控制你的瀏覽器。
5:16.776–5:19.214
so I can show you things like the computer control,
所以它可以開啟一個分頁。
5:19.214–5:20.200
which is super cool.
它可以搜尋某些內容。
5:20.200–5:24.300
But first, just a quick word from our sponsor boot dev.
它可以偵錯你的應用程式。
5:24.300–5:26.997
Now this is one of the best learning platforms out there
請務必再次設定好這個。
5:26.997–5:29.400
and actually a long term partner of this channel.
如果你只是按下這個開啟按鈕,你就可以安裝擴充功能並將其連結。
5:29.400–5:33.266
Now, one of the biggest problems that I see with people learning to code is boredom.
另一個我強烈推薦的擴充功能是 GitHub。
5:33.266–5:34.641
They watch tutorials,
如果你不熟悉 git 和 GitHub,這本質上是一種用於程式碼的版本控制軟體。
5:34.641–5:35.293
copy code,
這意味著你可以儲存你的變更,並在之後復原它們。
5:35.293–5:36.958
feel productive for a week,
你可以將它們儲存在雲端,從不同的裝置使用它們,並與你的隊友分享。
5:36.958–5:38.333
and then they quit now.
這是在建構任何中等規模專案時的标准做法。
5:38.333–5:40.900
But dev takes a completely different approach.
真的任何類型的程式碼專案,你都應該使用這個。
5:40.900–5:41.959
It's very hands on
所以建立一個免費的 GitHub 帳戶。
5:41.959–5:45.100
and honestly, it feels more like a game than a course.
非常簡單。
5:45.100–5:48.734
Now you're learning backend development by actually building things,
你只需前往 github.com,然後就可以在 Codex 內部連結你的 GitHub 帳戶。
5:48.734–5:50.066
not just watching videos.
這樣它就可以自動建立所謂的儲存庫,這只是有效地儲存你的程式碼並上傳到雲端,這樣你就會丟失它。
5:50.066–5:53.359
You work through real challenges in Python SQL and go
你可以從其他裝置存取它,並且在 Codex 做出變更時恢復到之前的版本。
5:53.359–5:54.931
earn level up five bosses
它會將你的專案版本進行版本控制。
5:54.931–5:58.000
and progress through a full backend curriculum.
我不會花太多時間講解 GitHub 上的 git,但我強烈建議你設定這個外掛程式,你可以看到我們還有其他一些外掛,例如 Google Drive、簡報、試算表、Slack、Gmail。
5:58.000–5:59.296
Now it sounds a bit gimmicky,
你可以新增任意數量的這些外掛,但我目前先使用這些。
5:59.296–6:00.863
but I promise you it actually works
既然我們已經安裝了電腦外掛程式,我想向你展示如何使用它。
6:00.863–6:04.266
because you're doing the same kind of problem solving that you do on the job.
所以如果我使用這個 at 符號,你可以看到我實際上可以參考不同的應用程式,特別是這個電腦。
6:04.266–6:06.403
Now they also have an AI tutor called boots,
對。
6:06.403–6:08.362
which doesn't just dump answers on you,
所以從電腦功能中,我可以要求它執行某些動作。
6:08.362–6:09.728
it asks follow up questions
所以讓我們從做一些簡單的事情開始。
6:09.728–6:12.577
and helps you reason through problems when you get stuck,
開啟記事本,關閉任何現有的視窗,然後寫下一條簡單的筆記,描述你理想中的一天。
6:12.577–6:14.833
which is way closer to how you actually learn.
我知道你是一台電腦,但請隨便想個內容,好嗎?
6:14.833–6:17.215
Now, all of the content is free to read and watch,
我只是給它一個隨機的提示。
6:17.215–6:19.181
and if you want the interactive coding,
順便一提,如果你想知道我這裡是用什麼來輸入提示,我總是使用一個叫做 Whisper Flow 的工具。
6:19.181–6:20.372
the progress tracking,
對於語音輸入,特別是在 AI 工具中,這非常好用。
6:20.372–6:21.504
and the AI assistance,
我會把連結放在描述欄,讓你可以去看看。
6:21.504–6:23.000
that's part of the paid plan.
在描述欄中。
6:23.000–6:24.781
If you want to check it out,
你可以看到根據我的使用情況,我大量使用它。
6:24.781–6:25.347
go to dev
非常好用且免費試用。
6:25.347–6:27.209
and use my code tech with Tim
好的,所以讓我們執行這個,看看我們會得到什麼結果。
6:27.209–6:29.266
to get 25% off your first year.
你可以看到它將使用電腦外掛程式。
6:29.266–6:31.633
Big thanks to Boot Dev for sponsoring this video.
它應該會控制我的電腦。
6:31.633–6:33.266
Now let's get back into it.
請記住,當它控制我的電腦時,我仍然可以自行使用電腦。
6:33.266–6:34.155
So like I was saying,
所以我可以導航進入某個應用程式。
6:34.155–6:35.933
let's have a look at the model selection.
我可以關閉某些東西。
6:35.933–6:37.400
Now, for some reason you don't see this view.
我不需要讓它自由地使用滑鼠,因為它實際上會使用自己的游標。
6:37.400–6:39.082
You can always just press a new chat
好的,抱歉,因為那裡有一條我不希望你們看到的註記,所以我不得不重新執行一次。
6:39.082–6:40.300
and it will bring this up.
但你可以看到它實際上只是打開了我的電腦,打開了記事本,並為我寫下了這條註記。
6:40.300–6:42.457
Now from here if you go to model selector
好的。
6:42.457–6:47.066
you're going to see that you have a reasoning level light medium high and extra high.
那麼現在如果我想說些什麼,你能繼續這個節點,並讓它的長度變成兩倍或三倍嗎?
6:47.066–6:50.807
Now of course you want to use the best reasoning whenever you possibly can,
如果尚未儲存也沒關係。
6:50.807–6:54.066
but keep in mind that this is going to take significantly longer.
繼續寫下去就好。
6:54.066–6:58.133
So the reasoning can kind of come down to how long this is going to take.
然後我們按下 Enter 鍵。
6:58.133–7:03.588
Of course, the higher reasoning, the better responses and results that you're typically going to get,
再次你會看到我們電腦周圍出現那種藍色光暈。
7:03.588–7:06.633
but it can increase the time by like 4 or 5, sometimes ten x.
它能夠接管並執行我們想要的任何操作,這在自動化方面非常有用,例如測試網站、填寫表單或重複執行任務。
7:06.633–7:10.800
I've had tasks here taken 30 minutes to run in extra high reasonings.
你明白我的意思。
7:10.800–7:11.833
If you want something fast.
那麼讓我們看看它是如何運作的。
7:11.833–7:15.249
If you're asking a quick question, you don't need super high reasoning
你可以看到它剛剛打開了它。
7:15.249–7:17.400
and you can put this in light or medium mode.
然後它擴展了註記嗎?
7:17.400–7:20.333
Now, when it comes to the model itself, you have a few options.
我想沒有,顯示正在思考,好的,也許它會在一秒後再次接管。
7:20.333–7:23.333
GPT 5.5 is kind of the best one.
但當它這樣做時,你也會看到它的游標出現,我認為這相當酷。
7:23.333–7:27.533
The frontier coding model, the one you're going to want to use for pretty much everything.
Frontier 編碼模型,這是您幾乎所有情況都想要使用的模型。
7:27.533–7:32.400
GPT 5.4 is just the generation before that that has kind of cheaper usage limits.
GPT 5.4 是前一代的模型,具有較低的用量限制。
7:32.400–7:34.627
I would never use this one.
我從來不會使用這個。
7:34.627–7:35.733
GPT 5.4 mini.
[未翻譯]
7:35.733–7:39.810
This can be used for small, fast, kind of efficient things where you're asking a question
這可以用於小型、快速且高效的任務,例如當您提出問題時
7:39.810–7:42.400
or you just want, you know, quick UI change or something.
或者您只是想進行快速的 UI 變更之類的操作。
7:42.400–7:47.826
And then 5.3 Codec Spark is just an extremely fast model that you use again, for very minor things
然後 5.3 Codec Spark 是一個極度快速的模型,您可以用於非常次要的任務
7:47.826–7:50.200
that don't require a lot of intelligence.
這些任務不需要太多智能。
7:50.200–7:54.133
And specifically when you're running out of the usage on GPT 5.5.
特別是在您用盡 GPT 5.5 的用量時。
7:54.133–7:57.600
So for 99% of you, you just keep GPT 5.5 on.
所以對於 99% 的用戶來說,您只需保持 GPT 5.5 開啟。
7:57.600–7:59.533
Probably throw it in medium reasoning.
可能將其設為中等推理模式。
7:59.533–8:00.755
If you have enough credits,
如果您有足夠的信用額度,
8:00.755–8:02.030
you can turn on this fast mode
您可以開啟此快速模式
8:02.030–8:02.933
so it'll run faster.
這樣運行速度會更快。
8:02.933–8:04.541
I pretty much always leave that on,
我幾乎總是保持開啟,
8:04.541–8:06.648
and then if you start running out of the usage,
然後如果您開始用盡用量,
8:06.648–8:08.700
you can switch to some of these other models.
您可以切換到這些其他模型之一。
8:08.700–8:10.824
You can change the speed back to default
您可以將速度改回預設值
8:10.824–8:12.626
and you can adjust the reasoning,
並且你可以調整推理深度,
8:12.626–8:14.300
but most of the time 5.5 medium.
但大多數時候使用 5.5 中等模式即可。
8:14.300–8:15.633
This is what you're going to keep it in.
這就是你應該保持的設定。
8:15.633–8:17.978
And if you're doing something more complicated,
如果你正在處理更複雜的任務,
8:17.978–8:20.700
switch up the reasoning level here to high or extra high.
請在此處將推理層級切換為高或超高。
8:20.700–8:21.753
You can play around with it,
你可以嘗試調整看看,
8:21.753–8:23.400
but that's pretty much all you need to know.
但基本上你需要知道的就這些了。
8:23.400–8:24.695
Okay, so of course we're going to use this
好的,當然我們會使用這個功能,
8:24.695–8:26.066
and I'm going to show you a bunch of prompts.
我會展示許多提示詞範例。
8:26.066–8:27.824
But I want to show you how to set this up
但我希望向你展示如何設定這個功能,
8:27.824–8:30.433
so we can do some really interesting things with Codex.
這樣我們就能用 Codex 做一些非常有趣的事情。
8:30.433–8:33.033
So what we're going to do here is go to plugins.
所以我們接下來要做的是前往外掛程式。
8:33.033–8:35.529
Now this is one of my favorite features of Codex
現在這是 Codex 我最喜歡的功能之一,
8:35.529–8:37.833
is all of the plugins that it has by default.
就是它預設擁有的所有外掛程式。
8:37.833–8:40.387
And the fact that it can control your computer,
而且它能控制你的電腦,
8:40.387–8:41.631
control your browser,
控制你的瀏覽器,
8:41.631–8:42.941
control spreadsheets,
控制試算表,
8:42.941–8:44.119
access Google Drive,
存取 Google Drive,
8:44.119–8:47.100
and do this in a really interactive and intuitive way.
並以非常互動且直觀的方式執行這些操作。
8:47.100–8:49.607
Now, most of your tools like this like cloud code,
現在,大多數像 Cloud Code 這樣的工具,
8:49.607–8:50.952
they can do the same thing,
他們也能做到同樣的事情,
8:50.952–8:52.848
but I find Codex performs a lot better
但我發現 Codex 的表現要好得多,
8:52.848–8:54.866
and it's just way easier to understand.
而且它更容易理解。
8:54.866–8:56.485
So what we're going to want to do here
所以我們接下來要做的是,
8:56.485–8:57.187
is go to plugins
前往外掛程式(Plugins),
8:57.187–9:00.533
and start installing some of the ones that you see on my computer right now.
並開始安裝你在我電腦上現在看到的那些。
9:00.533–9:02.666
So the first one is computer use.
第一個是 Computer Use。
9:02.666–9:04.325
If you don't already have this installed,
如果你還沒有安裝這個,
9:04.325–9:05.700
you can install it and activate it.
你可以安裝並啟用它。
9:05.700–9:07.466
It may ask for some permissions here.
它可能會在這裡要求一些權限。
9:07.466–9:09.933
And this is going to allow you to control your computer.
這樣你就能控制你的電腦了
9:09.933–9:12.374
So you can tell it to open up an application
所以你可以告訴它開啟一個應用程式,
9:12.374–9:13.490
go to your browser,
前往你的瀏覽器,
9:13.490–9:14.500
access Spotify.
存取 Spotify。
9:14.500–9:16.233
We're going to look at that in one second.
我們馬上就會看到這一點。
9:16.233–9:18.333
Next plug in we're going to want is Chrome.
下一個我們想要的外掛程式是 Chrome。
9:18.333–9:20.466
So we're going to want to install this Chrome plug in here.
所以我們要在這裡安裝這個 Chrome 外掛程式。
9:20.466–9:23.333
And then open up this Chrome extension okay.
然後開啟這個 Chrome 擴充功能,好的。
9:23.333–9:24.600
This Codex Chrome extension.
這個 Codex Chrome 擴充功能。
9:24.600–9:26.600
You can see I already have mine installed here.
你可以看到我的已經安裝在這裡了。
9:26.600–9:27.639
And if I go to the view
如果我進入檢視
9:27.639–9:28.861
you can see we have Codex
你會看到我們有 Codex
9:28.861–9:29.900
and it's connected.
並且它已連線。
9:29.900–9:32.533
And this will allow Codex to control your browser.
這將允許 Codex 控制你的瀏覽器。
9:32.533–9:33.633
So it can open up a tab.
因此它可以開啟分頁。
9:33.633–9:34.921
It can search for something.
它可以搜尋某些內容。
9:34.921–9:36.300
It can debug your application.
它可以除錯你的應用程式。
9:36.300–9:37.866
Make sure that you get that set up again.
請確保你再次設定好。
9:37.866–9:39.437
If you just press this open button
如果你只是按下這個開啟按鈕
9:39.437–9:41.433
you can install the extension and link it.
你可以安裝擴充功能並將其連結。
9:41.433–9:44.300
Another extension that I highly recommend is GitHub.
另一個我強烈推薦的擴充功能是 GitHub。
9:44.300–9:46.451
If you're unfamiliar with git and GitHub,
如果你不熟悉 git 和 GitHub,
9:46.451–9:49.433
this is essentially a version control software for code.
這本質上是一種用於程式碼的版本控制軟體。
9:49.433–9:51.857
This means that you can save your changes,
這意味著你可以儲存你的變更,
9:51.857–9:53.900
that you can recover them later on.
之後可以復原它們。
9:53.900–9:55.147
You can store them in the clouds,
你可以將它們儲存在雲端,
9:55.147–9:56.671
you can use them from a different device
你可以從不同的裝置使用它們
9:56.671–9:58.400
and you can share them with your teammates.
並且你可以與隊友分享它們。
9:58.400–10:02.033
This is a standard anytime you're building even a medium sized project.
這是在建構即使是中等規模專案時,隨時都會使用的標準。
10:02.033–10:03.541
Really any type of coding project,
任何類型的程式碼專案,
10:03.541–10:04.633
you should be using this.
你應該使用這個功能。
10:04.633–10:06.866
So create a free GitHub account.
所以建立一個免費的 GitHub 帳戶。
10:06.866–10:07.400
Very easy.
非常簡單。
10:07.400–10:08.747
You can just go to github.com
你只需前往 github.com
10:08.747–10:11.833
and then you can connect your GitHub account here inside of Codex.
然後你就可以在這裡的 Codex 內連結你的 GitHub 帳戶。
10:11.833–10:14.376
So it can automatically make what's called a repository,
這樣它就能自動建立所謂的儲存庫(repository),
10:14.376–10:16.337
which is just storing your code effectively
這基本上就是有效地儲存你的程式碼
10:16.337–10:17.502
and upload it to the clouds
並上傳到雲端
10:17.502–10:18.933
that you're not going to lose it.
這樣你就不會遺失它。
10:18.933–10:20.728
You can access it from other devices
你可以從其他裝置存取它
10:20.728–10:23.333
and you can revert back in case Codex makes a change.
並且如果 Codex 做出變更,你可以復原。
10:23.333–10:25.800
It breaks whatever the version of your project is.
以防你的專案版本被破壞。
10:25.800–10:28.136
I'm not going to be teaching git in GitHub too much,
我不會花太多時間教導 Git 和 GitHub,
10:28.136–10:30.527
but I do highly recommend that you set up that plugin
但我強烈建議你設定這個外掛程式
10:30.527–10:32.474
and you can see we have a few other ones here
你可以看到我們這裡還有其他幾個
10:32.474–10:35.533
like Google Drive, presentations, spreadsheets, slack, Gmail.
例如 Google Drive、簡報、試算表、Slack、Gmail。
10:35.533–10:37.051
You can add as many of these as you want,
你可以新增任意多個這些服務,
10:37.051–10:38.900
but I'm going to stick with these for right now.
但我現在會先使用這些。
10:38.900–10:41.578
So now that we have the computer plugin installed,
所以現在既然已經安裝了電腦外掛程式,
10:41.578–10:43.300
I want to show you how to use this.
我想向你展示如何使用這個功能。
10:43.300–10:45.108
So if I go and I use this at symbol,
所以如果我使用這個 at 符號,
10:45.108–10:48.791
you can see that I can actually reference different applications
你可以看到我實際上可以參考不同的應用程式
10:48.791–10:50.700
and specifically this computer.
以及特定的這台電腦。
10:50.700–10:51.066
Right.
沒錯。
10:51.066–10:54.666
So from computer what I can do is ask it to do something.
所以從電腦那裡,我可以要求它執行某些動作。
10:54.666–10:56.900
So let's start by doing something simple.
所以讓我們從做點簡單的事情開始。
10:56.900–10:58.048
Open up notepad,
打開記事本,
10:58.048–11:01.411
close any of the existing windows that are there,
關閉任何現有的視窗
11:01.411–11:03.298
and then write a simple note
然後寫下一條簡單的筆記
11:03.298–11:05.266
and describe your ideal day.
並描述你理想中的一天。
11:05.266–11:06.323
I know you're a computer,
我知道你是一台電腦,
11:06.323–11:07.933
but just come up with something, okay?
但只是想個辦法,好嗎?
11:07.933–11:09.833
I'm just giving it kind of random prompt.
我只是給它一個隨機的提示。
11:09.833–11:12.412
By the way, if you're wondering what I'm using to prompt here,
順便一提,如果你想知道我這裡是用什麼來提示,
11:12.412–11:14.400
I always use this tool called Whisper Flow.
我總是使用一個叫做 Whisper Flow 的工具。
11:14.400–11:17.200
Very good for voice dictation, especially in AI tools.
對於語音輸入非常好用,特別是在 AI 工具中。
11:17.200–11:18.585
I'll leave a link to it so you can check it out.
我會留下連結,讓你可以去看看。
11:18.585–11:19.133
In the description.
在描述欄裡。
11:19.133–11:21.933
You can see that I use it a ton based on my usage.
你可以看到我根據使用情況大量使用它。
11:21.933–11:23.733
Very very good and free to try out.
非常好用且免費試用。
11:23.733–11:25.187
Okay, so let's run this
好的,我們來執行這個
11:25.187–11:27.100
and let's see what we get here.
看看會得到什麼結果。
11:27.100–11:29.233
And you can see that it's going to use the computer plugin.
你可以看到它會使用電腦外掛程式。
11:29.233–11:31.233
And it should control my computer.
它應該會控制我的電腦。
11:31.233–11:34.310
And keep in mind that while it's controlling my computer,
請記住,當它控制我的電腦時,
11:34.310–11:36.233
I can still use the computer myself.
我仍然可以自己使用電腦。
11:36.233–11:38.027
So I can navigate into an application.
所以我可以導航進入某個應用程式。
11:38.027–11:39.066
I can close something.
我可以關閉某些東西。
11:39.066–11:41.764
I don't need to have it kind of freely using the mouse,
我不需要讓它隨意使用滑鼠,
11:41.764–11:44.033
because it will actually use its own cursor.
因為它實際上會使用自己的游標。
11:44.033–11:44.876
Okay, apologies,
好的,抱歉,
11:44.876–11:47.685
because it had a note there that I didn't want you guys to see,
因為那裡有一條我不希望你們看到的備註,
11:47.685–11:49.033
so I had to kind of rerun this.
所以我不得不重新執行一次。
11:49.033–11:52.172
But you can see that it actually just opened up my computer here,
但你可以看到它實際上在這裡打開了我的電腦,
11:52.172–11:52.942
open up notepad
打開了記事本
11:52.942–11:54.633
and wrote this note inside for me.
並為我寫下了這則備註。
11:54.633–11:54.833
Okay.
好的。
11:54.833–11:56.303
So now if I want to say something,
所以現在如果我想說些什麼,
11:56.303–11:57.500
can you continue this node
你能繼續這個備註
11:57.500–11:59.514
and make it like double or triple the length?
並讓它的長度變成兩倍或三倍嗎?
11:59.514–12:00.600
Don't worry if it's unsaved.
如果還沒儲存也不用擔心。
12:00.600–12:01.833
Just keep writing okay.
繼續寫下去就好。
12:01.833–12:02.700
And let's hit enter.
然後我們按下 Enter 鍵。
12:02.700–12:06.333
And again you'll see that we kind of get that blue hue around our computer.
接著你會看到電腦周圍出現那種藍色光暈。
12:06.333–12:09.361
And it's able to take over and do anything that we want,
它能夠接管並執行我們想要的任何操作,
12:09.361–12:10.842
which can be super useful,
這可能非常實用,
12:10.842–12:12.457
especially for automating,
特別是在自動化方面,
12:12.457–12:14.206
kind of like testing a website,
有點像是在測試一個網站,
12:14.206–12:15.418
going through a form,
填寫表單
12:15.418–12:17.100
running a task repetitively.
或是重複執行任務。
12:17.100–12:17.866
You get the idea.
我想你已經明白我的意思了。
12:17.866–12:18.942
So let's see how it works.
所以讓我們來看看它是如何運作的。
12:18.942–12:20.433
And you can see that just opened it.
你可以看到它剛剛打開了這個頁面。
12:20.433–12:22.233
And then did it extend the note?
然後它有沒有擴展筆記內容呢?
12:22.233–12:22.856
I guess not,
我想是沒有,
12:22.856–12:23.915
says thinking okay,
它顯示正在思考中,
12:23.915–12:26.200
maybe it will take over again in a second.
也許它會在一秒後再次接管。
12:26.200–12:28.540
But when it does that you also see it's kind of cursor appearing,
但當它這樣做時,你也會看到游標出現,
12:28.540–12:29.633
which I think is pretty cool.
我覺得這相當酷。
12:29.633–12:29.849
Okay,
好的,
12:29.849–12:31.833
so for some reason it didn't keep controlling the note.
所以不知為何它沒有持續控制該音符。
12:31.833–12:33.266
But let's just do another example here.
但讓我們在這裡再做一個範例。
12:33.266–12:34.808
I'm going to say computer,
我會說「電腦」,
12:34.808–12:35.789
open up Spotify,
打開 Spotify,
12:35.789–12:37.681
find Drake's most popular song,
找到 Drake 最熱門的歌曲,
12:37.681–12:40.200
and then tell me what it is and play it okay.
然後告訴我那是什麼並播放它,好嗎。
12:40.200–12:42.733
And let's just do this as an example so we can see okay.
讓我們以此作為範例,這樣我們就能看到情況了。
12:42.733–12:45.500
So it actually found that Spotify wasn't installed on my computer.
所以它實際上發現我的電腦上沒有安裝 Spotify。
12:45.500–12:48.266
And it's going to now do this from Chrome which is what I was trying to show.
它現在將透過 Chrome 來執行這項操作,這正是我想展示的。
12:48.266–12:51.433
So I'm going to allow this to access my Chrome browser okay.
所以我將允許它存取我的 Chrome 瀏覽器,好嗎。
12:51.433–12:52.443
So we can see it opened this,
所以我們可以看到它開啟了這個,
12:52.443–12:53.848
it actually started playing the song,
它實際上開始播放那首歌曲,
12:53.848–12:54.374
I just paused,
我只是暫停了一下,
12:54.374–12:56.833
I don't want to get the copyright strike and it found the song for me.
我不想收到版權警告,而且它幫我找到了那首歌曲。
12:56.833–12:59.500
And then if I go here it says that this is the most popular one.
然後如果我點這裡,它說這是人氣最高的那首。
12:59.500–12:59.696
Okay,
好的,
12:59.696–13:00.597
I don't know if that's true,
我不知道這是否屬實,
13:00.597–13:01.733
but at least that's what it gave us.
但至少它給出了這個結果。
13:01.733–13:03.473
So the point is it can control Chrome,
所以重點是它可以控制 Chrome,
13:03.473–13:04.933
it can control its own devices.
它可以控制自己的裝置。
13:04.933–13:05.700
So keep that in mind.
所以請記住這一點。
13:05.700–13:06.666
That's super useful.
這非常實用。
13:06.666–13:09.833
But now let's move to some more coding related features okay.
但現在讓我們轉向一些與編碼相關的功能,好嗎?
13:09.833–13:11.800
So if we're done with the current chat here,
所以如果我們完成了目前的對話,
13:11.800–13:14.533
what we can do is just press new chat and open up a new one here.
我們可以做的就是按下「新對話」,在這裡開啟一個新的對話。
13:14.533–13:18.066
And what I'm going to do now is I'm actually going to create a new project.
而我要做的是,我實際上要建立一個新專案。
13:18.066–13:18.267
Now,
現在,
13:18.267–13:19.323
whenever you're coding,
每當你在編碼時,
13:19.323–13:21.033
I recommend that you make a new projects.
我建議你建立新專案。
13:21.033–13:24.251
You can organize all of your chats for that specific project,
你可以為該特定專案組織所有對話,
13:24.251–13:26.400
and you can go back and find them easily.
並且你可以輕鬆地回去找到它們。
13:26.400–13:27.671
It's not required to do this,
這並非必要步驟
13:27.671–13:29.100
but it's kind of a good practice.
但這算是個好習慣。
13:29.100–13:30.933
So you can see that I can make new project.
所以你可以看到我能夠建立新專案。
13:30.933–13:32.700
I can use an existing folder.
我可以使用現有資料夾。
13:32.700–13:35.466
So maybe I have an existing code repo that I want to use.
所以也許我有一個想要使用的現有程式碼倉庫。
13:35.466–13:36.266
I can open that up.
我可以開啟它。
13:36.266–13:38.133
And that's kind of what a project is.
這大概就是專案的概念。
13:38.133–13:40.233
It's really just a folder on your computer.
它實際上只是你電腦上的一個資料夾。
13:40.233–13:41.866
Or I can start one from scratch.
或者我可以從頭開始建立一個。
13:41.866–13:43.432
So I'm going to start one from scratch,
所以我將從頭開始建立一個專案
13:43.432–13:45.633
and I'm just going to call this I don't know chess game.
我只會稱它為「國際象棋遊戲」,我也不知道叫什麼好
13:45.633–13:50.033
And what we'll do is we'll try to make like an interactive chess game here using Codex.
我們將嘗試使用 Codex 來製作一個互動式的國際象棋遊戲
13:50.033–13:52.066
So you can see that it's made a new project for me.
你可以看到它為我建立了一個新專案
13:52.066–13:53.333
It's called Chess Game.
這個專案被命名為 Chess Game
13:53.333–13:56.233
And notice that we have a few options here for the project.
請注意,這裡對於專案有幾個選項
13:56.233–13:59.400
Now I have the ability to connect to Codex Web.
現在我具備了連接 Codex Web 的能力
13:59.400–14:04.533
This would essentially send all of the kind of info to the cloud, which is a little bit more complicated.
這基本上會將所有相關資訊傳送到雲端,這會稍微複雜一些
14:04.533–14:09.033
We can work locally, which just means we're working on our own computer, which is what we're going to do here.
我們可以在本地端工作,這意味著我們只在自己的電腦上操作,也就是我們這裡要做的事情
14:09.033–14:11.133
Or we can create something called a work tree.
或者我們可以建立一個稱為工作樹(work tree)的東西
14:11.133–14:13.168
Now we're going to look at work trees later,
我們稍後會探討工作樹
14:13.168–14:15.712
but essentially this is a clone of this kind of project
但基本上,這是這個專案的複製品
14:15.712–14:18.200
so that we can work on multiple things at the same time
以便我們可以同時處理多個任務
14:18.200–14:19.500
without having a conflict.
而不會產生衝突
14:19.500–14:22.733
So for now, we're going to leave it in the current location that it's in.
所以目前,我們將讓它保留在當前的位置
14:22.733–14:25.466
You'll notice that it automatically is connecting to get.
你會注意到它正在自動連接至 git
14:25.466–14:27.466
So it's created a branch called main.
因此它建立了一個名為 main 的分支
14:27.466–14:30.466
And you can make different branches if you're familiar with git.
如果你熟悉 git,你可以建立不同的分支
14:30.466–14:31.800
But we're not going to look at that for right now.
但我們現在不探討這個部分
14:31.800–14:33.782
I'm also just going to move this to full access mode,
我也只是要將這個切換為完全存取模式
14:33.782–14:35.533
just so I don't need to keep approving things.
這樣我就不需要一直批准東西了。
14:35.533–14:38.200
And you can see it's pretty straightforward what you do here with those.
你可以看到,在這裡用這些東西做什麼很直觀。
14:38.200–14:40.000
So now let me give this a simple prompt.
所以現在讓我給它一個簡單的提示。
14:40.000–14:42.000
I want to create a simple chess game.
我想建立一個簡單的西洋棋遊戲。
14:42.000–14:43.309
I want to have a back end
我想要有一個後端
14:43.309–14:44.825
which is using WebSockets
使用 WebSockets
14:44.825–14:46.824
and kind of keeping track of scores
以及大致上追蹤分數
14:46.824–14:47.513
and ratings
和評分
14:47.513–14:48.822
and stuff in a database
以及資料庫中的一些資料
14:48.822–14:50.200
in people's usernames.
在用戶名中。
14:50.200–14:51.700
And then I want to have a front end
然後我想要有一個前端
14:51.700–14:53.200
where we can actually play this.
讓我們可以實際玩這個遊戲。
14:53.200–14:54.536
I want it to be multiplayer,
我想要它是多人遊戲,
14:54.536–14:57.266
so I want two people to be able to play against each other.
所以我想讓兩個人能夠互相對戰。
14:57.300–14:58.560
We can keep it simple,
我們可以保持簡單,
14:58.560–14:59.680
have an MVP to start
先建立最小可行產品
14:59.680–15:01.533
and then build everything out.
然後再擴展所有功能。
15:01.533–15:01.666
Okay.
好的。
15:01.666–15:02.752
So I'm just giving it kind of,
所以我只是給它一種,
15:02.752–15:03.114
you know,
你知道,
15:03.114–15:03.747
prompt on what I,
關於我,
15:03.747–15:04.833
what it is that I want it to do.
我希望它做什麼。
15:04.833–15:06.433
I want it to build something out here.
我希望它在這裡建構一些東西。
15:06.433–15:08.266
And we're going to go ahead and press enter.
然後我們會按下 Enter 鍵。
15:08.266–15:10.066
And I just want to show you how this works okay.
我只想向你們展示它是如何運作的,好吧。
15:10.066–15:12.200
So we can see here the Codex is now working.
所以我們可以看到這裡的 Codex 現在正在運作。
15:12.200–15:13.466
It's making multiple files.
它正在建立多個檔案。
15:13.466–15:14.733
We can see what it's doing.
我們可以看到它在做什麼。
15:14.733–15:17.633
And I can kind of go into this and inspect the different commands.
我可以進入這裡並檢查不同的指令。
15:17.633–15:19.400
But I want to see what's actually running.
但我想知道實際上正在執行什麼。
15:19.400–15:21.266
If I expand this right toggle.
如果我展開這個右側切換按鈕。
15:21.266–15:23.666
Now you'll notice that it's giving me a preview tab.
現在你會注意到它提供了一個預覽標籤頁。
15:23.666–15:24.765
We don't see anything right now
我們現在看不到任何東西
15:24.765–15:26.666
because we're just waiting for it to finish the files.
因為我們只是在等待它完成檔案。
15:26.666–15:29.346
But we will be able to see all of the different files,
但我們很快就能看到所有不同的檔案,
15:29.346–15:32.400
code changes and all this stuff going on here in one second.
程式碼變更以及這裡發生的一切,只需一秒鐘。
15:32.400–15:34.956
And then if I go here to this kind of little,
然後如果我點這裡這個小小的,
15:34.956–15:36.710
I don't know, to do list icon,
我不知道,待辦事項圖示,
15:36.710–15:39.266
you can see that we have a bunch of options.
你可以看到我們有很多選項。
15:39.266–15:40.866
So I can change where I want it to work.
所以我可以更改它工作的位置。
15:40.866–15:42.048
I can change the branch
我可以變更分支
15:42.048–15:44.133
I can commit or push directly to GitHub.
我可以直接提交或推送到 GitHub。
15:44.133–15:45.533
Now it's not giving us any results
現在它沒有給我們任何結果
15:45.533–15:47.433
because it's not available online right now.
因為它目前無法在線上使用。
15:47.433–15:49.033
It's just locally on our computer.
它只是存在於我們電腦的本地端。
15:49.033–15:49.833
But you get the idea.
但你們應該明白我的意思。
15:49.833–15:52.033
And then we can view the changes which is making right now.
接著我們可以檢視目前正在進行的變更。
15:52.033–15:53.633
So we're just waiting for those to finish.
所以我們只是在等待那些完成。
15:53.633–15:55.422
So there's a lot that will start happening
所以當你真的開始寫程式碼時
15:55.422–15:56.700
when you actually write code.
會有很多事情開始發生。
15:56.700–15:58.729
And then I can also toggle open the terminal.
接著我也可以切換開啟終端機。
15:58.729–15:59.000
Right.
對。
15:59.000–16:01.233
So I can run commands or see what's happening there.
所以我可以執行命令或查看那裡發生了什麼事。
16:01.233–16:02.633
Let's go back into this view.
讓我們回到這個檢視畫面。
16:02.633–16:06.200
And then I can open this in any of the tools that are shown here.
接著我可以在這裡顯示的任何工具中開啟它。
16:06.200–16:09.555
So if I wanted to open this in cursor and view all of the code in IDE,
所以如果我想在 Cursor 中開啟它並在 IDE 中檢視所有程式碼,
16:09.555–16:11.233
I can press that button and do so.
我可以按下那個按鈕並執行。
16:11.233–16:12.200
So let's wait a second for it.
所以讓我們等它一下。
16:12.200–16:13.469
To finish writing this code,
完成撰寫這段程式碼,
16:13.469–16:17.486
you can see that it's starting to show me some of the files that we have inside of this folder,
你可以看到它開始顯示我們這個資料夾內的一些檔案,
16:17.486–16:19.633
and then we'll review it and see what we get okay.
然後我們來檢視一下,看看會得到什麼結果,好吧。
16:19.633–16:21.533
So just finished the first pass here.
所以這裡的第一輪操作剛剛完成。
16:21.533–16:24.800
It says that it built the multiplayer chess MVP and started locally.
它顯示已建構多人西洋棋 MVP 並在本機啟動。
16:24.800–16:26.501
And if I press on any of the links here,
如果我按下這裡的任何連結,
16:26.501–16:29.300
you'll notice that they'll actually open directly in Codex.
你會注意到它們實際上會直接在 Codex 中開啟。
16:29.300–16:31.266
So you can see that it's opened up right here.
所以你可以看到它就在這裡開啟了。
16:31.266–16:32.400
We kind of have this view.
我們大致上有這個視圖。
16:32.400–16:33.421
I can change the view,
我可以變更視圖,
16:33.421–16:35.066
make it large or small or whatever.
將其設為大或小,或其他任何大小。
16:35.066–16:38.200
So let's give a username maybe like Tim okay.
所以讓我們輸入一個使用者名稱,比如說 Tim,好吧。
16:38.200–16:39.400
And join the game.
然後加入遊戲。
16:39.400–16:41.733
And then let's try to find a game okay.
接著讓我們試著尋找一場遊戲,好吧。
16:41.733–16:43.800
And then I'm just going to open up another browser here.
然後我這裡要開啟另一個瀏覽器。
16:43.800–16:46.900
So you can see I can press this plus button go browser.
所以你可以看到我按下這個加號按鈕,進入瀏覽器。
16:46.900–16:48.833
We can actually manually type.
我們實際上可以手動輸入。
16:48.833–16:51.200
So localhost 3000 okay.
所以輸入 localhost 3000,好吧。
16:51.200–16:55.866
And let's see maybe we can change this as I don't know Joe or something.
讓我們看看,也許我們可以改成 Joe 或其他什麼名字。
16:55.866–16:56.251
Okay.
好的。
16:56.251–16:58.100
Join in and find a game.
加入並尋找一場遊戲。
16:58.100–17:01.033
And you can see that we find a game and then we can start playing.
你可以看到我們找到了一場遊戲,然後我們就可以開始玩了。
17:01.033–17:04.733
So I don't know let me try to move here and see if it moves on this side.
所以我不確定,讓我試著移動這裡,看看這側是否會移動。
17:04.733–17:05.800
And it looks like it's working.
看起來它正在運作。
17:05.800–17:07.327
So let's make a move like that
所以讓我們這樣做一步棋
17:07.327–17:09.427
I'm not going to play the full thing out,
我不會把整局棋下完,
17:09.427–17:10.700
but you guys get the idea
但你們應該明白
17:10.700–17:12.100
that it is indeed working.
它確實是有效的。
17:12.100–17:13.579
We have a track of all the moves.
我們有所有棋步的記錄。
17:13.579–17:14.700
We have some leaderboard.
我們還有一個排行榜。
17:14.700–17:16.391
And then maybe if I resign,
然後也許如果我認輸,
17:16.391–17:18.544
you can see now the ELO has updated
你可以看到現在 ELO 已經更新
17:18.544–17:21.312
and I want so says white wins by resignation
我想這裡說白方因認輸而獲勝
17:21.312–17:24.266
I mean pretty cool that that worked that fast.
我的意思是,這麼快就生效真的很酷。
17:24.266–17:27.266
Now within this browser view there's a few buttons you should be aware of.
現在在這個瀏覽器視圖中,有幾個按鈕你應該知道。
17:27.266–17:29.028
So if you have a look at this right hand side,
所以如果你看看這個右側,
17:29.028–17:31.133
you can see that you can actually take a screenshot.
你可以看到實際上可以截圖。
17:31.133–17:31.707
If you do that,
如果你這麼做,
17:31.707–17:33.000
it will save it to the clipboard.
它會將其保存到剪貼簿。
17:33.000–17:34.839
And then you can copy that screenshot
然後你可以複製該截圖
17:34.839–17:35.728
or paste it sorry,
或是貼上,抱歉,
17:35.728–17:39.524
into the chat in case you want to capture what's going on inside of this window
進入聊天視窗,以防你想捕捉這個視窗內的狀況
17:39.524–17:41.066
rather than doing it manually.
而不是手動操作。
17:41.066–17:44.900
And of course, ChatGPT and GPT here can do image generation.
當然,ChatGPT 和 GPT 這裡可以進行圖像生成。
17:44.900–17:46.000
It can view images.
它可以查看圖像。
17:46.000–17:47.933
So that's I mean it should be straightforward.
所以我的意思是,這應該很直觀。
17:47.933–17:49.066
You also can annotate.
你也可以進行註解。
17:49.066–17:53.200
So if you annotate this will allow you to select different HTML elements.
所以如果你進行註解,這將允許你選擇不同的 HTML 元素。
17:53.200–17:55.207
So for example maybe I'm going to select this
例如,也許我會選擇這個
17:55.207–17:57.866
and I can say something like I don't really like this title.
然後我可以說我其實不太喜歡這個標題。
17:57.866–17:59.953
I think we can make it look a lot better
我認為我們可以把它做得更好看
17:59.953–18:01.433
and put a chess logo okay.
並加上國際象棋的標誌,好的。
18:01.433–18:02.657
And then we can go here
然後我們可以這裡
18:02.657–18:06.533
and we can actually just update any of the values directly on screen.
我們實際上可以直接在螢幕上更新任何值。
18:06.533–18:09.183
I'm not going to do that because I would prefer just to prompt it,
我不會那樣做,因為我更喜歡直接提示它,
18:09.183–18:10.466
but I'm just going to run that.
但我只是要執行那個。
18:10.466–18:12.579
You can see we now have an annotation in chat
你可以看到我們現在在聊天中有了註解
18:12.579–18:14.633
and I can start adding other annotations.
我可以開始添加其他註解。
18:14.633–18:18.351
So maybe I'm going to say can we change the color of the board
所以也許我會說我們能不能改變棋盤的顏色
18:18.351–18:20.400
or have like a white or dark mode,
或者像白色或深色模式,
18:20.400–18:22.800
or maybe change the square colors?
或者也許改變方格的顏色?
18:22.800–18:25.033
I'm just giving random prompts going to show you this works.
我只是隨意給出提示,要向你展示這確實有效。
18:25.033–18:26.712
And you can see we have annotations
你可以看到我們有註解
18:26.712–18:28.333
and I can say like go or something.
我可以說像「go」之類的指令。
18:28.333–18:31.789
And now it's going to have the annotations that we made in the browser,
現在它會包含我們在瀏覽器中建立的註解,
18:31.789–18:35.100
and it's going to make those changes which are a lot more targeted.
並且會進行那些更具針對性的變更。
18:35.100–18:35.295
Okay.
好的。
18:35.295–18:37.833
So I just refresh because I want to see what this was doing live.
所以我重新整理,因為我想看看這個功能在即時運作的情況。
18:37.833–18:39.902
And you can see if I go here now and I refresh,
你可以看到,如果我現在到這裡並重新整理,
18:39.902–18:42.233
we've kind of changed what the board looks like.
我們已經稍微改變了棋盤的外觀。
18:42.233–18:43.498
Obviously we've disconnected.
顯然我們已經斷線了。
18:43.498–18:44.633
Now we're waiting to join.
現在我們正在等待加入。
18:44.633–18:46.355
We can see we have the kind of chess icon
我們可以看到類似西洋棋的圖示
18:46.355–18:49.133
and it's essentially followed the annotations we asked for.
它基本上遵循了我們要求的註解。
18:49.133–18:49.333
Okay.
好的。
18:49.333–18:54.733
So hopefully that gave you a bit of information on how the general kind of coding works inside of Codex.
所以希望這讓你對 Codex 內部的一般編碼方式有了一些了解。
18:54.733–18:56.033
It's very good for me.
這對我來說非常好用。
18:56.033–18:57.566
I really like this user interface,
我非常喜歡這個使用者介面,
18:57.566–18:59.100
and I like using this application.
我也喜歡使用這個應用程式。
18:59.100–19:01.948
And I mean, you can see that it gives us pretty good results,
我的意思是,你可以看到它給出了相當不錯的成果,
19:01.948–19:03.866
even though I didn't do anything crazy.
即使我沒有做任何瘋狂的操作。
19:03.866–19:06.066
So now let's move to a few more advanced features.
所以現在讓我們轉向幾個更進階的功能。
19:06.066–19:08.633
Let's start by having a look at some basic commands.
讓我們先來看看一些基本指令。
19:08.633–19:11.633
So commands are just anything that start with a slash.
指令就是任何以斜線開頭的東西。
19:11.633–19:16.600
And there's a ton of built in commands inside of cloud code or not cloud code inside of Codex.
在 Cloud Code 或 Codex 的非 Cloud Code 環境中,都有大量的內建指令。
19:16.600–19:18.188
I'm not going to go over all of them,
我不會逐一介紹所有指令,
19:18.188–19:20.466
but I'll show you a few that you should be aware of.
但會展示幾個你應該知道的指令。
19:20.466–19:24.633
So first, if we do slash, we're going to want to look at status.
首先,如果我們輸入斜線,我們應該查看狀態(status)。
19:24.633–19:26.866
Now status will just show you your usage limit.
狀態只會顯示你的使用量限制。
19:26.866–19:29.700
So you can see that for a five hour limit I'm at 98%.
你可以看到,對於五小時的限制,我已經使用了 98%。
19:29.700–19:32.433
And for my seven day limit I'm at 99%.
對於七天的限制,我已經使用了 99%。
19:32.433–19:34.400
It also gives me my context limit.
它也會顯示我的上下文(context)限制。
19:34.400–19:39.466
Now the context can be viewed using this little kind of circular icon down here.
現在,你可以使用這裡下方的這個小圓形圖示來查看上下文。
19:39.466–19:41.386
It won't give you a detailed breakdown,
它不會提供詳細的分解,
19:41.386–19:43.597
but you'll be able to see how much you've used,
但你能夠看到你使用了多少,
19:43.597–19:44.411
how much is left,
剩餘多少,
19:44.411–19:45.900
and how many tokens are there.
以及有多少 token。
19:45.900–19:48.059
Now, depending on the models you're using,
現在,根據你使用的模型,
19:48.059–19:49.498
the context size can change,
上下文大小可能會有所不同,
19:49.498–19:51.957
but this is something that's useful to be aware of
但這是一個值得注意的事項,
19:51.957–19:53.876
because if the context gets too large,
因為如果上下文變得太大,
19:53.876–19:55.375
which means you have too many,
這意味著你有太多,
19:55.375–19:57.054
you know, too much conversation,
你知道,太多的對話,
19:57.054–19:57.534
history,
歷史記錄,
19:57.534–19:58.434
tool calls, etc.,
工具呼叫等,
19:58.434–20:00.100
you will need to compact that.
你就需要將它們進行壓縮。
20:00.100–20:02.266
Now there's actually a command that can do this for you.
現在實際上有一個命令可以為你完成這項工作。
20:02.266–20:04.066
It's called slash compact.
它被稱為 /compact。
20:04.066–20:09.800
Now what slash compact will do is it will take everything that you have in your current conversation history.
現在,/compact 的作用是,它會將你目前對話歷史中的所有內容取出。
20:09.800–20:11.019
So all of the tool calls,
所以所有的工具呼叫,
20:11.019–20:11.811
all of the code,
所有的程式碼,
20:11.811–20:15.588
anything that it's understood in this whole conversation that we've had,
我們整個對話中它理解的任何內容,
20:15.588–20:17.477
and it will generate a summary of that
它會生成該內容的摘要,
20:17.477–20:21.133
and then add that to kind of a new, fresh conversation that you'll start.
然後將其添加到一個新的、全新的對話中,你將從那裡開始。
20:21.133–20:23.134
So you'll notice that after I did that,
所以你會注意到,在我執行那之後,
20:23.134–20:25.699
we now if we look at the what is it context use here,
如果我們現在查看這裡使用的上下文,
20:25.699–20:27.200
we've only used for percent.
我們只使用了百分之四。
20:27.200–20:29.100
So it's taken 22% there.
所以它在那裡佔用了 22%。
20:29.100–20:31.633
It's condensed it down given us a summary.
它將其壓縮並給我們一個摘要。
20:31.633–20:33.000
And now we can continue.
現在我們可以繼續。
20:33.000–20:35.499
Now it's not a great idea to compact super early
現在,在非常早期就進行壓縮並不是個好主意,
20:35.499–20:37.933
because you want to use up the context window.
因為你想要充分利用上下文視窗。
20:37.933–20:40.297
But as soon as you start getting to 70%,
但一旦你開始達到 70%
20:40.297–20:40.592
80%,
百分之八十
20:40.592–20:41.405
90% context,
90% 的上下文使用量
20:41.405–20:46.133
you typically want to compacted because you're going to get better results.
你通常會希望進行壓縮,因為這樣可以得到更好的結果。
20:46.133–20:48.856
Because as the model fills up with context,
因為隨著模型被上下文填滿
20:48.856–20:50.100
it performs worse.
它的表現會變差。
20:50.100–20:51.233
This is pretty well known.
這已經是相當眾所周知的事實。
20:51.233–20:52.900
I'm not going to go into all of the details.
我不會深入探討所有細節。
20:52.900–20:54.700
Just be aware that command exists.
只要知道這個指令存在即可。
20:54.700–21:00.300
You can use it in Codex will automatically compact for you if you're going to go past your context.
你可以在 Codex 中使用它,如果你即將超出上下文限制,它會自動為你進行壓縮。
21:00.300–21:02.707
So you may want to do it at a time that you decide,
所以你可能希望在你決定的時間點進行操作,
21:02.707–21:05.333
rather than waiting for it to do it automatically.
而不是等它自動處理
21:05.333–21:05.548
Now,
現在,
21:05.548–21:06.837
another thing that we can do,
我們還能做的另一件事,
21:06.837–21:08.073
which is sometimes useful,
有時這會很有用,
21:08.073–21:08.933
is we can fork this.
就是我們可以分叉(fork)這個專案。
21:08.933–21:11.086
Now you can see that if we type slash fork,
現在你可以看到,如果我們輸入斜線分叉(slash fork)
21:11.086–21:14.316
it will allow us to fork this chat into a local or new work tree,
它將允許我們將這個聊天分叉到本地或新的工作樹中,
21:14.316–21:16.533
which we're going to look at effectively.
這將是我們接下來要有效探討的內容。
21:16.533–21:21.449
What this will do is take everything that we've done and just create a complete copy of it,
這將把我們所做的所有事情取過來,並建立一個完整的副本,
21:21.449–21:26.033
so we can work in multiple agents at the same time without them having any conflict.
因此我們可以同時操作多個代理,而不會產生任何衝突。
21:26.033–21:29.654
So they both will kind of work in their own copy of the code base,
所以它們都會在各自複製的程式碼庫中進行操作,
21:29.654–21:33.100
and then they can go and kind of joy in everything together.
然後它們可以一起享受所有的成果。
21:33.100–21:34.700
Fix any of the merge conflicts.
修復任何合併衝突。
21:34.700–21:36.399
When we get to the final version again,
當我們回到最終版本時,
21:36.399–21:37.726
we'll look at fork in a minute,
我們稍後會來看看 fork(分支),
21:37.726–21:39.266
but that is a command to be aware of.
但這是一個需要知道的指令。
21:39.266–21:40.803
You have the fast mode feedback.
你有快速模式回饋。
21:40.803–21:42.100
We're not going to do that.
我們不會做那個。
21:42.100–21:45.866
A NIT goal and some other kind of modes that we'll look at here in a second.
一個 NIT 目標和一些其他類型的模式,我們稍後會在這裡看到。
21:45.866–21:46.933
Few last things to be aware of.
最後還有幾件事需要注意。
21:46.933–21:48.100
You can also pin chats.
你也可以固定聊天。
21:48.100–21:50.433
So if we want this chat to be available we can pin it.
所以如果我們希望這個聊天可用,我們可以固定它。
21:50.433–21:53.200
And then we can create new chats inside of the same project.
然後我們可以在同一個專案內建立新的聊天。
21:53.200–21:54.800
So you can see it's in chess game here.
所以你可以看到它現在在 chess game(西洋棋遊戲)裡。
21:54.800–22:00.033
And we can decide how we want to work and just have another agent either running at the same time or in a new chat.
我們可以決定如何工作,並讓另一個代理同時運行或在新的聊天中運行。
22:00.033–22:05.054
If we want to ask for something different and kind of forget the previous conversation history we had here.
如果我們想詢問不同的內容,並忘記之前在這裡的對話歷史。
22:05.054–22:05.755
Anyways,
總之,
22:05.755–22:07.333
let's go to a new chat.
讓我們進入新的聊天。
22:07.333–22:09.133
Now we're inside of chess game,
現在我們位於 chess game(西洋棋遊戲)內部,
22:09.133–22:11.902
and let's use a new mode that we haven't seen yet,
接著讓我們使用一個尚未見過的模式,
22:11.902–22:12.733
which is plan.
也就是 plan 模式。
22:12.733–22:14.389
So if we use slash plan,
所以如果我們輸入 /plan,
22:14.389–22:16.133
we can enable plan mode.
我們就能啟用 plan 模式。
22:16.133–22:17.733
You'll see that it's here and now.
你會看到它就在這裡。
22:17.733–22:18.563
With plan mode,
在 plan 模式下,
22:18.563–22:22.200
what we can do is we can ask this something a little bit more detailed.
我們可以做的是,我們可以問它一些更詳細的問題。
22:22.200–22:23.800
We can describe what we want.
我們可以描述我們想要的功能。
22:23.800–22:30.233
And Codex will prompt us with different questions and kind of clarifying details before it goes and executes the plan.
Codex 會在執行計畫之前,透過提出不同的問題來釐清細節。
22:30.266–22:31.362
Pretty straightforward,
相當直接,
22:31.362–22:34.400
but typically you want to make a plan before you do something too complex.
但通常在做複雜的事情之前,你還是應該先擬定計畫。
22:34.400–22:35.771
So really for our chess game,
所以對於我們的西洋棋遊戲來說,
22:35.771–22:37.486
we should have started in plan mode,
我們本來應該從 plan 模式開始,
22:37.486–22:38.229
built the plan,
建立計畫,
22:38.229–22:39.200
and then execute it.
然後再執行它。
22:39.200–22:42.100
I was just saving it for later because it's a little bit more complex.
我只是把它留到後面才用,因為它稍微複雜一點。
22:42.100–22:44.933
So now maybe I want to expand this chess game.
所以現在也許我想擴展這個西洋棋遊戲。
22:44.933–22:45.936
I want to have puzzles.
我想要有謎題功能。
22:45.936–22:47.200
I want to have a leaderboard.
我想要有排行榜。
22:47.200–22:48.643
I want to have maybe a big UI,
我想要有一個大型的 UI,
22:48.643–22:50.400
I want to have whatever accounts.
我想要有各種帳號。
22:50.400–22:52.400
So let's start generating a plan for that.
所以讓我們開始為那個生成一個計畫。
22:52.400–22:54.700
I want to expand our chess game.
我想要擴展我們的西洋棋遊戲。
22:54.700–22:58.643
I want to have a better landing page so that a user can see their stats,
我想要有一個更好的登陸頁面,讓使用者可以看到他們的統計數據,
22:58.643–23:03.900
and they have the ability to either play a game or play a puzzle or go to like a practice board.
並且他們有能力選擇玩遊戲、玩謎題或前往練習棋盤。
23:03.900–23:06.132
I want to generate a few different game modes,
我想要生成幾種不同的遊戲模式,
23:06.132–23:09.866
and I want to really polish this up and make it kind of like a Chess.com clone.
並且我想要真正完善這個功能,讓它有點像 Chess.com 的複製品。
23:09.866–23:11.733
Let's start with just the MVP features.
讓我們從最基本的可行產品(MVP)功能開始。
23:11.733–23:13.133
Can you generate a plan for this?
你能為這個生成一個計畫嗎?
23:13.133–23:15.734
Ask me any questions you need to okay,
請提出任何你需要的問題,好的,
23:15.734–23:18.000
so let's go here and press enter.
所以讓我們在這裡按下 Enter。
23:18.000–23:21.066
And because it's in plan mode it's going to map everything out.
因為它處於計畫模式,它將規劃一切。
23:21.066–23:26.133
And it should start asking us some questions and prompting us so that it can generate that for us.
它應該開始向我們提出一些問題並提示我們,以便它為我們生成那個。
23:26.133–23:26.400
Okay.
好的。
23:26.400–23:29.433
So we can see that it's now prompting us with a few questions in the bottom here.
所以我們可以看到它現在在底部向我們提出了一些問題。
23:29.433–23:31.356
So it says for the first MVP pass,
所以它說對於第一個 MVP 版本,
23:31.356–23:34.233
which mode set should the landing page launch?
登陸頁面應該啟動哪種模式集?
23:34.233–23:35.559
We can have add bot game,
我們可以添加機器人遊戲,
23:35.559–23:38.343
add time modes or core three ship the landing page,
添加時間模式或核心三項功能,推出登陸頁面,
23:38.343–23:38.939
live game,
即時遊戲,
23:38.939–23:40.066
daily star puzzles.
每日星星謎題。
23:40.066–23:41.033
Let's go with that.
我們就選這個吧。
23:41.033–23:43.400
How should the user stats work for an MVP?
對於 MVP(最小可行產品),用戶數據應該如何運作?
23:43.400–23:44.400
Let's just go.
我們就直接開始吧。
23:44.400–23:45.196
Username.
使用者名稱。
23:45.196–23:46.433
Profiles okay.
個人資料沒問題。
23:46.433–23:47.360
Username.
使用者名稱。
23:47.360–23:47.978
Login.
登入。
23:47.978–23:49.318
Expand stats.
擴展數據。
23:49.318–23:49.866
Okay.
好的。
23:49.866–23:52.466
How deep should the puzzle mode be an MVP?
對於 MVP,謎題模式的深度應該達到什麼程度?
23:52.466–23:54.633
Let's just do.
我們就直接做吧。
23:54.633–23:54.900
Yes.
是的。
23:54.900–23:58.533
Small bundled puzzled library that looks good and that we continue.
一個看起來不錯的小型捆綁謎題庫,我們可以繼續進行。
23:58.533–23:59.733
Now while it's doing this,
現在當它執行這個時,
23:59.733–24:01.969
also mention that if you open up the sidebar here,
順便提一下,如果你打開這裡的側邊欄,
24:01.969–24:03.333
you'll see a few more options.
你會看到更多選項。
24:03.333–24:05.845
Because we're in this kind of coding environment,
因為我們處於這種編碼環境中,
24:05.845–24:07.400
we can now view all of the files.
我們現在可以查看所有檔案。
24:07.400–24:08.370
If we want to look at this,
如果我們想查看這個,
24:08.370–24:09.433
we see we have the database.
我們可以看到資料庫。
24:09.433–24:11.100
We can open up the server right.
我們可以開啟伺服器,對吧。
24:11.100–24:12.430
And you can modify the code,
你可以修改程式碼,
24:12.430–24:15.900
or you can add comments directly inside of here or tag different things.
或者你可以直接在這裡新增註解或標記不同的項目。
24:15.900–24:18.300
And now you'll see that it's generating the plan.
現在你會看到它正在產生計畫。
24:18.300–24:20.466
I believe the plan will be stored in this repo.
我相信這個計畫會儲存在這個倉庫裡。
24:20.466–24:22.002
I might just need to refresh,
我可能只需要重新整理,
24:22.002–24:23.666
but we should be able to view it.
但我們應該能夠查看它。
24:23.666–24:25.514
So if I want to look at the plan here,
所以如果我想在這裡查看計畫,
24:25.514–24:26.917
you can see we can open it up
你可以看到我們可以開啟它,
24:26.917–24:29.500
and it gives us everything that needs to be done.
它會提供我們所有需要完成的事項。
24:29.500–24:29.900
Okay.
好的。
24:29.900–24:31.929
So I could just implement this plan right
所以我可以直接實作這個計畫,
24:31.929–24:33.600
and just start running with that.
然後直接開始執行。
24:33.600–24:35.186
But what I want to show you now
但現在我想展示給你們看的
24:35.186–24:37.235
is another mode that's super useful,
是另一個非常實用的模式,
24:37.235–24:40.540
that is going to get things done a lot more efficiently for us
它將能讓我們更高效地完成工作,
24:40.540–24:42.919
without us having to keep approving things
而無需我們不斷批准事項
24:42.919–24:45.100
or prompting the model multiple times.
或是多次提示模型。
24:45.100–24:47.033
And that is called goal.
這被稱為目標(goal)。
24:47.033–24:50.733
So there is this slash command called slash goal.
所以有一個叫做 /goal 的斜線指令。
24:50.733–24:52.053
Now if we use this
現在如果我們使用這個
24:52.053–24:54.633
let me just actually type it out.
讓我實際把它打出來。
24:54.633–24:57.712
What will happen is that codex will run
接下來會發生的情況是,Codex 會執行
24:57.712–24:59.733
until a goal is achieved.
直到目標達成。
24:59.733–25:01.381
Now this is kind of that agent loops
現在這有點像是代理迴圈
25:01.381–25:03.199
that you may have heard about recently
你最近可能聽過的
25:03.199–25:04.800
that everyone's talking about.
大家都在討論的那種代理循環。
25:04.800–25:06.033
They have that built in now.
他們現在內建了這個功能。
25:06.033–25:07.843
So what we can do is we can say,
所以我們能做的就是,我們可以說,
25:07.843–25:09.200
hey, here's the goal.
嘿,這裡是目標。
25:09.200–25:11.403
And we just set a high level objective,
我們只是設定一個高層次的目標,
25:11.403–25:12.849
and Codex will keep going
而 Codex 會繼續執行
25:12.849–25:14.433
until the goal is achieved.
直到目標達成。
25:14.433–25:15.138
So it will plan,
所以它會進行規劃,
25:15.138–25:15.843
it will execute
它會執行
25:15.843–25:18.066
and then it will review if it's achieved the goal.
然後它會檢視是否達成了目標。
25:18.066–25:18.974
And if it hasn't,
如果沒有達成,
25:18.974–25:20.400
it will just keep running.
它就會繼續執行。
25:20.400–25:22.232
So it's not just going to do one pass
所以它不會只做一次嘗試
25:22.232–25:24.000
or implement one set of features.
或是只實作一組功能。
25:24.000–25:26.300
It will go until the goal is achieved.
它會持續執行,直到目標達成。
25:26.300–25:28.283
Now, in order to use this effectively,
現在,為了有效使用這項功能,
25:28.283–25:29.584
you need to set a good goal
你需要設定一個良好的目標
25:29.584–25:32.033
and the conditions for the goal to be achieved.
以及目標達成所需的條件。
25:32.033–25:32.893
Now, in our case,
現在,在我們的情況下,
25:32.893–25:34.122
we already have the plan
我們已經有了計畫
25:34.122–25:35.658
so we can effectively just say
所以我們可以直接說
25:35.658–25:38.300
keep running until the entire plan is implemented.
持續執行,直到整個計畫實作完畢。
25:38.300–25:40.333
It will then run check if the plan is done.
接著它會執行檢查,確認計畫是否完成。
25:40.333–25:40.936
If it's not,
如果沒有,
25:40.936–25:41.900
it will keep going.
它會繼續執行。
25:41.900–25:42.425
If it is,
如果完成了,
25:42.425–25:43.400
it will finish.
它就會結束。
25:43.400–25:46.327
So this will allow it to run for a long period of time,
因此,這將允許它長時間執行,
25:46.327–25:48.233
which also will use a lot of usage.
這也會消耗大量的使用量。
25:48.233–25:49.733
So keep that in mind.
所以請記住這一點。
25:49.733–25:51.627
So for the goal I'm going to say okay,
所以關於目標,我會說好的,
25:51.627–25:53.899
keep running and implement the entire plan
持續執行並實作整個計畫
25:53.899–25:55.666
until the plan is fully finished.
直到計畫完全完成。
25:55.666–25:56.970
Everything is tested,
所有功能都已測試過,
25:56.970–25:58.274
everything is working
一切運作正常,
25:58.274–26:00.633
and we are confident to deploy this.
我們有信心進行部署。
26:00.633–26:02.149
Again, not the best prompt in the world,
再次強調,這並非世界上最好的提示詞,
26:02.149–26:03.666
but I'm just showing you the usage here.
但我只是在此展示其用法。
26:03.666–26:05.862
And now that the plan is enabled,
現在計畫已啟用,
26:05.862–26:07.066
we have goal set.
我們已設定目標。
26:07.066–26:07.967
I can press enter
我可以按下 Enter 鍵,
26:07.967–26:10.604
and you can see that it's going to pursue this goal
你會看到它將追求此目標
26:10.604–26:11.633
and start running.
並開始執行。
26:11.633–26:13.466
And we can view this is the goal.
我們可以查看這個目標。
26:13.466–26:15.466
And it's going through all of the different steps.
它正在執行所有不同的步驟。
26:15.466–26:17.550
And it will just be this infinite loop
這將是一個無限循環,
26:17.550–26:19.666
which can take a very long time to run.
執行起來可能會非常耗時。
26:19.666–26:19.933
All right.
好的。
26:19.933–26:21.302
So the goal has just finished
目標剛剛完成,
26:21.302–26:22.900
it built this application for us.
它為我們構建了這個應用程式。
26:22.900–26:24.437
I don't know if it's fully working,
我不確定它是否完全正常運作,
26:24.437–26:25.497
but you guys get the idea
但你們應該明白這個概念,
26:25.497–26:26.200
and it's done.
並且任務已完成。
26:26.200–26:28.339
So now let's have a look at some more features
那麼現在讓我們來看看更多功能
26:28.339–26:29.933
and start going through it okay.
並開始逐步操作,好嗎?
26:29.933–26:31.000
So first things first.
首先,讓我們從最基本的開始。
26:31.000–26:32.560
If you look at any of these chats
如果你查看這些聊天記錄中的任何一個
26:32.560–26:34.600
you have the ability to right click them.
你可以右鍵點擊它們。
26:34.600–26:35.810
You can pin them
你可以將它們固定
26:35.810–26:36.833
rename them.
重新命名它們。
26:36.833–26:39.563
You can also fork them into a local version
你也可以將它們分叉為本地版本
26:39.563–26:40.733
or a new work tray.
或新的工作樹。
26:40.733–26:43.733
Now I want to really briefly discuss what a work tree is,
現在我想簡短討論一下什麼是工作樹,
26:43.733–26:45.885
because it's a little bit complicated,
因為這有點複雜
26:45.885–26:48.266
and we'll save the full usage for a part two.
我們將把完整的使用說明留到第二部分。
26:48.266–26:51.100
So let me know if you guys want to see that in the comments down below.
所以請在下方評論區告訴我,你們是否希望看到那部分內容。
26:51.100–26:53.866
Now, if I try to open a new project here, right.
現在,如果我嘗試在這裡開啟一個新專案,對吧。
26:53.866–26:54.700
So I've gone sorry.
所以我剛才說錯了,抱歉。
26:54.700–26:55.266
New chat.
新聊天。
26:55.266–26:56.501
Okay, so I want new chat.
好的,所以我想要新聊天。
26:56.501–26:58.033
And then I selected Chess Game.
然後我選擇了棋局遊戲。
26:58.033–27:00.839
And then what I did is rather than selecting work locally,
然後我所做的是,與其選擇在本地運行,
27:00.839–27:02.066
I selected new work tree.
我選擇了新建工作樹。
27:02.066–27:05.300
I have the ability to create a local environment.
我有能力建立本地環境。
27:05.300–27:10.487
Now the reason this is important is that if you want to run parallel agents at the same time,
現在這之所以重要,是因為如果你想同時執行平行代理程式,
27:10.487–27:13.806
they should be working in their own copy of the repository
他們應該在各自獨立的倉庫副本中工作,
27:13.806–27:15.533
or the project that you have.
或是你擁有的專案副本中工作。
27:15.533–27:17.076
If they work on the same files,
如果他們操作相同的檔案,
27:17.076–27:18.250
there can be conflicts
可能會產生衝突,
27:18.250–27:21.583
because they're touching the same information at the same time,
因為他們同時接觸相同的資訊,
27:21.583–27:22.666
and that's not good.
這是不好的。
27:22.666–27:25.466
So the solution to this is a work tree.
因此,解決這個問題的方案是工作樹(work tree)。
27:25.466–27:27.466
This is provided by git.
這是由 git 提供的功能。
27:27.466–27:29.682
Again it's a little bit complicated to setup
同樣地,設定上稍微有點複雜,
27:29.682–27:31.000
and a bit confusing to use.
使用上也略顯令人困惑。
27:31.000–27:32.933
So I'm not going to go through all of the details.
所以我不會詳細說明所有細節。
27:32.933–27:36.396
But if you do want to run parallel agents at the same time,
但如果你確實想同時執行平行代理程式,
27:36.396–27:38.312
you have multiple tasks going,
並且有多個任務在進行,
27:38.312–27:39.933
this is what you would use.
這就是你會使用的功能。
27:39.933–27:42.024
You have to configure the environment first,
你必須先設定環境
27:42.024–27:43.729
which you can ask Codex to help you do,
你可以要求 Codex 協助你完成,
27:43.729–27:47.800
and then you can change the branches and stuff in order to work on the different features.
然後你就可以切換分支等內容,以便開發不同的功能。
27:47.800–27:49.743
And now you'll have different agents
現在你將擁有不同的代理程式
27:49.743–27:52.125
because you can run multiple at the same time,
因為你可以同時執行多個代理程式,
27:52.125–27:54.633
working in these kind of copies of the same repo.
在這些相同程式庫的副本中進行工作。
27:54.633–27:56.929
Again, this is a more advanced developer feature,
再次強調,這是一個進階開發者功能,
27:56.929–27:58.800
so I'm not going to dive into it too much.
所以我不會深入探討太多細節。
27:58.800–28:01.133
Now, another feature that's somewhat related to this.
現在,另一個與此 somewhat 相關的功能。
28:01.133–28:02.733
Let's go back to local copy.
讓我們回到本機副本。
28:02.733–28:05.700
Here is this tool called Slash Review.
這裡有一個叫做 Slash Review 的工具。
28:05.700–28:07.109
Now this is a code review
現在這是一個程式碼審查功能,
28:07.109–28:12.183
that can automatically compare any changes that have been made in the current session
它可以自動比較目前工作階段中做出的任何變更,
28:12.183–28:13.800
against what's in GitHub.
並與 GitHub 上的內容進行對比。
28:13.800–28:14.266
Okay.
好的。
28:14.266–28:16.500
So if I go to maybe this right now
所以如果我現在進入這裡
28:16.500–28:18.047
and I go slash review,
然後輸入 slash review,
28:18.047–28:22.000
you can see that I can review this against a base branch.
你可以看到我可以在基準分支上進行審查。
28:22.000–28:24.459
So a branch in git if you're familiar with that
也就是如果你熟悉 git 的話,
28:24.459–28:26.400
or review any uncommitted changes.
或者審查任何未提交的變更。
28:26.400–28:27.922
So if I go slash review right
所以如果我輸入 slash review 然後
28:27.922–28:29.575
and then uncommitted changes
選擇未提交的變更
28:29.575–28:33.148
it's going to start looking at all of the changes that it made here
它將開始檢視它在此處做出的所有變更
28:33.148–28:34.868
and automatically review them
並自動進行審查
28:34.868–28:37.911
to make sure that they're good before we push them to get
以確保在推送之前它們是正確的
28:37.911–28:39.300
or before we commit them.
或在提交之前。
28:39.300–28:41.517
This is a pretty useful feature that Codex has,
Codex 有一個相當實用的功能,
28:41.517–28:43.507
and this is something you should always do
這是你應該在進行大量變更後
28:43.507–28:45.553
after you've done a large amount of changes
在推送至遠端儲存庫之前
28:45.553–28:47.600
before you push them to remote repository.
在將它們推送到遠端儲存庫之前
28:47.600–28:48.682
And if you don't know what that means,
如果你不知道這代表什麼,
28:48.682–28:49.066
don't worry.
別擔心。
28:49.066–28:50.310
But if you're a developer,
但如果你是開發人員,
28:50.310–28:53.025
you'll understand the value of having a built in shortcut
你會明白擁有一個內建快捷鍵的價值,
28:53.025–28:55.433
that will do all of those passes and checks for you.
它會為你執行所有這些檢查和驗證。
28:55.433–28:57.311
Okay, so you can see that it's done the review
好的,你可以看到它已經完成了審查,
28:57.311–28:58.833
and it's given us some comments now.
並且現在給了一些評論。
28:58.833–28:59.601
And it said, hey,
它說,嘿,
28:59.601–29:02.266
these are errors that I found after doing the code review.
這些是我在進行程式碼審查後發現的錯誤。
29:02.266–29:02.545
Right.
對。
29:02.545–29:04.266
So let me go ahead and fix them okay.
所以讓我繼續修復它們,好吧。
29:04.266–29:06.172
So let's move to the next feature
所以讓我們進入下一個功能,
29:06.172–29:07.900
which is memory and context.
也就是記憶體和上下文。
29:07.900–29:09.040
Now this is less maybe,
現在這可能比較少見,
29:09.040–29:10.120
I don't know demo wise
就示範來說,我不確定
29:10.120–29:11.980
and more me explaining how this works
以及更多由我來解釋它是如何運作的
29:11.980–29:13.900
because I want you to understand this.
因為我希望你們能理解這一點。
29:13.900–29:16.833
So if I make a new chat right here okay.
所以,如果我在這裡建立一個新的聊天,好的。
29:16.833–29:17.757
And we go into this
然後我們進入這個
29:17.757–29:19.050
and I'm working locally,
並且我在本地端進行操作,
29:19.050–29:20.600
I want you to see something.
我希望你們看到一些東西。
29:20.600–29:22.645
What did I do in my last session
我在上一個工作階段中做了什麼
29:22.645–29:25.200
when I was working on the chess game?
當我在處理西洋棋遊戲時?
29:25.200–29:28.140
Now, the reason why I'm going to run this prompt
現在,我之所以要執行這個提示
29:28.140–29:29.648
and show you the result,
並向你們展示結果,
29:29.648–29:31.533
is that you need to understand
是因為你們需要理解
29:31.533–29:34.548
that by default, Codex doesn't remember things
預設情況下,Codex 不會記住
29:34.548–29:36.433
that you worked on in the past.
你們過去所處理的事情。
29:36.433–29:38.104
Anytime you create a new chat,
每次你建立新的聊天時,
29:38.104–29:42.183
what it's doing is reviewing anything that you have in your current repo,
它所做的就是檢視你目前儲存庫中的任何內容,
29:42.183–29:44.256
kind of trying to load in information
有點像是在嘗試載入資訊
29:44.256–29:46.328
and find any context that's relevant
並尋找任何相關的上下文
29:46.328–29:47.866
and then give you an answer.
然後給你一個答案。
29:47.866–29:50.933
But by default it doesn't remember everything that you did.
但預設情況下,它不會記住你所做的所有事情。
29:50.933–29:53.500
So it won't have the full conversation history.
所以它不會有完整的對話歷史。
29:53.500–29:55.902
It won't know maybe preferences that you told it,
它可能不知道您告訴它的偏好設定,
29:55.902–29:57.074
and it can forget things
而且它可能會遺忘某些事情,
29:57.074–29:59.100
because it doesn't remember by default.
因為預設情況下它不會記住這些內容。
29:59.100–30:01.942
The only reason this actually just gave me a response
這實際上只給我回應的唯一原因
30:01.942–30:04.397
is because it looked inside of my project here
是因為它查看了我目前所在的專案,
30:04.397–30:05.366
that I'm inside of
也就是我目前所在的專案,
30:05.366–30:07.433
and was able to find that information.
並成功找到了相關資訊。
30:07.433–30:08.825
But if I go to a new chat
但如果我開啟新的對話,
30:08.825–30:09.366
and I say
並說
30:09.366–30:10.990
and I remove the project,
然後移除專案,
30:10.990–30:13.400
what did I work on for my chess game?
「我為棋類遊戲做了什麼?」
30:13.400–30:16.031
And I just ask it something really vague like that,
如果我只是提出這樣非常模糊的問題,
30:16.031–30:17.200
it shouldn't know.
它應該不會知道。
30:17.200–30:18.640
At least I don't think it will know
至少我認為它不會知道,
30:18.640–30:20.833
because it's not going to have any of that context.
因為它不會擁有這些上下文資訊。
30:20.833–30:22.503
The reason why I'm mentioning this
我提到這一點的原因是,
30:22.503–30:23.942
is that you need to understand
是因為你需要了解
30:23.942–30:25.670
that anytime you make a new session,
每當您建立新的工作階段時,
30:25.670–30:27.800
you're effectively starting from scratch.
您實際上都是從頭開始。
30:27.800–30:29.908
And anything that you want this to know,
而任何你希望它知道的內容,
30:29.908–30:31.633
it has to already exist as a file.
都必須已經以檔案形式存在。
30:31.633–30:33.405
It has to be saved persistently
它必須被持久化儲存
30:33.405–30:34.700
so Codex can read it in.
這樣 Codex 才能讀取它。
30:34.700–30:35.688
And you can see here
你可以在這裡看到
30:35.688–30:39.333
that it's not able to really find the information very well for me here.
它實際上無法很好地為我找到資訊。
30:39.333–30:41.466
And it has to actually go and look through
而且它必須實際上去查看
30:41.466–30:44.038
the different conversation history and threads
不同的對話歷史和線程
30:44.038–30:46.233
to find this information so it can find it.
來找到這些資訊,這樣它才能找到。
30:46.233–30:47.945
But the only reason it can do that
但唯一能這樣做的原因
30:47.945–30:50.418
is because it's searching through the threads
是因為它正在搜尋線程
30:50.418–30:51.433
and it's very slow.
而且速度非常慢。
30:51.433–30:51.868
And again,
再次強調,
30:51.868–30:53.900
it's not going to remember everything by default.
預設情況下它不會記住所有內容。
30:53.900–30:56.138
The reason why I'm mentioning this
我提到這一點的原因
30:56.138–30:58.145
is that you can fix this problem
是因為你可以透過建立名為 agent 的檔案來解決這個問題。
30:58.145–31:01.233
by creating something called an agent dot file.
透過建立名為 agent 的檔案
31:01.233–31:03.429
Now this is something that's common
你的程式碼庫工具中
31:03.429–31:05.259
in all of your code base tools,
基於 CLI 的工具常見的功能,
31:05.259–31:06.284
CLI based tools,
基於命令列介面的工具
31:06.284–31:07.455
whatever AI agents
無論是什麼樣的 AI 代理程式
31:07.455–31:10.164
where you can make effectively a memory file
您可以在其中建立一個實質上的記憶檔案
31:10.164–31:12.726
that will always be loaded into the prompt
該檔案在開始使用代理程式之前
31:12.726–31:15.800
or into the model before you start working with it.
都會被載入到提示詞或模型中。
31:15.800–31:17.678
Now this is a really good file to create,
現在建立一個這樣的檔案非常好,
31:17.678–31:20.125
especially when you're working on larger projects
特別是在您處理多人合作的大型專案時
31:20.125–31:21.206
with multiple people,
因為您可以儲存偏好設定,
31:21.206–31:22.914
because you can store preferences,
或是您想要使用的不同工具或技術堆疊。
31:22.914–31:25.200
different tools or stacks that you want to use.
不同工具或技術堆棧,這些是你想要使用的。
31:25.200–31:26.494
I wouldn't say credentials,
但您可以儲存重要的資訊
31:26.494–31:28.165
but you can store just important info
這樣您就不需要反覆告訴模型這些內容。
31:28.165–31:31.433
that you don't want to have to keep telling the model over and over again.
這些是你不想一遍又一遍地告訴模型的事情。
31:31.433–31:32.449
So for example,
我可以這樣告訴它。
31:32.449–31:33.466
I can tell this.
我希望您建立一個代理程式檔案
31:33.466–31:35.659
I would like you to create an agent file
包含這個專案的所有慣例,
31:35.659–31:38.263
with all of the conventions for this project,
特別是我們使用的技術堆疊,
31:38.263–31:40.936
specifically the tech stack that we're using,
特別是我們正在使用的技術堆棧,
31:40.936–31:41.690
how to run it,
以及我們到目前為止的設定。
31:41.690–31:43.900
and what we've set up so far.
以及我們到目前為止所設置的內容。
31:43.900–31:44.400
Okay.
好的。
31:44.400–31:45.844
And what this will do now
而現在這會做什麼
31:45.844–31:48.833
is create a new file for us called agents.
就是為我們建立一個名為 agents 的新檔案。
31:48.833–31:50.000
You'll see it in a second.
你馬上就會看到。
31:50.000–31:52.433
It's automatically making it starts with all capitals.
它會自動建立,檔名開頭全是大寫。
31:52.433–31:55.666
And it's going to fill this file with important info then.
接著它會將重要資訊填入這個檔案。
31:55.666–31:57.372
Now we're never going to forget
現在我們永遠不會忘記
31:57.372–31:58.816
or Codex will never forget
或者 Codex 永遠不會忘記
31:58.816–32:02.097
because this is by default automatically load it into Codex
因為預設情況下,它會自動將此載入 Codex
32:02.097–32:04.066
anytime we make a new conversation.
每當我們建立新對話時。
32:04.066–32:05.765
So let's give this a second to make the file
所以讓我們給它一點時間來建立檔案
32:05.765–32:06.833
and see what it looks like.
看看它長什麼樣子。
32:06.833–32:07.984
So let's open this up
所以讓我們開啟這個檔案
32:07.984–32:10.963
and you can see that it gives us project conventions,
你可以看到它提供了專案規範,
32:10.963–32:11.640
direction,
方向,
32:11.640–32:12.317
tech stack,
技術堆疊,
32:12.317–32:13.061
how to run it,
如何執行它,
32:13.061–32:13.433
etc..
等等。
32:13.433–32:15.798
So now if we make a new conversation,
所以現在如果我們建立新對話,
32:15.798–32:16.114
I go,
我會說,
32:16.114–32:18.400
what are the project conventions?
專案規範是什麼?
32:18.400–32:22.066
It's not going to have to search through a bunch of files to find this.
就不需要搜尋一堆檔案來找到這個了。
32:22.066–32:25.547
It can just get it directly from its kind of system info now,
它現在可以直接從其系統資訊中獲取,
32:25.547–32:28.033
because it will have been loaded in and MD.
因為它已經載入到 MD 中了。
32:28.033–32:30.433
So you can see it just immediately gives us the result.
所以你可以看到它立即給出了結果。
32:30.433–32:31.994
It doesn't need to read anything
它不需要讀取任何內容
32:31.994–32:35.233
because it was already loaded in when we started the conversation.
因為在我們開始對話時它已經載入好了。
32:35.233–32:36.626
If we look at the context,
如果我們查看上下文,
32:36.626–32:39.944
you can see the context is slightly higher usage than normal
你會發現上下文的使用量比平常略高
32:39.944–32:42.500
because it's started by loading that file.
因為它是透過載入該檔案啟動的。
32:42.500–32:43.800
I hope that that makes sense to you.
我希望這讓你明白了。
32:43.800–32:46.440
I know that's not the best explanation possible,
我知道這不是最好的解釋,
32:46.440–32:49.081
but anything that you want to be kind of long term,
但任何你想要長期保留的,
32:49.081–32:52.043
persistent info that's going to be used all of the time,
持久信息,這些信息將被一直使用,
32:52.043–32:54.104
you want to put it in this agents MD file
你都想把它放在這個代理的 MD 檔案中
32:54.104–32:56.100
and tell Codex to create that for you.
並告訴 Codex 為你建立它。
32:56.100–33:02.500
And you can continually update this to improve the performance of the model you use in a particular project.
你可以持續更新它,以改善你在特定專案中使用的模型效能。
33:02.500–33:02.855
Okay,
好的,
33:02.855–33:04.558
so that is kind of the agents,
所以這就是代理的
33:04.558–33:06.900
the in memory info that you need to know.
你需要知道的記憶體中資訊。
33:06.900–33:09.200
And the last thing we'll look at is scheduled tasks.
而我們最後要看的則是排程任務。
33:09.200–33:11.142
Now I'm not going to actually create these,
現在我不會實際建立這些,
33:11.142–33:13.137
but I'm just going to mention that they exist
但我只是要提到它們的存在,
33:13.137–33:15.726
just like cloud code or other tools that you may have used,
就像雲端程式碼或其他你可能使用過的工具一樣,
33:15.726–33:18.585
you can create scheduled tasks that run automatically for you,
你可以建立自動執行的排程任務,
33:18.585–33:19.933
assuming your computer is on.
前提是你的電腦是開機狀態。
33:19.933–33:21.402
So you can make a daily brief
所以你可以設定每日摘要,
33:21.402–33:23.765
where every morning it opens your computer,
讓它每天早上啟動你的電腦,
33:23.765–33:26.000
searches the news and gives you some info.
搜尋新聞並提供你一些資訊。
33:26.000–33:27.120
You can do a weekly review
你可以進行每週回顧,
33:27.120–33:29.200
where it tells you all the things you worked on.
讓它告訴你所有你處理過的事情。
33:29.200–33:30.413
You can do project monitor
你可以進行專案監控,
33:30.413–33:31.737
where if something changes,
如果有任何變更,
33:31.737–33:32.233
we do this.
我們就執行這個動作。
33:32.233–33:33.542
So if I do create via chat,
所以如果我透過聊天建立,
33:33.542–33:34.228
for example,
例如,
33:34.228–33:37.346
I can make it to set up a scheduled task for me automatically,
我可以讓它自動幫我設定排程任務,
33:37.346–33:39.466
or I can go to templates and I can pick one.
或者我可以前往範本並選擇其中一個。
33:39.466–33:40.562
So maybe like this,
所以也許像這樣,
33:40.562–33:41.933
this is what I want to do.
這就是我想要做的事情。
33:41.933–33:45.833
I want to run it in this chat or in a work tree.
我想在這個聊天或工作樹中執行它。
33:45.833–33:47.266
I want to in this project.
我想在這個專案裡。
33:47.266–33:49.300
I want it to repeat at this time.
我想讓它在這個時間點重複執行。
33:49.300–33:50.800
Then this is the model that I want to use.
然後這就是我想使用的模型。
33:50.800–33:51.042
Okay.
好的。
33:51.042–33:52.400
So again you can make these.
所以再次強調,你可以建立這些。
33:52.400–33:53.699
You can have them set to run
你可以將它們設定為執行
33:53.699–33:56.889
and you can set this up to kind of automatically do things for you,
並且你可以設定這個來自動為你執行某些任務,
33:56.889–33:59.133
which is useful if you want some automations.
如果你需要一些自動化功能,這會很有用。
33:59.133–34:00.428
But for me I don't really need any.
但對我來說,我真的不需要任何自動化。
34:00.428–34:01.833
So I don't have those setup as of now.
所以我目前沒有設定那些。
34:01.833–34:03.104
And then of course,
然後當然,
34:03.104–34:05.727
you can search through all of your chats
你可以搜尋你所有的聊天記錄
34:05.727–34:07.475
and a bunch of other stuff,
以及一大堆其他東西,
34:07.475–34:08.667
and we can go crazy
我們可以玩得很瘋
34:08.667–34:10.733
and we can go to add MCP servers.
我們可以前往新增 MCP 伺服器。
34:10.733–34:12.333
We can control the browser use.
我們可以控制瀏覽器使用。
34:12.333–34:13.630
We can do computer use,
我們可以進行電腦使用,
34:13.630–34:14.039
hooks,
鉤子,
34:14.039–34:14.858
connections,
連線,
34:14.858–34:15.950
git environments,
git 環境,
34:15.950–34:16.633
work trees.
工作樹。
34:16.633–34:17.770
There is a lot more to go over,
還有更多內容需要介紹,
34:17.770–34:19.333
but I'm going to save that for a part two.
但我會留到第二部分再講。
34:19.333–34:23.586
If you guys let me know in the comments that you want to see an advanced version of this
如果你們在評論中告訴我,你們想看這個的進階版本
34:23.586–34:25.348
that is going to wrap up this video,
這就結束了本影片,
34:25.348–34:27.961
that was a pretty comprehensive overview of Codex,
這是一次相當全面的 Codex 概覽,
34:27.961–34:29.054
a lot of the features,
涵蓋許多功能,
34:29.054–34:29.723
how to use it,
如何使用它,
34:29.723–34:30.573
some good demos,
一些實用的示範,
34:30.573–34:32.700
setting up a lot of the important plugins.
以及設定許多重要外掛。
34:32.700–34:33.685
At this point,
到目前為止,
34:33.685–34:34.341
you know,
你們應該已經
34:34.341–34:35.966
probably 90% of Codex.
掌握了 Codex 約 90% 的內容。
34:35.966–34:37.115
If you want the extra 10%,
如果想了解剩下的 10%,
34:37.115–34:37.608
let me know
請告訴我,
34:37.608–34:39.633
and I will happily make an advanced version.
我很樂意製作進階版本。
34:39.633–34:40.874
For those of you that are devs
對於那些已經是開發者
34:40.874–34:43.666
and are kind of past some of the beginner stuff that I showed here.
且已經超越我這裡展示的初級內容的你們。
34:43.666–34:44.042
Anyway,
總之,
34:44.042–34:44.900
I hope you enjoyed.
希望你們喜歡。
34:44.900–34:46.766
If you did leave a like subscribe
如果你喜歡,請按讚並訂閱
34:46.766–34:48.633
and I will see you in the next one.
我們下次見