

Photo by Author | Canva
. Introduction
Gemini CLI is Google’s new open source AI assistant that runs in your terminal. This Gemini language model (Gemini 2.5 Pro) brings directly to your shell so you can ask questions, prepare the code, fix the insect, or create documents without leaving the command line. “Gemini” itself is an LLM and “Gemini CLI” is primarily a user tool that makes the model into your workflose. In short, it is like a chat GPT for developers. Google released the Gemini CLI in June 2025, and that’s Free For individuals. You just need to log in using your personal Google account and give you access to the Gemini 2.5 Pro with a large 1 million token context without any price (60 requests/mins/min and up to 1,000/day). This is a great free and open source replacement for AI coding assistants such as AI coding assistants.
To highlight its importance, let me set up and walk through some examples.
. Setting up Gemini CLI on your system
Installing Gemini CLI, you need a command line environment (terminal on Macos/Linux, Power Shell or Windows similarly) and either homebrow or node.com JS. On Macos, the easiest way is through Hoomero:
- Install Gemini CLI via Hoomero: Follow the following command in your terminal
- As alternative, install through the node (any OS): If you prefer or do not use Hoomero, node. Install JS (version 20 or more. Then run:
npm install -g @google/gemini-cli
Or
npx
It installs CLI on Macos, Linux, or Windows globally. node.js V20+ needed; You can download it nodejs.org Or use NVM to handle the version.
Once installed, you can only run the following command to launch Gemini-CLI:
It should be Start CLI (If you see the “Gemini CLI” Ascii banner, you are ready). If Gemini is not found, you may need to open a new terminal or add NPM’s Global Bin on your way. You will see something like this:


Screenshot of Gemini CLI Launch
On the first run, the Gemini CLI will indicate you to take a colorful theme (light or dark) and then log in with your Google account. Follow the instructions given in the browser (or CLI) to allow. If you prefer to use an API key instead of login, you can set Gemini_API_KEY = “Your_Key” In your environment (watch Google AI Studio to create a key). Once confirmed, the CLI confirmed that it was ready to use.
. Your first Gemini CLI commands run
With the setup of the Gemini CLI, you can now start using natural language orders. It opens a gesture (marked >) Where you type questions or work. For example, let’s try with a simple gesture and ask: “Write a short paragraph about why Gemini CLI is amazing.” Output here:


Gemini CLI’s screenshot: Simple Paragraph Writing
!! Task 1: Fixing bugs with Gemini CLI
The Gemini CLI may connect with the gut hub or your local gut tools to find problems. For example, let’s use the Bullet -in @Search Tool to bring the Gut Hub Issue URL, then seek the Fix Plan:
Prompt (Source):
Here’s a GitHub issue: (@search /issues/4715). Analyze the code and suggest a 3-step fix plan.
The CLI identified the main reason and suggested how to edit the code. The screenshot below shows that it reports 3 steps. You can review this plan, then let the Gemini CLI automatically apply the changes to your files.


Gemini CLI’s screenshot: insect -fixing
!! Task 2A: Working with a project (easy example)
I cloned the Gutdiagram Ripo and made a project folder. If you want to know more about this repo, go to my article: Let’s feel 10k+ line gut hub repo without reading the code. Let’s go to your project folder using:
Run now Gymnony. You can start asking questions about the code. Let’s try the following prompt:
Prompt:
Explain the main components of this codebase
Gemini will scan CLI files and use the gymnasium to summarize or respond, as shown in the screenshot below:


Gemini CLI’s screenshot: Working with a project (easy example)
It pasted the folders and returned a made summary (listing directories such as SRC/, Public/, etc.). It is easy to ride or produce documents on new projects.
!! Task 2B: Working with a project (modern example)
The code base is easy to detect. Now let’s take another technical job to see how the output came out. We will provide Gemini to the following hint:
Prompt:
Analyze this repo for common performance anti-patterns.


Gemini CLI’s screenshot: Working with a project (modern example)
The answer was so detailed that I just added the initial part to the screenshot. Gemini CLI developed a detailed plan and then read each file freely. Finally, it shared a summary along with the recommended anti -patterns of potential performance as well as the recommended steps:
Summary of potential performance anti-patterns based on initial analysis:
1. Large Frontend Bundle Size:
* Mermaid Library: The mermaid library is likely a significant contributor to the bundle size. If it's not
lazy-loaded, it will impact initial page load performance.
* `react-icons`: Depending on how it's imported, it can also contribute to bundle size if not tree-shaken
effectively.
2. Unoptimized Image Usage: While Next.js has next/image, without inspecting the actual image usage in components,
it's hard to say if images are properly optimized (e.g., correct sizes, formats, lazy loading).
3. Potential Backend Performance Issues (Python & Node.js):
* N+1 Queries: This is a common database anti-pattern that can significantly slow down data retrieval.
* Lack of Caching: If frequently accessed data is not cached at the application or database level, it can lead
to redundant computations and database hits.
* Synchronous Operations: Blocking I/O in either backend could lead to performance bottlenecks under heavy load.
4. `reactStrictMode: false`: While not a direct anti-pattern, it can hide potential performance issues related to
React's rendering behavior during development.
5. Development-like Docker Volume Mount: Mounting the entire backend directory in the Docker container is less
optimal for production builds compared to copying only necessary files.
To confirm these, further investigation would be needed, including:
* Bundle Analysis: Using tools like @next/bundle-analyzer to identify large modules in the frontend.
* Performance Profiling: Running the application and using browser developer tools (for frontend) and backend
profiling tools to identify bottlenecks.
* Code Review: Deep diving into the src/ and backend/ code to identify specific instances of the anti-patterns
mentioned.
These examples show how the Gemini CLI transforms the simple indicators into real measures. You can inquire from the code, prepare it or react, fix the insects, and improve performance with your terminal.
. Wrap
Gemini is a powerful new tool for CLI developers. Once you install it on Macos (or any OS), you can communicate with Google’s Gemini LLM so easily like any local command. Some of the main features that make it different are:
- React Agent Loop: Internally, it runs a react agent loop with your local environment. This means that it can decide when to call a device (find, run the shell, edit the file) versus directly. For example, he brought URL with @search when needed.
- Built -in tools: It contains “tools” built -in such as Grapes, Eco, File Red/Writing, and you can request a web search or file system questions from the indicator.
- Multi -modal abilities: Gemini CLI can even work with photos/PDF (since the gym is multi -modal). This outdoor model supports integration with the context of the context (MCP) servers such as, as you can connect an image generator (image) or customs API. This allows you to do things like “Creat a Code” or “Summary of PDF”.
Try it: After following the aforementioned setup, open a terminal in a project folder, type Gemini, and start experimenting. You will quickly see how AI’s partner in your shell can dramatize your productivity in a dramatic way!
Kanwal seals A machine is a learning engineer and is a technical author that has a deep passion for data science and has AI intersection with medicine. He authored EBook with “Maximum Production Capacity with Chat GPT”. As a Google Generation Scholar 2022 for the APAC, the Champions Diversity and the Educational Virtue. He is also recognized as a tech scholar, Mitacs Global Research Scholar, and Harvard Vacod Scholar as a Taradata diversity. Kanwal is a passionate lawyer for change, who has laid the foundation of a Fame Code to empower women in stem fields.