Gemini Agent VS Gemini CLI: Which is better for programming?
Content Index
In this post, we'll discuss Google AI agents, such as Gemini Agent for Visual Studio Code and Gemini CLI for the terminal, along with their similarities, differences, and programming uses.
Remember, we previously covered the steps for installing Gemini CLI using Node.
Gemini Agent
Gemini Agent is simply an extension for VS Code, similar to what we have with GitHub Copilot.
To install it:
- Go to the extensions section in VSC, search for the Gemini agent, and install it.
- Once installed, you can interact with it directly in your code.
For example, you select text, press Ctrl + I, and a window will open where you can chat with the assistant.
There's also a button in the interface that allows you to interact. Just remember that you'll be asked to authenticate before using it.
In short: Gemini Agent provides a visual interface within VS Code for working with the wizard.

Gemini CLI
On the other hand, Gemini CLI (Command Line Interface) works directly from the terminal.
There are no windows or buttons here, everything is command-driven.
Just by typing gemini, you can perform multiple operations.
The difference is that while Gemini Agent integrates into a project in VS Code, Gemini CLI works globally, from anywhere in the terminal.

The new way of programming, in which we are more "reviewers" than programmers, so to speak. It all depends on the context, but broadly speaking, it feels like this: whether we're starting from scratch or working on an existing project, we can use these types of assistants, like Claude Code, to assist us and generate code for us, among other operations such as generating tests, documentation, bus repair, etc.
Running some prompts to create an application to practice true-false questions, I comment on the result:
- In the initial Flutter project, I asked it to add pages using Go Router, then I asked it for the questions and answers module with a model to represent options and correct answers. Gemini generated the entire schema and made my job quite easy, although it didn't always get it right.
- The current project is in Flutter. What I want to build is a kind of Duolingo for computer science. The idea is that later, when you watch my courses or read my books, you can reinforce knowledge through questions, answers, and snippets.
- One detail is that Gemini tends to invent fields in the models. For example, when I asked it to connect to an external API, it added attributes to the questions model that I never requested, such as a list of incorrect questions, which is redundant if a correct answer index already exists.
- It also installed additional packages, such as Provider, which at this point in the project were unnecessary. This shows that AI is often biased toward the most common solutions in its training.
- Additionally, I had to manually fix errors with imports, project names, and structures that didn't make much sense.
For now, the layout is simple: one question, four options, and a grading system. I'm generating everything using Gemini CLI, which is what I want to evaluate in this video.
My recommendation is to always work in small iterations. It's not a good idea to ask Gemini something like, "Create me a Duolingo-like app" and hope for the best, because the result probably won't be what we're looking for.
Recommendations and final words
Regardless, the tool saved me quite a bit of work. I estimate that 90% of the generated code came from Gemini, while the remaining 10% was my manual tweaks.
The important thing to remember:
- Work in small iterations.
- Always review the generated code.
- Maintain solid programming skills, as without them, AI cannot be fully utilized.
Main differences
- Gemini Agent: A more interactive and visual extension for VS Code, useful for correcting, debugging, and requesting direct help with your code.
- Gemini CLI: A terminal-based tool, ideal for generating complete projects, CRUD modules, or larger tasks outside the editor.
- Both are programming assistants (they don't program for you), and you can use them in a complementary way:
- Use Gemini CLI to generate a complete project or structure.
- Then open the project in VS Code and use Gemini Agent to refine, correct, and improve the code.
Common features
- Code generation.
- Corrections and suggestions.
- Conceptual chat for questions.
- Acceleration of development flow.
Conclusion
Gemini Agent and Gemini CLI are not mutually exclusive, but rather complementary.
If you need to create large blocks of code or a project from scratch → Gemini CLI.
If you want to refine, correct, or ask for specific advice within your editor → Gemini Agent.
I agree to receive announcements of interest about this Blog.
We discuss the differences between Gemini Agent VSC vs Gemini CLI and utilities when programming.
- Andrés Cruz