Introduction
Google quietly released a powerful new tool: Gemini CLI, an open-source AI agent that brings the capabilities of its Gemini 2.5 Pro model directly to your terminal. With a 1 million-token context window, free-tier access, and seamless integration with local tools, Gemini CLI is poised to become a key companion for developers, DevOps engineers, and power users alike. This groundbreaking command-line interface represents a significant shift from traditional browser-based AI interactions to a more integrated, terminal-native approach that enhances developer productivity and streamlines workflows.
This blog explores Gemini CLI in-depth—its architecture, installation, features, use cases, and how it’s changing the way developers interact with code and AI from the command line.
What Is Gemini CLI?
Gemini CLI is a command-line interface powered by Gemini 2.5 Pro, enabling developers to use conversational AI within their terminal. Released as an open-source project on GitHub under the Apache 2.0 license, it’s a versatile AI companion capable of handling large projects, writing code, summarizing documents, and even interacting with the system shell.
It bridges the power of AI with the efficiency of the terminal, a favorite environment for developers.
Why choose the Gemini-CLI Terminal?
While many AI tools exist as web apps or IDE extensions, Gemini CLI is different; it integrates directly into your command-line workflow, removing context-switching and offering fast, local-like experiences using Google’s hosted models.
Key Features of Gemini CLI
- 1 Million Token Context Window
Gemini 2.5 Pro supports 1M tokens (approximately 750 pages), enabling long conversations and in-depth reasoning on large codebases, logs, or entire PDF documents.
- Free Gemini 2.5 Pro Access
You can access Gemini 2.5 Pro with your personal Google account—no credit card or billing required. Limits: 60 requests per minute, 1,000 per day.
- Multimodal AI Agent
It supports text, code, file input, and multimodal capabilities (e.g., PDFs, diagrams). When extended, it can interact with Imagen (images), Veo (videos), and Lyria (music).
- Shell Execution (
/shell)
Commands like !ls or !git status let Gemini CLI run and reason over terminal output, making it perfect for DevOps tasks and log analysis.
- Project-Aware Context (
GEMINI.md)
A GEMINI.md A file in your repo can guide the AI on preferred coding styles, technologies used, or project instructions, making responses more contextual.
- Extensibility via Model Context Protocol (MCP)
Gemini Terminal utilizes MCP to connect to custom backends or integrate tools such as web search, GitHub issues, Google Search grounding, or even home-grown APIs.
Experimental Tools and Add-ons
- /tools: View active tools like file editing or web search.
- /context: Show active context documents.
- /shell: Run system commands with AI commentary.
- /web: Ground answers in live web content.
- /help: View available command options.
How to install Gemini CLI locally?
You can easily set up Gemini CLI in a Python + Node.js environment. Follow these steps:
1 – Create a Conda Environment
conda create --name gemini-cli python=3.11 -y && conda activate gemini-cli
This creates and activates a clean environment.
2 – Install Node.js (>=18)
Install Node.js using the conda-forge channel:
conda install -c conda-forge nodejs
Make sure the installed version is Node.js 18 or higher, as older versions are incompatible.
3 – Install Gemini CLI Using npx
Now run the following command to install the CLI:
npx https://github.com/google-gemini/gemini-cli
On first launch, CLI will ask you to select a theme. Choose one, press Enter, and then proceed to the authentication method.
4 – Authentication Setup
Option 1 – Use Your Personal Google Account
When prompted, sign in with your Google account. This gives you:
- 60 model requests per minute
- 1,000 model requests per day
You can now start chatting with the Gemini model directly in your terminal.
Option 2 – Use an API Key for Advanced Use
For higher limits or custom models:
- Visit Google AI Studio and generate an API key.
- Set it as an environment variable:
export GEMINI_API_KEY="YOUR_API_KEY"
For team or Google Workspace-based auth, consult the Gemini CLI Auth Guide.
How to Use Gemini CLI?
Once authenticated, you can start chatting by typing any prompt.

