[00:00] (0.16s)
Hey everyone, OpenAI just released an
[00:02] (2.40s)
improved version of OpenAI codeex. It's
[00:04] (4.88s)
a CLI tool that helps you code directly
[00:07] (7.04s)
in your terminal. The tool is open
[00:08] (8.96s)
source which means anyone can clone the
[00:10] (10.80s)
source code and modify it as they like.
[00:12] (12.96s)
That's exactly what why Michael did. He
[00:14] (14.88s)
took the source code and changed it to
[00:16] (16.80s)
support multiple providers, not just
[00:19] (19.04s)
OpenAI models. Because of that, you can
[00:21] (21.36s)
also use models like Gemini 2.5. This is
[00:24] (24.24s)
the chat LLM arena. It's considered one
[00:26] (26.80s)
of the most authentic benchmarks for AI
[00:29] (29.12s)
models. Gemini 2.5 Pro is currently at
[00:32] (32.00s)
the top of the leaderboard and for good
[00:33] (33.92s)
reason. I've tested it in my videos,
[00:35] (35.84s)
too. In one of them, I completely cloned
[00:38] (38.16s)
a Mac app, and this was the only model
[00:40] (40.40s)
that could write solid working Swift
[00:42] (42.40s)
code without errors or functionality
[00:44] (44.32s)
issues. That's why combining OpenAI's
[00:46] (46.64s)
improved codecs with Gemini 2.5 Pro is
[00:49] (49.52s)
such a powerful idea. It's a wild time
[00:51] (51.76s)
right now. The open nature of the tool
[00:54] (54.16s)
lets everyone contribute and modify it
[00:56] (56.40s)
for their own needs which often ends up
[00:58] (58.64s)
helping others too. Now for the
[01:00] (60.24s)
installation, start by installing open
[01:02] (62.32s)
codeex using npm. The g flag installs it
[01:05] (65.44s)
globally. In your terminal session,
[01:07] (67.52s)
expose your API key and run the command
[01:10] (70.08s)
to use the Google Gemini API key. Just
[01:12] (72.64s)
replace the placeholder with your actual
[01:14] (74.56s)
key. If you want to use a different
[01:16] (76.24s)
provider, head to the GitHub repo.
[01:18] (78.48s)
You'll find similar instructions for
[01:20] (80.08s)
other options like OpenAI, Open Router,
[01:22] (82.48s)
and even Olama, which doesn't require a
[01:24] (84.48s)
key. Each API key is linked to a default
[01:26] (86.88s)
agentic model and a default full context
[01:29] (89.60s)
model. The tool uses both for better
[01:31] (91.76s)
efficiency. Now, I'm in my terminal, and
[01:33] (93.84s)
it's time to start Open Codeex. First,
[01:36] (96.00s)
I'll navigate into a directory and
[01:37] (97.84s)
initialize Open Codeex.
[01:46] (106.40s)
You can see it has created a working
[01:48] (108.24s)
directory. Since I've already entered
[01:50] (110.16s)
the API key in this terminal session,
[01:52] (112.48s)
the selected model is Gemini 2.5 Pro.
[01:55] (115.52s)
Let's send it a message to check if it's
[01:59] (119.08s)
working. As you can see, Open Codeex is
[02:01] (121.92s)
up and running and functioning properly.
[02:03] (123.76s)
If you're not sure how to get the API
[02:05] (125.84s)
key for the Gemini 2.5 Pro model, go to
[02:09] (129.04s)
Google AI Studio and open the get API
[02:13] (133.88s)
section. Create an API key and you'll be
[02:17] (137.04s)
asked to choose from your Google Cloud
[02:19] (139.04s)
projects. Make sure the project you
[02:20] (140.64s)
select has a billing account linked to
[02:22] (142.40s)
it. Gemini 2.5 Pro doesn't come with a
[02:25] (145.20s)
free API, so a free account won't work.
[02:27] (147.76s)
Once you select the project and create
[02:29] (149.44s)
the key, you'll receive your API key.
[02:32] (152.08s)
You can then paste it into your export
[02:34] (154.00s)
command. When you expose your API key,
[02:36] (156.64s)
remember that this needs to be repeated
[02:38] (158.56s)
every time you open a new terminal
[02:40] (160.48s)
session. To avoid that, you can set
[02:42] (162.72s)
environment variables and also provide
[02:45] (165.20s)
custom instructions to codeex in your
[02:47] (167.44s)
base directory, which is important.
[02:49] (169.76s)
Initialize the directory and create a
[02:52] (172.44s)
config.json file. Once the file is
[02:54] (174.96s)
created, use the cursor command to open
[02:57] (177.36s)
it and paste your configuration inside.
[02:59] (179.84s)
The configuration includes a default
[03:01] (181.76s)
model and a provider. If you're unsure
[03:03] (183.92s)
what to enter for the Gemini model, go
[03:06] (186.16s)
back to the GitHub repo and check the
[03:08] (188.00s)
table. For the provider, enter Gemini or
[03:10] (190.32s)
whichever option you prefer. For the
[03:12] (192.24s)
model, enter the default agentic model,
[03:14] (194.72s)
which in Gemini's case is Gemini 2.5
[03:17] (197.52s)
Pro. You can copy the full string from
[03:19] (199.44s)
the table and paste it into the config
[03:21] (201.52s)
file. To give custom instructions,
[03:23] (203.60s)
create an instructions.md file in the
[03:25] (205.92s)
same codec folder. Codeex will now
[03:28] (208.16s)
follow them while generating your code.
[03:30] (210.24s)
Let's test it out by creating something
[03:32] (212.00s)
with the Gemini 2.5 model. One thing to
[03:35] (215.04s)
note is that they recommend using it
[03:36] (216.96s)
inside a git initialized repository. You
[03:39] (219.52s)
can do this by running the git init
[03:41] (221.12s)
command in the repo. I'm not doing that
[03:43] (223.04s)
right now since this is just a test, but
[03:45] (225.20s)
it's worth mentioning. One way to run
[03:46] (226.80s)
codeex is in interactive mode. You can
[03:49] (229.04s)
also input a prompt directly and add
[03:50] (230.80s)
flags to enable full agent mode where it
[03:53] (233.28s)
handles everything based on your prompt.
[03:55] (235.12s)
Let's copy the prompt and see what kind
[03:56] (236.96s)
of fancy to-do list app it creates. I've
[03:59] (239.52s)
already exposed the Gemini API key in
[04:02] (242.00s)
this terminal window. So, we're ready to
[04:04] (244.16s)
go. You can see approval mode is set to
[04:06] (246.32s)
full auto and Codeex has started working
[04:11] (251.40s)
app. The first thing it asks is what we
[04:14] (254.16s)
mean by fancy in this context. It
[04:16] (256.32s)
suggests a few features and also asks
[04:18] (258.32s)
some follow-up questions. Let's answer
[04:20] (260.24s)
them. For fancy, we'll say the UI should
[04:23] (263.04s)
look really good and the components
[04:24] (264.96s)
should be from shad CN. For features,
[04:27] (267.68s)
let's say use all of them. And for the
[04:29] (269.84s)
text stack, it should make a Nex.js app.
[04:32] (272.32s)
And for now, store the data in a JSON
[04:34] (274.88s)
file. Now, let's send the response and
[04:36] (276.80s)
see what
[04:41] (281.56s)
happens. It has started initializing the
[04:44] (284.24s)
Nex.js project, sent the command, and is
[04:47] (287.20s)
handling errors by correcting the
[04:48] (288.88s)
command. This process will take some
[04:50] (290.80s)
time. So, let's speed up the
[04:53] (293.45s)
[Music]
[05:16] (316.12s)
Here's the app it created. For full
[05:18] (318.88s)
transparency, it didn't build the exact
[05:20] (320.88s)
app we originally requested. That's
[05:22] (322.96s)
because we asked it to implement all the
[05:24] (324.88s)
features, and it got stuck on one of
[05:26] (326.88s)
them, which ended up burning through a
[05:28] (328.80s)
lot of my credits. After that, I just
[05:30] (330.88s)
asked it to build the basic version of
[05:32] (332.72s)
the to-do list with a nicel looking UI
[05:35] (335.04s)
using Shad CN UI components, and it
[05:37] (337.60s)
managed to create an amazing app. It
[05:39] (339.60s)
includes both dark mode and light
[05:42] (342.76s)
mode. We can add a task and you'll see a
[05:45] (345.52s)
new item appears. Let's add another one.
[05:47] (347.60s)
Another task is created and we get those
[05:50] (350.08s)
little pop-up notifications too. The UI
[05:52] (352.80s)
looks genuinely impressive. If we
[05:54] (354.88s)
refresh the app, the tasks persist which
[05:57] (357.68s)
shows the JSON storage is working. Tasks
[06:00] (360.32s)
can be deleted and when we mark one as
[06:02] (362.56s)
complete, there's a smooth animation.
[06:04] (364.64s)
Overall, it's a clean and impressive
[06:06] (366.88s)
app. Open Codeex is a solid tool. I'm
[06:09] (369.60s)
not sure why it got stuck on that one
[06:11] (371.44s)
feature earlier. It kept trying to fix
[06:13] (373.36s)
it but wasn't making progress, so I
[06:15] (375.68s)
restarted it. Gemini 2.5 is a fantastic
[06:18] (378.40s)
model. I've seen some amazing app
[06:20] (380.24s)
examples generated by it on X with very
[06:22] (382.80s)
few errors. That's it for this video.
[06:24] (384.88s)
Hope you enjoyed exploring this tool. Be
[06:27] (387.04s)
sure to check it out. Subscribe for more
[06:28] (388.80s)
content on powerful tools like this. And
[06:31] (391.04s)
if you'd like to support us, consider
[06:32] (392.96s)
donating through the link in the
[06:34] (394.40s)
comments.