YouTube Deep SummaryYouTube Deep Summary

Star Extract content that makes a tangible impact on your life

Video thumbnail

OpenAI Codex Hacked: Use It with Gemini 2.5 PRO (The Best Coding Model)

AI LABS • 2025-04-20 • 6:37 minutes • YouTube

📝 Transcript (163 entries):

Hey everyone, OpenAI just released an improved version of OpenAI codeex. It's a CLI tool that helps you code directly in your terminal. The tool is open source which means anyone can clone the source code and modify it as they like. That's exactly what why Michael did. He took the source code and changed it to support multiple providers, not just OpenAI models. Because of that, you can also use models like Gemini 2.5. This is the chat LLM arena. It's considered one of the most authentic benchmarks for AI models. Gemini 2.5 Pro is currently at the top of the leaderboard and for good reason. I've tested it in my videos, too. In one of them, I completely cloned a Mac app, and this was the only model that could write solid working Swift code without errors or functionality issues. That's why combining OpenAI's improved codecs with Gemini 2.5 Pro is such a powerful idea. It's a wild time right now. The open nature of the tool lets everyone contribute and modify it for their own needs which often ends up helping others too. Now for the installation, start by installing open codeex using npm. The g flag installs it globally. In your terminal session, expose your API key and run the command to use the Google Gemini API key. Just replace the placeholder with your actual key. If you want to use a different provider, head to the GitHub repo. You'll find similar instructions for other options like OpenAI, Open Router, and even Olama, which doesn't require a key. Each API key is linked to a default agentic model and a default full context model. The tool uses both for better efficiency. Now, I'm in my terminal, and it's time to start Open Codeex. First, I'll navigate into a directory and initialize Open Codeex. You can see it has created a working directory. Since I've already entered the API key in this terminal session, the selected model is Gemini 2.5 Pro. Let's send it a message to check if it's working. As you can see, Open Codeex is up and running and functioning properly. If you're not sure how to get the API key for the Gemini 2.5 Pro model, go to Google AI Studio and open the get API section. Create an API key and you'll be asked to choose from your Google Cloud projects. Make sure the project you select has a billing account linked to it. Gemini 2.5 Pro doesn't come with a free API, so a free account won't work. Once you select the project and create the key, you'll receive your API key. You can then paste it into your export command. When you expose your API key, remember that this needs to be repeated every time you open a new terminal session. To avoid that, you can set environment variables and also provide custom instructions to codeex in your base directory, which is important. Initialize the directory and create a config.json file. Once the file is created, use the cursor command to open it and paste your configuration inside. The configuration includes a default model and a provider. If you're unsure what to enter for the Gemini model, go back to the GitHub repo and check the table. For the provider, enter Gemini or whichever option you prefer. For the model, enter the default agentic model, which in Gemini's case is Gemini 2.5 Pro. You can copy the full string from the table and paste it into the config file. To give custom instructions, create an instructions.md file in the same codec folder. Codeex will now follow them while generating your code. Let's test it out by creating something with the Gemini 2.5 model. One thing to note is that they recommend using it inside a git initialized repository. You can do this by running the git init command in the repo. I'm not doing that right now since this is just a test, but it's worth mentioning. One way to run codeex is in interactive mode. You can also input a prompt directly and add flags to enable full agent mode where it handles everything based on your prompt. Let's copy the prompt and see what kind of fancy to-do list app it creates. I've already exposed the Gemini API key in this terminal window. So, we're ready to go. You can see approval mode is set to full auto and Codeex has started working on the app. The first thing it asks is what we mean by fancy in this context. It suggests a few features and also asks some follow-up questions. Let's answer them. For fancy, we'll say the UI should look really good and the components should be from shad CN. For features, let's say use all of them. And for the text stack, it should make a Nex.js app. And for now, store the data in a JSON file. Now, let's send the response and see what happens. It has started initializing the Nex.js project, sent the command, and is handling errors by correcting the command. This process will take some time. So, let's speed up the [Music] video. Here's the app it created. For full transparency, it didn't build the exact app we originally requested. That's because we asked it to implement all the features, and it got stuck on one of them, which ended up burning through a lot of my credits. After that, I just asked it to build the basic version of the to-do list with a nicel looking UI using Shad CN UI components, and it managed to create an amazing app. It includes both dark mode and light mode. We can add a task and you'll see a new item appears. Let's add another one. Another task is created and we get those little pop-up notifications too. The UI looks genuinely impressive. If we refresh the app, the tasks persist which shows the JSON storage is working. Tasks can be deleted and when we mark one as complete, there's a smooth animation. Overall, it's a clean and impressive app. Open Codeex is a solid tool. I'm not sure why it got stuck on that one feature earlier. It kept trying to fix it but wasn't making progress, so I restarted it. Gemini 2.5 is a fantastic model. I've seen some amazing app examples generated by it on X with very few errors. That's it for this video. Hope you enjoyed exploring this tool. Be sure to check it out. Subscribe for more content on powerful tools like this. And if you'd like to support us, consider donating through the link in the comments.