Here are some powerful usage examples:
1. General Prompts
What is the score of pi?
Write a cover letter for the job application "Data Scientist" at X.
2. Shell-based Prompts
Show me CPU and GPU usage by command
list all the files in a directory
3. Web Search Tools
google_web_search(query="Give me the next 5 days' temperature.")
web_fetch(prompt="Write summary of this blog https://inventaai.com/mineru-2-install-guide-pdf-ocr-json-docker/")
You can also use /shell, /tools, and /context to inspect or extend how it interacts with your system.
Complete Guide to Gemini CLI Commands and Usage
Gemini CLI comes packed with a robust set of built-in commands to enhance your workflow. Using symbols like /, @, or !You can quickly control sessions, adjust settings, interact with files, or run shell commands — all without leaving your terminal environment.
Slash Commands (/)
/bug: Report an issue directly to the Gemini CLI GitHub, using your input as the bug headline./chat: Manage conversations by saving, resuming, or listing tagged sessions./clear: Wipe your terminal view and start fresh. Shortcut: Ctrl+L./compress: Summarize the entire chat context into a concise chunk to reduce token use./editor: Pick and configure your preferred text editor./helpor/?: Show helpful guidance and command references./mcp: Check details of configured MCP servers, including descriptions and JSON schemas. Shortcut: Ctrl+T toggles descriptions./memory: Add, show, or refresh instructional context from GEMINI.md files./restore: Roll back project files to their state before running a tool, handy for undoing edits./stats: Display session statistics like token usage and cached token savings./theme: Change the CLI’s appearance with a visual theme selector./auth: Switch your authentication method at any time./about: Get version information to share in support tickets./tools: Show available tools and toggle descriptions./quitor/exit: Leave the CLI session.
At Commands (@)
@file_or_dir: Include the contents of files or directories into your prompt for Gemini to process, summarize, or explain. Git-aware filtering keeps out node_modules, .env, and other ignored files by default.@alone: Pass your message as-is, useful when discussing@directly.
Shell Commands (!)
!command: Run system commands in your shell, returning the output to the terminal.!alone: Switch to shell mode, interpreting your input as raw shell commands until you exit back to normal mode.
Use these tools to tailor Gemini CLI exactly to your development environment, boost productivity, and seamlessly merge AI with your existing terminal workflows. More Details Follow Here
How Gemini CLI Differs from Other AI Tools
| Feature | Gemini CLI | GitHub Copilot CLI | OpenAI CLI |
|---|---|---|---|
| Free Tier | ✅ Yes (Gemini 2.5 Pro) | ❌ Limited | ❌ Limited |
| Token Limit | ✅ 1M tokens | ~8k | ~16k |
| Multimodal | ✅ Yes | ❌ No | ⚠️ Partial |
| Open Source | ✅ Apache 2.0 | ❌ No | ⚠️ SDKs only |
| Custom Backends | ✅ MCP protocol | ❌ | ⚠️ Some via API |
Gemini CLI gives developers more transparency, flexibility, and scale than most competitors.
Official GitHub: Click Here
Conclusion
Google’s Gemini CLI is a game-changing open-source AI agent designed for developers who prefer the power and simplicity of the terminal. It integrates Gemini 2.5 Pro into your daily workflow, offering fast, secure, multimodal assistance at zero cost.
From code reviews to web search, documentation, and shell operations, it helps you do more, faster, and smarter. And with API key support, it scales for advanced users too.
The tool’s open-source nature, combined with Google’s robust AI capabilities, creates compelling opportunities for developers seeking to enhance their productivity while maintaining their preferred terminal-based workflows. As the development community increasingly adopts AI-assisted tools, Gemini CLI’s unique approach of bringing AI directly to the terminal positions it as a potentially transformative solution.
For developers ready to embrace the future of AI-assisted development, Gemini CLI offers a practical, accessible entry point that requires minimal workflow disruption while providing maximum capability enhancement. Whether you’re working on personal projects or enterprise applications, this tool deserves serious consideration as part of your development toolkit.
🚀 Want to know more about my journey in AI, tech tutorials, and digital exploration? Learn more about me here 👤 and follow my latest insights on Medium 📝 for in-depth articles, and feel free to connect with me on LinkedIn 🔗.
Md Monsur Ali is a tech writer and researcher specializing in AI, LLMs, and automation. He shares tutorials, reviews, and real-world insights on cutting-edge technology to help developers and tech enthusiasts stay ahead.

Nice post