📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

NEW Google Gemini CLI Open Source & Free! Beats Claude Code & OpenAI Codex?! INSANE AI Coding CLI

Josh Pocock14:19

Transcription

What's going on, guys? So, the AI race is really starting to heat up. We have some of the biggest tech companies fighting for the spot to be the best AI coder.

All right, we have AI coding ideas, but more importantly, in today's video, we're going to be talking about AI coding CLIs. And yes, we had Open AI Codex, we have Claude Code, but now Google Gemini is coming into the game and they got a new CLI which we're going to be covering in today's video. I'm going to show you how you can actually set this up, how it may compare to some of the other AI coding CLIs. And what's even crazier than anything, guys, is Google opensourced this entire project and they are giving away basically like up to $600 of usage credits a day for free.

So without ado, guys, let's dive right in.

All right, guys. So all links I cover in today's video will be linked down below. And here we can see Gemini CLI, your open-source AI agent. This is the blog post from them basically announcing this release. And here is the actual GitHub repo of the entire open-source AI agent that brings the power of Gemini directly into your terminal.

All right, so a few key things to note with Google Gemini CLI is it has a massive 1 million token context window, and this is of course very, very large. Uh, also too, you get 60 model requests per minute and 1,000 model requests per day with the open-source free version, which is a huge amount. Now, if you need advanced use cases or increased limits, you can use a specific model or require higher request capacity; you would have to use your own API key from Google AI Studio. We're not going to be doing that though in today's video. We're just going to be using the free version. So you can query and edit large code bases. You can generate new apps. You can automate operational tasks. You can use LLM servers within this. And you can ground your queries in Google search, a tool built into Gemini.

So without ado, let's actually run this CLI right now. So, few prerequisites: You're going to need NodeJS version 18 or higher.

Next, what we're going to do is we're going to simply run this command right here. So, npx and then the GitHub URL right here.

All right. So, now we're going to install the following packages. I'm going to say yes.

Now, as that is installing, let me just quickly go over a few things with Gemini CLI, Claude Code, and OpenAI Codex. If you want to see a side-by-side comparison, you want to see a side-by-side comparison, here it is. So, you can see Google Gemini. I'm not going to read through this entire thing, but if maybe if you want to pause this, you can see native, open-source, cross-platform, free with limits. Of course, it's open source, has all these uh LLM extensions, multimodal, rate limits, early-stage reliability, and it's using Gemini 2.5. Then we have Claude Code using Opus or Sonnet 4, and this is paid with either pro or max. So, pro is about 17 bucks a month, and then max is a hundred bucks a month per person. If you're on max, you get about five to 20 times more usage than pro. If you are going to be using Claude Code a lot, it probably makes sense to be using Max because you're going to save a lot of money.

Now, if you want me to do a side-by-side comparison between these CLIs, as well as there's some other CLIs that I'll mention too, um, then let me know in the comments down below. I have a few videos planned out where I am going to dive into these a little bit deeper and see which one is on top.

Okay, so we have Gemini installed now in the CLI. So, we can see the logo here. Tips for getting started: Ask questions, edit files or run commands. Be specific for the best results. And then create a gemini.md file to customize your interactions with Gemini. And then `/help` for more information.

So, first things first, we can select our theme. So, I'll just go ahead and maybe do something like I'll do this one, Adam one. So, let's go ahead and do `help`.

Okay. So now we can actually see all the basics and the commands here. So, basics, add context, use `@` to specify files for context, right shell mode. So, execute shell commands. So, a few commands: `help`, `docs`, `clear`, `theme` to change themes, change the auth method, `editor` so set external editor preference, `stats` so check session stats, `LLM memory`. So, manage memory, `list tools`, uh `about`, `bug`, `chat`, manage chat history, `quit`, and then `compress`.

Okay, so I'm going to go ahead and start by taking a look at the tools here. I don't know why it's glitching like that. So, available Gemini CLI tools: We got `read folder`, `read files`, `search text`, `find files`, `edit`, `write file`, `web fetch`, `read many files`, `shell`, `save memory`, and `Google search`.

Now, just to show you a side-by-side comparison of how Claude code looks right when you install it. First things first is they get you to pick the theme. We always go with dark theme. And then you can either log in through your Claude account or use the Anthropic API. So, like I said, if you want to save some money, it makes sense to actually log in through your account. Once you log in, you can click enter. Now, the one thing I forgot to mention with Claude Code is that you do need either a Mac or Linux, or you need WSL.

Okay, so first things first in Google Gemini here, I'm going to actually make sure that I am using the right auth method. So, I'm going to use `auth` here, `/auth`, and then log in with Google account. Okay, we're not going to be using the API.

Okay, so I'm signing in, and then boom, you should see Google Code Assist and Gemini CLI are now authorized to access your account. Now, actually for simplicity's sake here, I'm actually just going to use a Gmail account, not my actual uh Executive Stride account. Reason being is because if you do use a business account, you may have to specify a Google Cloud project. So, you'd have to set an environment variable like so: `GOOGLE_CLOUD_PROJECT` right here, project ID. So, I'm not going to do that right now, but if you do want to use a business account for whatever reason, not that it makes a difference, that's what you would probably have to do.

Okay. So, here it's showing once the CLI is running, you can start interacting with Gemini yourself. And it's giving two different examples. One, starting a new project in a directory. So, like telling it basically, hey, generate me this, or two, working with an existing project. So, let's go ahead and try number one to start off.

All right.

