Gemini CLI: Google's Free Agent for the Terminal (Guide)
Skillpedia team · updated 2026-12-01 · 11 min read
Short answer: Gemini CLI is a Google AI agent that runs in your computer's terminal. It reads files, runs commands and builds projects for you. It is open source and has a free plan: just sign in with your Google account. You install it with one command (npm install -g @google/gemini-cli) and start by typing gemini.
If you've heard of Claude Code, the idea is the same. Instead of chatting on a web page, you talk to the AI inside a folder on your computer, and it works on the actual files. The standout difference is the price: you can use it quite a lot without paying anything.
This guide is for people who use AI every day but aren't programmers. You'll see what Gemini CLI does, how to install it, and how to boost the agent with MCP servers and skills from the Skillpedia directory.
Table of Contents
- What is Gemini CLI?
- Is it really free? Free plan limits
- How to install it on Windows, Mac and Linux
- First commands to try
- How to connect MCP servers in Gemini CLI
- Using skills and context files (GEMINI.md)
- Gemini CLI vs Claude Code vs Codex
- Skills that help with this
- Frequently asked questions
What is Gemini CLI?
CLI stands for "command-line interface." In practice, it's a program you open in the terminal, that black window full of text. Gemini CLI brings Google's Gemini models into that window, with permission to act on your computer.
This changes a lot. In a browser chat, you copy and paste text. In the terminal, the agent does the work directly. Some examples of what you can ask:
- "Sort the photos in this folder into subfolders by month."
- "Read these 20 PDFs and summarize them in a spreadsheet."
- "Build a simple one-page website for my bakery."
- "Explain what this code does, in plain English."
The agent plans the steps, reads and writes files, and runs commands. Before doing anything that changes your computer, it asks for your approval. You see what it wants to do and decide whether to allow it.
The project is open source and lives in the official Gemini CLI repository on GitHub. It also supports MCP (the protocol that connects AI to other tools) and extensions. That's what makes it possible to reuse a lot of the Claude Code ecosystem.
Is it really free? Free plan limits
Yes, there is a real free tier. When you sign in with a personal Google account, you get a quota of requests per minute and per day at no cost. At launch, Google mentioned around a thousand requests a day. These numbers change over time, so check the current value in the official repository documentation.
For personal use and learning, that quota is usually enough. Keep in mind that one request from you can turn into several requests to the model, because the agent reads files and runs commands in sequence. A big task can use more than you'd expect.
There are three ways to sign in:
| Sign-in method | Best for | Cost |
|---|---|---|
| Personal Google account | People just starting out | Free, with limits |
| Google AI Studio API key | People who want to control which model is used or automate tasks | Limited free use and a paid option |
| Vertex AI (Google Cloud) | Companies | Pay as you go |
When your quota runs out, Gemini CLI may switch to a lighter model or ask you to wait. If that starts getting in the way, look at Google's paid plans. Prices change, so always check the official website before subscribing.
One caution: on the free plan, data usage terms can differ from the paid plans. If you'll be working with sensitive customer information, read the terms first.
How to install it on Windows, Mac and Linux
Gemini CLI requires Node.js, a free program for running JavaScript. The installation is similar on all three systems.
Step 1: install Node.js
Download the LTS version from the official Node.js website and install it normally, clicking through the screens. Gemini CLI requires a recent version. Check the minimum version in the official repository. To see which one you have, open the terminal and type:
node -v
On Windows, use PowerShell or Windows Terminal. On Mac, open the Terminal app. On Linux, you already know where it is.
Step 2: install Gemini CLI
In the terminal, type:
npm install -g @google/gemini-cli
On Mac and on Linux with Homebrew, you can also use brew install gemini-cli. If you just want to test it without installing, there's the option npx https://github.com/google-gemini/gemini-cli, which runs straight from GitHub.
Step 3: open it and sign in
Go into a working folder and type:
gemini
The first time, it asks you to pick a color theme and a sign-in method. Choose to sign in with Google. Your browser opens, you authorize with your account, and you go back to the terminal. Done.
Tip: create a folder just for testing, like Documents/gemini-test. That way the agent won't touch anything important while you learn.
First commands to try
With Gemini CLI open, you talk in normal English. But a few shortcuts help a lot.
| Shortcut | What it does |
|---|---|
/help |
Shows the list of commands |
@file.txt |
Adds a file to the conversation |
!command |
Runs a terminal command without leaving |
/tools |
Lists the tools the agent can use |
/mcp |
Shows the connected MCP servers |
/memory show |
Shows the context loaded from GEMINI.md |
/stats |
Shows session usage |
/quit |
Exits the program |
For a first test, put a text file in the folder and ask:
Summarize @notes.txt in 5 bullet points and save it to summary.md
Notice how it asks for permission before creating the file. This back-and-forth is normal.
You can also use it without a conversation, in a single command:
gemini -p "list the files in this folder and say what each one seems to be"
This is useful when you want to automate repetitive tasks.
There is a mode that approves everything automatically (--yolo). Avoid it at first. Letting the agent delete and move files without asking is asking for trouble.
5 new skills a week. 1 minute to read.
The most viewed skills of the week, explained simply. Free.
How to connect MCP servers in Gemini CLI
MCP is an open standard that links AI to other tools: Google Drive, GitHub, databases, browsers. If the term is new to you, read what MCP is first.
The good news is that the same MCP server works in Claude, Cursor and Gemini CLI. The more than 800 servers in the Skillpedia directory work here too.
The configuration lives in a file called settings.json. It can sit in the .gemini folder inside your user folder (applies everywhere) or inside a project (applies only there). Here's an example with a file server:
{
"mcpServers": {
"arquivos": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/caminho/da/pasta"]
}
}
}
The format is very similar to Claude Desktop's. Often you can copy the snippet from the server's page with almost no changes. Remote servers use a URL instead of a command. Details are in the repository documentation.
After saving, reopen Gemini CLI and type /mcp to see whether the server appears.
Besides MCP, Gemini CLI has extensions, which are packages that bundle MCP servers, commands and context together. You install them with gemini extensions install followed by the GitHub address. It's similar to Claude Code plugins.
Before installing any server or extension, check who maintains the project. An MCP server runs on your computer with whatever permissions you give it.
Using skills and context files (GEMINI.md)
The GEMINI.md file
GEMINI.md is a text file with instructions that the agent reads every time it starts. It works just like Claude Code's CLAUDE.md. You write things like:
- "Always reply in Brazilian Portuguese."
- "This project is the website for my clothing store. The audience is women, ages 25 to 40."
- "Never delete files in the original-photos folder."
Place GEMINI.md at the root of a project to apply it only there. Or put it in the .gemini folder of your user account to apply it everywhere. Use /memory show to check what was loaded, and /memory refresh after editing.
What about skills?
Skills are folders with a SKILL.md file that teach the agent to do a specific task, like building slides in your brand's style. They follow an open standard that started with Claude and has been adopted by other tools.
Native skill support in Gemini CLI is still being added. Check the official documentation to see how it works in your version. Even without it, you can use any skill from the directory in three ways:
- Through GEMINI.md: download the skill into a project folder and write something in GEMINI.md like "When I ask for slides, follow the instructions in
skills/slides/SKILL.md." - On the fly: reference the file in the conversation with
@skills/slides/SKILL.mdand ask for the task. - Through MCP: connect a server that delivers skills on demand, like the one from Skillpedia. See how in free MCP server for skills.
Because SKILL.md is just text with instructions, Gemini understands it without any issue. Scripts that come with a skill also run, as long as you approve them.
Gemini CLI vs Claude Code vs Codex
All three are similar terminal agents. The choice depends more on budget and preference than on features.
| Gemini CLI | Claude Code | Codex CLI | |
|---|---|---|---|
| Company | Anthropic | OpenAI | |
| Open source | Yes | No | Yes |
| Free use | Yes, with a Google account | No free plan | Included in paid ChatGPT plans |
| MCP support | Yes | Yes | Yes |
| Context file | GEMINI.md | CLAUDE.md | AGENTS.md |
Gemini CLI is the best entry point for anyone who wants to try it without spending money. Claude Code is widely used for serious programming and has the most mature skills ecosystem, but it requires a paid Claude plan or use through the API. See the details in Is Claude Code free?. Codex makes sense for people who already pay for ChatGPT.
Many people use more than one. For example: Claude Code for the main work and Gemini CLI for a second opinion or for tasks that read lots of files. For a broader comparison, read best AI for programming.
Skills that help with this
We recommend trying these first. Some of them make Gemini and other agents work together.
- ask: lets your agent send a question or task to another AI, like Gemini, Codex or Claude, and save the answer to a file. Great for comparing responses.
- code-mate-gemini: hands code analysis and programming tasks off to Gemini. Helpful when you want a second pair of eyes.
- gemini-automation: lets your agent use Gemini to generate text and answer questions within a larger workflow.
- omni-github-skills: searches for and analyzes skills on GitHub, checking for malware and hidden passwords before installation. A good security safeguard.
- hand-drawn-diagrams: creates diagrams that look hand-drawn, good for explaining a process in a presentation.
If you use Claude and want to call Gemini from there, the Gemini MCP server bridges the two.
Frequently asked questions
Is Gemini CLI really free? Yes. When you sign in with a personal Google account, you get a free daily quota. The limits change, so check the current numbers in the official repository.
Do I need to know how to code to use it? No. You talk in plain English. You only need to learn how to open the terminal, go into a folder and approve what the agent wants to do.
Does Gemini CLI work on Windows?
Yes. Install Node.js, run npm install -g @google/gemini-cli in PowerShell, and type gemini.
Can I use Claude skills in Gemini CLI?
Yes. Skills are text files with instructions. You can point to them from GEMINI.md, reference them with @ in the conversation, or receive them through an MCP server.
Is it safe to let the agent work on my files? It is, if you use it carefully. Start in a test folder, read what it asks for before approving, and avoid the mode that approves everything automatically.
Read next
- Claude Code: what it is, how to download it and how much it costs: Anthropic's terminal agent, explained from scratch.
- Is Claude Code free? Prices and plans: to compare the cost with Gemini CLI.
- Agent Skills: the open standard: why the same skill works across several agents.
- CLAUDE.md: the file that makes Claude Code smarter: the same tips apply to your GEMINI.md.
- Best AI for programming in 2026: an overview of the tools to help you choose yours.
Free MCP
Give your AI 15,000+ skills, for free
Plug the Skillpedia MCP into Claude, Cursor, Codex or any AI. Before each task, it finds the right skill on its own.
- 01Get your free key
- 02Paste one line into your AI
- 03Ask for any task
Full guide on this topic: Claude Code: What It Is, What It Does, and How to Start (2026 Guide)
5 new skills a week. 1 minute to read.
The most viewed skills of the week, explained simply. Free.