How to Use the New Gemini CLI with a Friendly Interface (seriously, it's way more convenient)
Learn how to set up the Gemini CLI as a free API within the Cline AI coding agent.
UPDATE:
Cline announced that Google requested the removal of Gemini CLI from the list of API provider options.
Google just released Gemini CLI, a new coding agent that provides free access to Gemini Pro 2.5, one of the best coding models available.
There’s just one problem: Gemini CLI is yet another command-line interface (CLI) agent, similar to Claude Code and Codex CLI, forcing you to generate code in a text-based environment that looks like this:
Fortunately, we can have the best of both worlds: free and (almost) unlimited access to Gemini Pro 2.5 combined with a user-friendly interface.
In this post, I’ll show you how to set up the free, open-source coding agent Cline to work together with Gemini CLI.
Ok, first, let's figure out what Gemini CLI is and why it makes sense to use it.
What is Gemini CLI?
Ancient AI coders (meaning those from about 12-18 months ago - which, as you know, is ancient history in AI terms) used to copy-paste code directly from LLM chat windows. Luckily, humanity quickly realized that it was a dead-end idea, and AI coding agents such as Cursor and Windsurf started to appear and cost billions.
Major LLM labs, such as Anthropic and then OpenAI, have also released their coding agents. For some reason, they have chosen to force everyone back to the mid-1960s, embracing CLI interfaces, but without the free love and other perks of the time.
Some folks genuinely liked the retro CLI aesthetic, while everyone else watched in silent astonishment at the unexpected renaissance of CLI.
Now, Google is releasing Gemini CLI - a new coding agent, that gives you free access to Gemini Pro 2.5 with impressive limits: 60 model requests per minute and 1,000 requests per day at no charge.
Basically, Google just made Gemini Pro 2.5, one of the leading coding models, available for free to everyone. Now, I’m eager - and I bet you are too - to see what OpenAI and Anthropic will offer to compete for our attention. As I mentioned in a recent post, we're living in the era of subsidized AI, where AI companies provide exceptional AI services for free to train on your data and drive adoption. And frankly, that’s awesome!
But there’s still one catch - Gemini CLI has, well, a CLI interface.
And here enters Cline, one of the top open-source, free AI coding agents. It allows you to use Gemini CLI as an API provider, offering AI coding with a user-friendly interface and top LLM at no cost.
Why Cline?
There are three main reasons why I love Cline:
First, it’s an incredible AI coding agent that can effortlessly handle large code bases and complex projects. Its UI immediately shows you everything you need to know about your task, including the cost, size of the context, tokens used, and cache:
There are two modes: Plan and Act
This is exactly what I need from a coding agent: to discuss what needs to be done and then perform it according to the plan.
Second, Cline has an amazing memory feature that allows it to create and regularly update all project details, such as the technical stack, project description, and current and future tasks. Every new chat starts with Cline checking the project memory to ensure that you and Cline are on the same page regarding what you’re building.
Third, it has a native support for MCP, meaning Cline will install every MCP the same way it codes:
Cline has dozens of other features, such as the ability to choose different models for planning and acting, and the ability to quickly revert to any step in the agent history. It's better to check them out for yourself. I’ve tried almost every AI coding agent out there, but I always come back to Cline. It works exactly as an AI coding agent should.
How do I connect Gemini CLI to Cline?
First, install the Gemini CLI and authenticate with your personal Google account there.
Then, simply select Gemini CLI as your API provider in Cline:
This is it! You can now code with AI using a top LLM and AI coding agent, free of charge!
If you enjoyed this post, check out this video from my video course Practical AI: Real-World Applications for Work and Life
In this video, you'll discover three powerful AI techniques:
First, you'll see how to study foreign languages with Canvas in ChatGPT.
Second, you'll learn how to use AI to create interactive math games for your kids. Finally, you'll see how to visualize data in ChatGPT and create custom dashboards for data analysis.
Till June 30, you can access the full course with a 40% discount, just enter this code at checkout: PROVENAI40
⭐⭐⭐⭐⭐
"The Practical AI course bridges the gap between theoretical knowledge and real world application, that tackled meaningful use cases rather than examples that aren't useful. Unlike other courses that either oversimplify or get lost in technical weeds, Practical AI struck the perfect balance while remaining accessible."