All right. So, here I'm saying, "Generate me a CRM application that allows me to track new leads and conversations in a modern UI. Have a task manager and calendar feature in it as well." We're going to go ahead and click on send. So, it's constructing a plan right here. So, here's the plan. So, here's the plan. Technology stack: We have Next.js. So, good choice right there. Next.js. One of my favorites. um styling, Bootstrap, material design, data storage, uh core features, dashboard, lead management, conversational tracking, task manager, calendar, development steps. Boom, boom, boom. So, I will begin now scaffolding the Next.js project. Okay, so it has a command right here. Now, it's saying allow execution. So, you can either allow once or always allow npx. I'll just allow once for now. Now, it's running that shell command. Okay, now it's running another one for Bootstrap. Now it's running another one for all the different packages right here. Slower response times detected. Automatically switching from Gemini 2.5 Pro to Gemini 2.5 Flash for faster responses for the remainder of this session. To avoid this, you can either upgrade to standard tier or you can utilize Gemini API key right here.

All right, so this of course isn't the best. Obviously, it's basically downgrading us to the cheaper, worse model, but I mean, at the end of the day, they are giving us a bunch of free usage, and I know that everyone's probably using it right now, so I can kind of understand why they have to do this, but still, it is what it is.

Okay, so now it is saying that everything is set up and good to go. So, we just have to run this command here. So, I'm going to run this to launch the dev server. `pnpm run dev`, and we can just go allow this.

All right. So now it's running `pnpm install`, and then it should run `pnpm dev`. Okay. So here we have our localhost 3001, and let me just open this up. Okay. So if we take a look at this, we can see that it is a basic CRM. Welcome to the basic CRM. We have our leads here. So we can add new leads, status, and then conversations here. So, pretty basic. I'm going to tell it to improve this. I'm saying make this a way nicer UI, way more modern with way better features. And we're going to go ahead click send.

Okay. So, I'm getting a build error now. Let me go ahead and paste this into here. The one annoying thing is it takes a minute to paste this in.

Okay. So, I actually stopped it um because I'm going to tell it to do one thing. But one thing to note is it shows agent powering down. Goodbye. And then it shows the amount of tokens we use. Input, output, thought tokens. So we use over a million tokens already. Um, and that is quite a bit. So that's just one thing to note. Also, another thing to note is you can either run it with the `npx` and then the URL, the GitHub command, or you can run it with `pnpm install -g google-gemini` to install it globally. So one thing I noticed it did with this Next.js project is it made it a pages um project instead of an app router. So I'm actually telling it to fix that right now. It's an annoying thing, you know, that these models are trained on a lot of older um updates. So this tends to happen a lot when you're using Next.js, shad, whatever the case is. So you this is I'm not going to fully blame it on, you know, Google Gemini CLI. This is something that best practices, you should really specify with your prompting beforehand.

Okay, so it did a bunch of things, and as you can see now if we look at our project, it is using app router, which is good.

Okay, so I finally got it to look somewhat decent. It took me uh quite a long time. Um, but that is partially because we started out in, you know, not the best way. Um, basically one, one thing, you know, my suggestion, as always, I've mentioned it many times on this channel, your initial prompts and how you set up the project, especially if you're starting from scratch, is very crucial with anything, whether you're using Cursor, whether you're using Windsurf, whatever the case may be. So since we didn't do it the proper way, we had to switch over, we it had a switch to Tailwind, there was a few different things, so it took a little bit of time here. As you can see, it looks pretty good. We got just a modern dashboard right here for the CRM.

All right. Pretty decent UI. We got the lead section here. Conversation section, task, calendar, etc. Here's our conversations right here. Here's our basic tasks. Here's our leads. I think you get the point here.

Now, another way, of course, you can use Gemini, which it mentions here, is working within an existing project. So if you wanted to test this out, you could clone the repo here, change directory into it, run Gemini, and then just say, give me a summary of all the changes that went in yesterday, or give me a summary of this project. So I'm going to do that in actually this project. So I'm just saying, give me a summary of what this project is.

Okay. And boom, this is a CRM application built with Next.js. We have lead management, conversational tracking, task management, calendar view, etc. And it says this project was recently migrated from an older Next.js page router to the modern app router.

Now you can also use the Gemini tools, of course. So just to show you in a basic example, which you wouldn't of course use in a real-life scenario. I'm going to say `search what the weather tomorrow in Toronto will be around 6 p.m.` And we can see here that it's using a Google search to search the web for the weather. Now, we see the weather in Toronto at 6 p.m. is expected to feel like 31° C with a 10% chance of precipitation.

All right, so all in all, guys, I think this is a pretty big W for Google. Of course, it definitely is not perfect. I don't know if I would say it is on the same level as Claude Code. It's really hard to say. I will be doing more videos in comparison with some of these CLI tools. I'll also leave a link in the description down below to this Twitter thread right here where they basically did a CLI battle royale with these coding agents, and you can see they use Claude Code, Anon Code, Codex, Open Code, AMP Code, and Gemini. So, these are some cool tools as well that I'll definitely be doing some videos on in the future, such as Open Code here. So, make sure to stay tuned to see some of those videos. But, let me know what your thoughts are in the comments down below, guys, about Google Gemini CLI. I think it's a big W for them, and and they're really trying to burn the ground of all the different competitors by doing this kind of free model where, you know, they're giving you access to hundreds of dollars worth of usage per day. And this is something that, of course, a company like Google can actually do because they're such a huge company with a lot of money. And they just had a huge W with Google V3, and they're really coming strong in the AI race of course with all these different companies, Claude, OpenAI is really starting to heat up, guys. So, I will be doing a lot more videos more frequently on this channel again. So, make sure to subscribe, like the video, and comment down below what your thoughts are about all this are.

Other than that, guys, if you're new here, check out some of the links down below to my community. Check out our website. If you want help with AI, implementing AI into your business, AI voice, whatever the case is, just check out the links down below. Other than that, guys, I will see you in the next video. Keep hustling, keep grinding, and of course, guys, accelerate your stride. Take care.