Source URL: https://simonwillison.net/2025/Jun/25/gemini-cli/
Source: Simon Willison’s Weblog
Title: Gemini CLI
Feedly Summary: Gemini CLI
First there was Claude Code in February, then OpenAI Codex (CLI) in April, and now Gemini CLI in June. All three of the largest AI labs now have their own version of what I am calling a “terminal agent" – a CLI tool that can read and write files and execute commands on your behalf in the terminal.
I’m honestly a little surprised at how significant this category has become: I had assumed that terminal tools like this would always be something of a niche interest, but given the number of people I’ve heard from spending hundreds of dollars a month on Claude Code this niche is clearly larger and more important than I had thought!
I had a few days of early access to the Gemini one. It’s very good – it takes advantage of Gemini’s million token context and has good taste in things like when to read a file and when to run a command.
Like OpenAI Codex and unlike Claude Code it’s open source (Apache 2) – the full source code can be found in google-gemini/gemini-cli on GitHub. The core system prompt lives in core/src/core/prompts.ts – I’ve extracted that out as a rendered Markdown Gist.
As usual, the system prompt doubles as extremely accurate and concise documentation of what the tool can do! Here’s what it has to say about comments, for example:
Comments: Add code comments sparingly. Focus on why something is done, especially for complex logic, rather than what is done. Only add high-value comments if necessary for clarity or if requested by the user. Do not edit comments that are seperate from the code you are changing. NEVER talk to the user or describe your changes through comments.
The list of preferred technologies is interesting too:
When key technologies aren’t specified prefer the following:
Websites (Frontend): React (JavaScript/TypeScript) with Bootstrap CSS, incorporating Material Design principles for UI/UX.
Back-End APIs: Node.js with Express.js (JavaScript/TypeScript) or Python with FastAPI.
Full-stack: Next.js (React/Node.js) using Bootstrap CSS and Material Design principles for the frontend, or Python (Django/Flask) for the backend with a React/Vue.js frontend styled with Bootstrap CSS and Material Design principles.
CLIs: Python or Go.
Mobile App: Compose Multiplatform (Kotlin Multiplatform) or Flutter (Dart) using Material Design libraries and principles, when sharing code between Android and iOS. Jetpack Compose (Kotlin JVM) with Material Design principles or SwiftUI (Swift) for native apps targeted at either Android or iOS, respectively.
3d Games: HTML/CSS/JavaScript with Three.js.
2d Games: HTML/CSS/JavaScript.
As far as I can tell Gemini CLI only defines a small selection of tools:
edit: To modify files programmatically.
glob: To find files by pattern.
grep: To search for content within files.
ls: To list directory contents.
shell: To execute a command in the shell
memoryTool: To remember user-specific facts.
read-file: To read a single file
write-file: To write a single file
read-many-files: To read multiple files at once.
web-fetch: To get content from URLs.
web-search: To perform a web search (using Grounding with Google Search via the Gemini API).
I found most of those by having Gemini CLI inspect its own code for me! Here’s that full transcript, which used just over 300,000 tokens total.
How much does it cost? The announcement describes a generous free tier:
To use Gemini CLI free-of-charge, simply login with a personal Google account to get a free Gemini Code Assist license. That free license gets you access to Gemini 2.5 Pro and its massive 1 million token context window. To ensure you rarely, if ever, hit a limit during this preview, we offer the industry’s largest allowance: 60 model requests per minute and 1,000 requests per day at no charge.
It’s not yet clear to me if your inputs can be used to improve Google’s models if you are using the free tier – that’s been the situation with free prompt inference they have offered in the past.
You can also drop in your own paid API key, at which point your data will not be used for model improvements and you’ll be billed based on your token usage.
Tags: google, open-source, ai, generative-ai, llms, ai-assisted-programming, gemini, ai-agents, coding-agents
AI Summary and Description: Yes
Short Summary with Insight: The text discusses the introduction of the Gemini CLI, a terminal agent developed by Google that enhances AI-assisted programming tasks by reading and writing files, alongside executing commands. Its open-source nature and substantial token allowance for free usage represent significant developments in the realm of AI tools designed for coding, emphasizing a shift toward more powerful, user-friendly interfaces for developers.
Detailed Description: The Gemini CLI is part of a widening landscape of AI-driven terminal tools, indicating a growing trend in the industry toward sophisticated coding assistants. Several key points illustrate the importance and functionality of the Gemini CLI that security and compliance professionals should consider:
– **Product Release Context**:
– The Gemini CLI is part of a broader competitive landscape that includes Claude Code by Anthropic and OpenAI Codex.
– This indicates a significant investment and interest in AI tools for programming, which can directly influence security practices around software development.
– **Functionality**:
– The CLI tool allows for efficient interaction with the terminal, including:
– Reading and writing files
– Executing commands
– Utilizing a long context (up to one million tokens) to enhance its operational commands.
– **Open Source**:
– The Gemini CLI is open-source under the Apache 2 designation, promoting transparency and collaborative improvements.
– It signifies a growing trend towards open ecosystems in AI technologies, making it easier for developers to assess its security implications.
– **Documentation and Usability**:
– The system prompt serves as both functionality documentation and behavioral guidelines for the tool, indicating a shift towards more intelligent, self-aware software.
– The detailed guidance on preferred coding practices could impact code quality and compliance with security standards.
– **Technology Preferences**:
– The Gemini CLI lists preferred technologies for development, which includes widely-used frameworks and languages, suggesting a targeted approach for future user adoption.
– This could influence how coding standards evolve in tandem with security requirements.
– **Memory and Cost Structure**:
– It offers a free tier with an extensive allowance for requests, making it accessible while also raising questions about data usage and privacy implications, especially for those using Google accounts.
– Clarity is needed on whether user prompts during free usage will contribute to model improvements, implicating user data privacy policies.
– **Security Considerations**:
– As AI coding assistants are increasingly integrated into the development pipeline, compliance professionals must account for potential vulnerabilities they introduce, emphasizing the need for secure coding practices and robust monitoring of tool usage.
In summary, the Gemini CLI illustrates a significant advancement in AI-assisted programming tools and carries implications for security and compliance professionals concerning software development practices, data privacy, and the evolving landscape of open-source contributions.