# Gemini CLI

> Source: https://aiwiki.ai/wiki/gemini_cli
> Updated: 2026-09-23
> Fact-checked: 2026-09-23
> Categories: AI Agents, AI Code Generation, Developer Tools, Google, Open Source AI
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) - attribute to "AI Wiki (aiwiki.ai)"
> Cite as: AI Wiki. "Gemini CLI." aiwiki.ai, 23 Sept 2026. https://aiwiki.ai/wiki/gemini_cli
> From AI Wiki (https://aiwiki.ai), the free encyclopedia of artificial intelligence. Reuse freely with attribution.

**Gemini CLI** is an open-source, terminal-based [AI agent](https://aiwiki.ai/wiki/ai_agents) developed by Google that brings [Gemini](https://aiwiki.ai/wiki/gemini) models directly into the command line for coding, file editing, shell automation, and research grounded in real-time [Google Search](https://aiwiki.ai/wiki/google_search). Released on June 25, 2025, under the Apache 2.0 license, it paired an interactive reason-and-act (ReAct) agent loop with a free tier, since discontinued, that Google described at launch as "the industry's largest allowance: 60 model requests per minute and 1,000 requests per day at no charge," backed by [Gemini 2.5 Pro](https://aiwiki.ai/wiki/gemini_2_5_pro) and its 1 million token [context window](https://aiwiki.ai/wiki/context_window).[1][2] Built on Node.js and written almost entirely in [TypeScript](https://aiwiki.ai/wiki/typescript), Gemini CLI became one of the fastest-growing [open-source AI](https://aiwiki.ai/wiki/open_source_ai) projects of 2025, reaching roughly 50,000 GitHub stars within a week of launch and more than 100,000 by May 2026.[3][8][25]

The tool is positioned as a direct counterpart to [Claude Code](https://aiwiki.ai/wiki/claude_code) by Anthropic and the Codex CLI by OpenAI, distinguishing itself at launch through that free tier, the 1 million token context window, full open-source transparency, and native integration with Google's broader AI and cloud ecosystem.[1][2] As a class of tool it belongs to the emerging category of the terminal [coding agent](https://aiwiki.ai/wiki/coding_agent), software that reads, writes, and runs code autonomously from the shell rather than inside an editor.

Gemini CLI's run as Google's terminal agent for individual developers lasted just under one year. At Google I/O 2026 on May 19, 2026, Google announced that the tool would be superseded by Antigravity CLI, the terminal interface of its [Antigravity (Google)](https://aiwiki.ai/wiki/antigravity) agent platform, and the hosted service stopped serving requests for free-tier and individual subscription users on June 18, 2026; organizations holding Gemini Code Assist Standard or Enterprise licenses and users with paid Gemini API keys retain access.[25][26] Google continues to ship weekly releases for those users; version 0.60.0 reached the stable channel on September 15, 2026.[24][49]

## What is Gemini CLI and why did Google build it?

By 2025, the developer tooling landscape had shifted substantially toward AI-assisted workflows embedded directly in code editors and terminals. Anthropic's [Claude Code](https://aiwiki.ai/wiki/claude_code), launched in early 2025, demonstrated strong developer adoption for agentic coding tasks inside the terminal. OpenAI's Codex CLI similarly enabled GPT-series models to operate within shell environments. Google, despite having one of the world's leading AI research organizations in [Google DeepMind](https://aiwiki.ai/wiki/google_deepmind) and a broad suite of developer tools under [Google Cloud](https://aiwiki.ai/wiki/google_cloud), lacked a first-party open-source terminal agent that could compete directly in this space.

Google had already deployed [Gemini Code Assist](https://aiwiki.ai/wiki/gemini_code_assist), a VS Code and JetBrains IDE plugin, but the terminal remained underserved. Google's developer relations team recognized that terminals occupy a privileged position in developer workflows: they are ubiquitous across macOS, Linux, and Windows, do not require an IDE, and are the environment in which most DevOps work, scripting, and CI/CD automation takes place.

The strategic motivation for open-sourcing Gemini CLI was threefold. First, open sourcing under Apache 2.0 would lower the barrier for enterprise adoption by organizations wary of proprietary AI tooling. Second, it would allow the developer community to extend the tool through plugins and integrations, expanding its ecosystem without requiring Google to build every integration internally. Third, it would enable transparent inspection of how the agent operates, addressing concerns about AI systems taking unintended actions on developer machines.

Gemini CLI shares underlying technology with Gemini Code Assist, Google's professional IDE-based coding assistant, enabling a unified experience across terminal and IDE contexts.[1] The project is maintained by Google under the `google-gemini` GitHub organization and accepts community contributions.[3]

## When was Gemini CLI released and how was it open sourced?

Google announced and released Gemini CLI on June 25, 2025, publishing the source code to the GitHub repository at `github.com/google-gemini/gemini-cli`.[3] The release was made under the Apache 2.0 license, which permits commercial use, modification, distribution, and sublicensing without royalty obligations, subject to attribution requirements.[1] In the launch post Google framed the design directly: "Because Gemini CLI is fully open source (Apache 2.0), developers can inspect the code to understand how it works and verify its security implications."[1]

The release was accompanied by a blog post on the Google Developers Blog and covered prominently by technology press including TechCrunch and The Verge.[2][14] The developer community response was exceptional: the repository accumulated approximately 17,000 GitHub stars overnight and surpassed 50,000 stars within the first week.[8] This rapid adoption placed Gemini CLI among the fastest-growing open-source AI tool repositories of 2025.

Google announced the tool as being in preview at launch, with active development ongoing.[14] The project welcomed community contributions, and the GitHub Issues and Discussions sections quickly filled with feature requests, bug reports, and proposed extensions. Alongside the main CLI tool, Google also launched a companion GitHub Action, `google-gemini/gemini-cli-action`, enabling Gemini CLI to be invoked within automated CI/CD pipelines.

The choice of an open-source release contrasted with Anthropic's Claude Code, which remained a closed proprietary tool, while aligning with OpenAI's decision to open-source the Codex CLI. Both Gemini CLI and Codex CLI adopted the Apache 2.0 license, while Claude Code's license notice reads "All rights reserved."[2][34][36]

## How does Gemini CLI work?

Gemini CLI is implemented primarily in TypeScript (approximately 98% of the codebase), with the remainder in [JavaScript](https://aiwiki.ai/wiki/javascript).[3] It runs on Node.js and is distributed as an npm package under the package name `@google/gemini-cli`.[13] The tool can be invoked without installation using `npx @google/gemini-cli`, installed globally with `npm install -g @google/gemini-cli`, installed via Homebrew on macOS and Linux, or installed via Conda in restricted environments.

At its core, Gemini CLI operates as an agentic loop following a reason-and-act (ReAct) pattern.[1] The agent receives a user prompt, reasons about what steps are needed, invokes one or more built-in tools (file operations, shell commands, web search, etc.), observes the results, and continues reasoning until the task is complete or requires user input. This loop continues interactively in the terminal, allowing back-and-forth dialogue between the user and the agent.

Configuration is managed through `~/.gemini/settings.json` for global settings and project-level `GEMINI.md` files for workspace-specific context and instructions. `GEMINI.md` files function as persistent system prompt fragments: when Gemini CLI starts in a directory containing a `GEMINI.md` file, it loads that file's contents as context, allowing developers to encode project conventions, coding standards, preferred libraries, or architectural notes that the agent applies automatically.

The agent connects to Google's Gemini model API over HTTPS. Authentication could be handled through personal Google account OAuth (for the free tier), a Google AI Studio API key, or Vertex AI credentials for enterprise usage.[5] OAuth mode required no API key management, which simplified onboarding for individual developers. Since June 18, 2026, Gemini CLI no longer serves requests for users of the free Gemini Code Assist for individuals plan or for Google AI Pro and Ultra subscribers, whom Google directs to Antigravity CLI; it remains available through paid Gemini API keys and through Gemini Code Assist Standard or Enterprise licenses.[25][28]

Gemini CLI supports non-interactive invocation, allowing it to be called from shell scripts with a prompt passed on the command line, which enables integration into automation workflows and CI/CD pipelines without human interaction at runtime.

## Which models does Gemini CLI use?

At launch, Gemini CLI connected by default to [Gemini 2.5 Pro](https://aiwiki.ai/wiki/gemini_2_5_pro), Google's flagship model featuring a 1 million token context window.[1] By September 2026 competing terminal agents had caught up on context length: Claude Code runs Anthropic's current Opus, Sonnet, and Fable models with a 1 million token window on the Anthropic API, and OpenAI lists a 1,050,000-token API context window for GPT-6 Sol and GPT-6 Astra.[29][43][44] The 1 million token context window allows Gemini CLI to ingest entire large codebases, extended documentation sets, or lengthy conversation histories in a single request.

Users can select alternative models at runtime using the `-m` flag. For example, `gemini -m gemini-2.5-flash` targets the faster, lower-latency Flash variant of the 2.5 series. As the Gemini model family has evolved post-launch, Gemini CLI has been updated to support newer models including those in the Gemini 3 series.[23]

[Gemini 3 Pro](https://aiwiki.ai/wiki/gemini_3_pro), released later in 2025, brought improved reasoning capabilities and maintained the 1 million token context window, with updates to multimodal understanding. Support for Gemini 3 Pro in Gemini CLI was added after the initial June release.[17] The tool's architecture is designed to remain model-agnostic at the API layer, facilitating rapid adoption of new Gemini model variants as Google releases them.

Gemini 3 Pro became available in Gemini CLI on November 18, 2025, the day Google released the model, initially for Google AI Ultra subscribers and developers using paid Gemini API keys, with other tiers placed on a waitlist; enabling it required upgrading to version 0.16.x and switching the "Preview features" toggle in `/settings` to true.[17] [Gemini 3 Flash](https://aiwiki.ai/wiki/gemini_3_flash) and a preview of [Gemini 3.1 Pro](https://aiwiki.ai/wiki/gemini_3_1_pro), selectable with `-m gemini-3.1-pro-preview`, were added subsequently.[23] The CLI also gained automatic model routing: straightforward requests are dispatched to [Gemini 2.5 Flash](https://aiwiki.ai/wiki/gemini_2_5_flash), while complex tasks route to Gemini 3 Pro where enabled, with Gemini 2.5 Pro as the fallback.[23] Auto routing is the default: if no model is set by flag, environment variable, or settings file, the CLI uses the `auto` model setting.[46]

Multimodal inputs are supported through the Gemini API: developers can provide images, PDFs, and references to video content alongside text prompts.[1] This enables workflows such as providing a UI screenshot or a wireframe sketch and asking Gemini CLI to generate corresponding code, or providing a PDF of a technical specification and asking the agent to implement the described interface.

## Does Gemini CLI support the Model Context Protocol?

Gemini CLI implements the [Model Context Protocol](https://aiwiki.ai/wiki/model_context_protocol) (MCP),[1] an open standard developed by Anthropic in late 2024 that defines a common interface for connecting AI agents to external tools and data sources. By supporting MCP, Gemini CLI can integrate with any MCP-compatible server, enabling connections to databases, version control systems, communication platforms, cloud services, and custom internal APIs.

MCP servers are configured in the `mcpServers` section of `~/.gemini/settings.json`. Each server entry specifies a transport type (stdio, HTTP, or Docker), the command or URL to invoke the server, and optional environment variables. When Gemini CLI starts, it establishes connections to all configured MCP servers and presents their exposed tools to the model as available capabilities.

The MCP ecosystem around Gemini CLI grew rapidly after launch, with community-contributed servers for GitHub, Slack, PostgreSQL, Google Sheets, Notion, and many other services. Extensions (described below) can bundle their own MCP servers, making it straightforward for users to install pre-packaged integrations.[4]

Gemini CLI's MCP client implementation supports all three transport layers defined by the protocol: stdio-based local processes, streamable HTTP servers, and Docker-containerized servers. This flexibility accommodates both lightweight local integrations and more complex, containerized tool servers. Performance optimizations, such as Node.js wrapper layers for MCP servers built on platforms with slow startup times, have been documented by community contributors.

## What can Gemini CLI do? Built-in tools and capabilities

Gemini CLI ships with several built-in tools that the agent can invoke autonomously during task execution:

**File System Operations.** The agent can read files, write files, create new files, move files, and search within files. These operations enable Gemini CLI to navigate and modify codebases without requiring the user to manually copy and paste content into the prompt.

**Shell Command Execution.** The agent can execute arbitrary shell commands, enabling it to run test suites, build tools, linters, version control commands, package managers, and other terminal utilities. Shell command execution is the most powerful and also potentially most sensitive capability: by default, Gemini CLI does not run in a sandboxed environment, and all commands execute with the permissions of the user running the agent.

**Google Search Grounding.** Gemini CLI can perform Google Search queries to retrieve real-time information, documentation, library references, or current events. Search results are incorporated into the model's context before generating a response, enabling accurate answers about recently released software versions, API changes, or other time-sensitive information.[1]

**Web Fetching.** Beyond Search, the agent can fetch the content of specific URLs, parse web pages, and incorporate their content into its reasoning. This is useful for reading library documentation, checking API specifications, or retrieving data from web services.

**Conversation Checkpointing.** Gemini CLI supports saving and resuming conversations, allowing developers to pause a complex, multi-step task and resume it in a later session without losing the accumulated context and intermediate results.

**Non-Interactive Scripting.** Commands can be provided directly on the command line or piped via stdin, allowing Gemini CLI to be embedded in shell scripts, Makefiles, and other automation workflows without human interaction.

## Is Gemini CLI free? Free tier and pricing

The free tier for individuals ended on June 18, 2026, when Gemini CLI stopped serving requests for the free Gemini Code Assist for individuals plan and for Google AI Pro and Ultra subscribers; Google pointed those users to Antigravity CLI.[25][28] The personal-account limits below describe the offering before that date.

One of Gemini CLI's most distinctive launch features was its free tier, described by Google at release as offering "the industry's largest allowance" for an AI coding CLI.[1] Under the free tier, developers authenticated using a personal Google account via OAuth and received a complimentary Gemini Code Assist license that granted access to Gemini 2.5 Pro with no API key required.[1][5]

The free tier limits were:

- 60 model requests per minute [1]
- 1,000 model requests per day [1]

Google stated at launch that these limits were approximately double the average request rate observed during internal developer testing, indicating the thresholds were calibrated to accommodate real-world usage patterns without requiring most developers to upgrade.[2]

For developers who prefer to use an unpaid Google AI Studio API key rather than OAuth, the daily limit is reduced to 250 requests per day with access to the Flash model tier only.[5]

Beyond the free tier, Gemini CLI supports several paid configurations:

**Google AI Pro and AI Ultra.** Individual subscription plans that raised daily limits to 1,500 and 2,000 requests per day, respectively, until Gemini CLI stopped serving these subscribers on June 18, 2026.[5][28]

**Gemini Code Assist Standard and Enterprise.** Professional plans for teams and organizations, offering 1,500 and 2,000 daily requests per user respectively, along with enterprise support, compliance features, and integration with Google Workspace.[5]

**Vertex AI Pay-as-You-Go.** Developers and organizations can connect Gemini CLI to Vertex AI using standard Google Cloud credentials, at which point usage is billed per token according to Vertex AI pricing.[5] For Gemini 2.5 Pro, this is approximately $1.25 per million input tokens and $10.00 per million output tokens as of 2025. This option provides the highest throughput and is suitable for production automation pipelines or CI/CD integration at scale.

Token usage for the current session can be monitored with the `/stats model` command within the CLI interface.

## Extension and Plugin System

Gemini CLI includes a formal extension framework that allows developers and third parties to package and distribute reusable configurations, tools, and integrations. Extensions are installed from GitHub repositories or local directories using the `gemini extensions install <url-or-path>` command. Installed extensions are stored in `~/.gemini/extensions/` and loaded automatically at startup.[4]

Each extension is defined by a `gemini-extension.json` manifest file at the extension's root directory.[4] This manifest can specify:

- **MCP server definitions**, each with a command specification and optional environment variables, enabling the extension to expose custom tools to the model
- **Context files** (defaulting to a `GEMINI.md` within the extension directory) that provide domain-specific instructions, playbooks, or system prompt fragments
- **Custom commands** defined in TOML format files within a `commands/` subdirectory, encapsulating complex prompts or workflows into simple slash commands
- **Tool exclusions** that disable specific built-in tools or restrict tool parameter patterns (for example, preventing the agent from running `rm -rf` commands)

Extensions are enabled globally across all workspaces by default, though workspace-level settings can override this. When naming conflicts arise between extension-provided commands and user-defined or project-level commands, extension commands are automatically prefixed with the extension name. For example, a `gcp` extension's `deploy` command that conflicts with an existing `/deploy` command becomes `/gcp.deploy`.[4]

The extension framework uses dynamic path variables (`${extensionPath}`, `${workspacePath}`, `${/}`) to ensure that MCP server configurations remain portable across different machines and operating systems.[4]

Google published a growing directory of official and community extensions, covering integrations with Google Cloud services, GitHub (including pull request review automation), database tools, and productivity applications.[15] The Jules extension for Gemini CLI, released later in 2025, allows developers to delegate asynchronous background coding tasks to [Jules (Google)](https://aiwiki.ai/wiki/jules_google) directly from the Gemini CLI interface.[9]

On October 8, 2025, Google formalized this ecosystem with the public launch of Gemini CLI Extensions, accompanied by a browsable extensions marketplace on the geminicli.com site. Twenty-two partner-built extensions were available at launch from companies including Atlassian, Canva, Dynatrace, Elastic, Figma, GitLab, MongoDB, Postman, Shopify, Snyk, Stripe, and Wix, alongside Google's own extensions for products such as Chrome DevTools, Firebase, and Flutter.[15][16] Each extension carries a "playbook" of structured instructions that teaches the agent how to use the bundled tools, so integrations produce useful results without manual configuration.[15] In contrast to curated competitor ecosystems, extensions are published as public GitHub repositories that developers can install without Google's approval or involvement.[16] TechCrunch reported at the extensions launch that Gemini CLI had surpassed one million users since June 2025, and quoted Google senior director of product management Ryan J. Salva describing the goal as turning the tool into "an extensibility platform, a conduit to other tools and instructions that come from elsewhere in your tool chain."[16]

## How does Gemini CLI compare to Claude Code and Codex CLI?

Gemini CLI entered a market with two established terminal AI coding tools: Anthropic's [Claude Code](https://aiwiki.ai/wiki/claude_code) and OpenAI's [Codex CLI](https://aiwiki.ai/wiki/codex_cli). Each tool has distinct architectural and pricing characteristics. The table below reflects each vendor's documentation, pricing pages, and repositories as of September 23, 2026.

| Feature (as of September 2026) | Gemini CLI | Claude Code | Codex CLI |
|---|---|---|---|
| Developer | Google | Anthropic | OpenAI |
| License | Apache 2.0 (open source) [3] | Proprietary ("All rights reserved") [34] | Apache 2.0 (open source) [36] |
| Primary language | TypeScript [3] | Not stated | Rust [36] |
| Status | Maintained for Code Assist Standard and Enterprise and paid API key users (v0.60.0 stable, September 15, 2026); individual Google accounts moved to Antigravity CLI on June 18, 2026 [24][25][50] | Actively updated; Claude Opus 5.5 requires v2.1.280 or later [29] | Actively updated; v0.156.1 released September 23, 2026 [51] |
| Default model | `auto` routing between Gemini Pro and Flash models [23][46] | [Claude Opus 5.5](https://aiwiki.ai/wiki/claude_opus_5_5) on Pro, Max, Team, Enterprise, and the Anthropic API [29] | A recommended model when none is configured (OpenAI's Codex CLI page shows GPT-6 Sol); OpenAI recommends [GPT-6 Sol](https://aiwiki.ai/wiki/gpt_6_sol) for complex coding, with [GPT-6 Astra](https://aiwiki.ai/wiki/gpt_6_astra) and GPT-6 Luna selectable [38][42][51] |
| Context window | 1 million tokens (Gemini 3 models) [3] | 1 million tokens on the Anthropic API for Opus 4.7 and later, Sonnet 5, and Fable models [29] | Depends on model; 1,050,000 tokens for GPT-6 Sol and GPT-6 Astra in the API [43][44] |
| Free access | Personal-account free tier ended June 18, 2026 (was 1,000 requests/day) [25][50] | Not in Claude Free; included from Pro [35] | ChatGPT Free and Go include Codex with GPT-6 Luna in the desktop app (subject to rollout); CLI listed from Plus [37] |
| Paid access | Gemini Code Assist Standard or Enterprise, or paid Gemini API and Gemini Enterprise Agent Platform API keys [25] | Pro ($20/month billed monthly), Max (from $100/month), Team, Enterprise, or an Anthropic Console account [35][52] | Plus ($20/month), Pro (from $100/month), Business, Enterprise and Edu, or an API key at API rates [37] |
| Sandboxing | Opt-in via `--sandbox` flag, environment variable, or settings (macOS Seatbelt, Docker or Podman containers, a native Windows sandbox, gVisor, or experimental LXC) [48] | Opt-in via `/sandbox` or `sandbox.enabled` (Seatbelt on macOS, bubblewrap on Linux and WSL2) [31] | On by default in the default permissions mode (Seatbelt on macOS, bubblewrap on Linux, native Windows sandbox) [39][40] |
| MCP support | Yes [1] | Yes [32] | Yes [41] |
| Image input | Yes; also PDFs and sketches [3] | Yes [33] | Yes (`codex --image`) [42] |
| Native Windows | Yes; Windows 11 24H2+ recommended [47] | Yes (Windows 10 1809+ or Windows Server 2019+); sandbox needs WSL2 [30][31] | Yes, with a native Windows sandbox; Windows 11 recommended [40] |
| Best [Terminal-Bench](https://aiwiki.ai/wiki/terminal_bench) 4.0 result | No Gemini CLI entry [45] | 57.9% ± 3.8 (Claude Fable 5.1, max effort) [45] | 58.2% ± 2.8 (GPT-6 Astra, max effort) [45] |

On the official Terminal-Bench 4.0 leaderboard, which scores an agent harness and a model together, the top entry as of September 23, 2026 was Codex running GPT-6 Astra at maximum reasoning effort (58.2 percent), followed by four entries tied at 57.9 percent, among them Claude Code running [Claude Fable 5.1](https://aiwiki.ai/wiki/claude_fable_5_1) at maximum effort, a gap well inside the board's 95 percent confidence intervals. The board had no Gemini CLI entry; its Gemini results, Gemini 3.8 Flash at 19.1 percent and Gemini 3.7 Flash at 11.2 percent, were run in the mini-SWE-agent harness.[45] Gemini CLI's last official entries were on the earlier Terminal-Bench 2.1 board, where Google-submitted runs of Gemini CLI with Gemini 3 Pro and with Gemini 3.1 Pro each scored 65.8 percent in May 2026; 2.1 scores are not comparable with 4.0 scores.[53] The 1 million token context window that set Gemini CLI apart at launch is no longer unique: Claude Code runs current Anthropic models with a 1 million token window on the Anthropic API, and OpenAI lists 1,050,000 tokens for GPT-6 Sol and GPT-6 Astra in its API.[29][43][44]

Of the three, only Codex CLI documents its sandbox as on by default. In its default permissions mode, commands run inside an OS-level sandbox (Seatbelt on macOS, bubblewrap on Linux and WSL2, and a native Windows sandbox under PowerShell) that controls which files the agent can modify and whether commands can use the network.[39][40] Claude Code and Gemini CLI both ship sandboxes but leave them off until the user enables them: Claude Code through `/sandbox` or the `sandbox.enabled` setting, using Seatbelt on macOS and bubblewrap on Linux and WSL2 (native Windows is not supported), and Gemini CLI through the `--sandbox` flag, the `GEMINI_SANDBOX` environment variable, or its settings file, using macOS Seatbelt, Docker or Podman containers, a native Windows sandbox, gVisor, or experimental LXC.[31][48]

On cost, until it ended on June 18, 2026, Gemini CLI's free tier gave individual developers and small teams a significant advantage for experimenting with AI-assisted coding. OpenAI's pricing page now includes Codex in ChatGPT Free and ChatGPT Go ($8 per month), listing GPT-6 Luna in the desktop app for those plans, subject to rollout; it lists Codex in the CLI from ChatGPT Plus ($20 per month), or with an API key billed at API rates.[37] Claude Code is not part of the Claude Free plan: it is included from Claude Pro ($20 billed monthly, or $17 per month with annual billing), with Max plans from $100 per month; most Claude Code surfaces require either a Claude subscription or an Anthropic Console account.[35][52] Gemini CLI remains available through Gemini Code Assist Standard or Enterprise licenses and paid API keys.[25][50]

Open source status is shared by Gemini CLI and Codex CLI under the Apache 2.0 license, while Claude Code remains proprietary.[3][34][36] This matters for enterprise teams that require code auditability, customization rights, or the ability to host the tool internally.

## GitHub Actions Integration

Alongside the main CLI tool, Google released the `google-gemini/gemini-cli-action` GitHub Action, enabling Gemini CLI to be embedded in GitHub repository workflows. The action can be triggered by pull request events, issue creation, scheduled cron jobs, or manual workflow dispatches.[10]

Common workflow patterns include:

**Automated PR Review.** When a pull request is opened, the action invokes Gemini CLI to analyze the diff, review code quality, flag potential security issues, and post structured feedback as a pull request comment. The review covers code maintainability, performance considerations, and adherence to project conventions encoded in `GEMINI.md`.

**Issue Triage.** When new GitHub Issues are created, the action can analyze issue content, apply labels, assign priority levels, and post initial responses based on the project's issue history and documented conventions.

**Documentation Generation.** Scheduled workflows can invoke Gemini CLI to generate or update documentation based on changes to source code.

Authentication in GitHub Actions can be configured via a Gemini API key stored as a repository secret, Workload Identity Federation for keyless authentication in Google Cloud environments, the default `GITHUB_TOKEN` for simpler use cases, or a custom GitHub App.[10]

The GitHub integration graduated to a worldwide public beta in August 2025 under the repository `google-github-actions/run-gemini-cli`, shipping with three pre-built workflows (intelligent issue triage, accelerated pull request review, and on-demand collaboration triggered by mentioning `@gemini-cli` in issues or pull requests) and a `/setup-github` quickstart command, which requires Gemini CLI version 0.1.18 or later.[10] Google emphasized credential-less authentication through Workload Identity Federation, command allowlisting for least-privilege execution, and OpenTelemetry support so teams can monitor the agent's actions in their observability platforms.[10]

## Jules Integration

In late 2025, Google released a Jules extension for Gemini CLI that bridges the interactive terminal agent with [Jules (Google)](https://aiwiki.ai/wiki/jules_google), Google's autonomous background coding agent. Jules operates asynchronously: it accepts a task description, clones the relevant repository into a virtual machine, implements the required changes, and returns the results without requiring continuous developer attention.[9]

The Jules extension within Gemini CLI allows developers to delegate a task from their terminal session to Jules for asynchronous background execution while continuing to work on other tasks interactively in Gemini CLI. Both tools share the same view of the project, enabling coordination between interactive and autonomous coding workflows. The combination represents a two-tier approach: Gemini CLI for iterative, collaborative tasks requiring real-time feedback, and Jules for well-scoped, parallelizable tasks that can execute independently.

## Feature Expansion and Release Cadence (2025-2026)

Gemini CLI shipped on a weekly release cadence across three distribution channels (nightly, preview, and stable), and releases continued after the June 2026 transition, with version 0.60.0 reaching the stable channel on September 15, 2026.[24][49] Several major capabilities were added over this period.

**Plan Mode.** Released on March 11, 2026, in version 0.33.0, Plan Mode is a read-only operating mode that restricts the agent to non-mutating tools such as `read_file`, `grep_search`, and `glob` while it researches the codebase and drafts an implementation plan.[19][20] It is invoked with the `/plan` command, by cycling approval modes with Shift+Tab, or by launching the CLI with `--approval-mode=plan`.[19] The mode introduced an `ask_user` tool that lets the agent pause its research to ask clarifying questions, and it routes planning work to higher-reasoning Pro models, including [Gemini 3.1 Pro](https://aiwiki.ai/wiki/gemini_3_1_pro), before implementation is handed back to faster models; approving the finalized plan exits Plan Mode and begins execution.[19]

**Subagents.** Announced on April 15, 2026, subagents allow the primary agent to delegate complex, repetitive, or high-volume tasks to specialized expert agents, each running with its own isolated context window, custom system instructions, and curated tool set.[21] Subagents are defined as Markdown files with YAML frontmatter, stored globally in `~/.gemini/agents` or per project in `.gemini/agents`, and can be bundled inside extensions. Gemini CLI ships with three built-in subagents (`generalist`, `cli_help`, and `codebase_investigator`); users can invoke a subagent explicitly with `@agent` syntax, list configured subagents with `/agents`, or let the CLI route tasks automatically, including running multiple subagents in parallel.[21]

**Agent Skills.** Gemini CLI added support for [Agent Skills](https://aiwiki.ai/wiki/agent_skills), the cross-vendor open format in which a skill is a self-contained directory built around a `SKILL.md` file that packages instructions, scripts, and resources into a discoverable capability the agent loads on demand.[22] Google's May 2026 transition notice identified Agent Skills, Hooks, Subagents, and Extensions as the most critical Gemini CLI features, all of which carry over to its successor product.[25]

**Post-transition releases.** Releases after June 2026 concentrated on security hardening. Version 0.58.0 (September 1, 2026) isolated Docker and container runtime sockets in the macOS sandbox; version 0.59.0 (September 8) enforced a fail-closed workspace trust policy and mitigated server-side request forgery during MCP OAuth discovery; and version 0.60.0 (September 15) added consent prompts for environment changes and isolated settings and temporary directories inside sandbox containers.[24]

| Date | Milestone |
|---|---|
| June 25, 2025 | Open-source release under Apache 2.0 with Gemini 2.5 Pro as the default model [1] |
| July 25, 2025 | Version 0.1.14 patches the Tracebit-reported command allowlist flaw [18] |
| August 2025 | Gemini CLI GitHub Actions public beta (`run-gemini-cli`) [10] |
| October 8, 2025 | Extensions framework and geminicli.com marketplace launch with 22 partners; one million users surpassed [15][16] |
| November 18, 2025 | Gemini 3 Pro available to Google AI Ultra subscribers and paid API key users [17] |
| March 11, 2026 | Plan Mode released in version 0.33.0 [19][20] |
| April 15, 2026 | Subagents released [21] |
| May 19, 2026 | Antigravity CLI announced at Google I/O 2026 with a transition plan [25] |
| June 3, 2026 | Version 0.45.0 stable release [24] |
| June 18, 2026 | End of service for free-tier and individual subscription users, who are directed to Antigravity CLI [25][28] |
| September 15, 2026 | Version 0.60.0 stable release [24][49] |

## What is Gemini CLI used for?

Gemini CLI supports a broad range of developer workflows:

**Codebase Understanding.** The 1 million token context window allows developers to load entire medium-to-large codebases and ask questions about architecture, dependencies, data flow, or specific module behavior without needing to manually identify and extract relevant files.

**Feature Implementation.** Developers describe a feature in natural language, and Gemini CLI reads the relevant existing code, generates an implementation, writes tests, and can run the tests to verify correctness before the developer reviews the changes.

**Debugging.** Error messages, stack traces, or failing tests can be provided to the agent along with relevant source files. The agent reasons about the cause and proposes or directly implements fixes.

**Refactoring.** Large-scale refactoring tasks, such as migrating to a new framework version, renaming identifiers consistently across a codebase, or restructuring module organization, benefit from the large context window that allows the agent to understand the full scope of required changes.

**Research and Documentation.** Grounded with Google Search, the agent can answer questions about library APIs, recent framework changes, or industry best practices, incorporating real-time information rather than relying solely on training data.

**Multimodal Prototyping.** Providing a screenshot of a UI, a PDF wireframe, or an exported Figma design allows Gemini CLI to generate corresponding HTML, CSS, and JavaScript or framework-specific component code.

**CI/CD Automation.** Through the GitHub Actions integration and non-interactive invocation mode, Gemini CLI can be embedded in build pipelines for automated code review, test generation, or documentation updates.

**Google Cloud Workflows.** Native integration with Vertex AI, Cloud Functions, BigQuery, and other Google Cloud services makes Gemini CLI particularly productive for teams operating on Google Cloud infrastructure.

## Reception

The initial reception to Gemini CLI was strongly positive within the developer community. The rapid accumulation of GitHub stars (50,000 in one week)[8] reflected genuine enthusiasm, particularly around three factors: the generous free tier, the open-source licensing, and the 1 million token context window.

TechCrunch's launch coverage noted that the free tier limits were "roughly double the average number of requests developers made when using the tool" during internal testing, suggesting Google had calibrated the tier to accommodate most individual developers without charge.[2] The article also noted broader industry context: a 2024 Stack Overflow survey had found that only 43% of developers trusted the accuracy of AI tools, a headwind that all AI coding assistants faced regardless of vendor.[2]

The speed with which the community began building extensions and MCP integrations was noted as a positive sign of ecosystem health. Google's decision to launch a companion GitHub Action simultaneously with the CLI addressed an immediate request from teams looking to integrate AI assistance into existing CI/CD workflows.

Third-party comparisons shifted as the three products changed. A July 2026 CodeAnt comparison wrote that "Claude Code is strongest when model quality and long, multi-file work matter most," recommended Codex where native Windows support, default sandboxing, an open-source client, or an existing ChatGPT plan drives the decision, and rated Gemini CLI the best fit for Google Cloud teams that already hold Code Assist licenses. It also observed that the 1 million token context window "stopped being Gemini's moat this year."[11]

A Plan Mode feature added in early 2026, in which Gemini CLI restricts itself to reading the codebase and proposing a strategy without writing any files, was welcomed by developers who wanted to review an agent's intended approach before granting write access.[19] This addressed a common concern about agentic tools making unintended changes to codebases.

## Is Gemini CLI safe? Limitations and security

**Security and Sandboxing.** The most significant criticism of Gemini CLI at launch was the absence of default sandboxing. Unlike Codex CLI, which runs shell commands inside an OS-level sandbox by default,[39] Gemini CLI executed shell commands directly in the user's environment. A FOSS Force analysis published shortly after launch summarized the risk: the agent had broad access to the user's home directory, including the ability to create, read, modify, and delete files, with only user-level permission prompts as a safeguard.[12]

Security researchers discovered and disclosed two critical vulnerabilities in Gemini CLI and its associated GitHub Action.[6][7] The first, a silent data exfiltration vulnerability, combined two flaws to execute shell commands without user permission or knowledge.[7] The second, assigned a CVSS score of 10.0 (the maximum severity), was a remote code execution vulnerability affecting non-interactive (headless) mode: in CI/CD environments, Gemini CLI automatically trusted the current workspace folder and loaded any agent configuration found there without sandboxing or human approval, creating a pathway for attackers to execute arbitrary code by placing malicious configuration files in a repository.[6] Google patched both vulnerabilities after responsible disclosure, and the incidents led to increased attention to headless mode security configurations.[6][7]

The exfiltration flaw was reported by security firm Tracebit, which discovered it on June 27, 2025: a [prompt injection](https://aiwiki.ai/wiki/prompt_injection) hidden in a repository's README or `GEMINI.md` context files could chain a malicious command behind an allowlisted one using a semicolon, while whitespace padding pushed the payload out of the visible terminal output. Google fixed the issue in version 0.1.14, released July 25, 2025, three days before public disclosure.[18] The workspace-trust remote code execution issue was disclosed in April 2026 by researchers at Novee Security and affected both Gemini CLI and the `run-gemini-cli` GitHub Action; because the malicious configuration executed before sandbox initialization, the attack bypassed model-level safety measures entirely and could expose CI/CD secrets, credentials, and source code.[6]

**Benchmark Performance.** Gemini CLI's last official Terminal-Bench entries were on the 2.1 board, where Google-submitted runs with Gemini 3 Pro and Gemini 3.1 Pro each scored 65.8 percent in May 2026,[53] and as of September 23, 2026 the official Terminal-Bench 4.0 leaderboard, led by Codex and Claude Code entries at about 58 percent, listed no Gemini CLI entry.[45]

**No Default Sandboxing.** While sandbox modes are available, they require explicit user configuration and are not enabled by default, placing the burden of security configuration on individual users and potentially exposing less security-aware developers to risk.

**Privacy Considerations.** Local files processed by Gemini CLI are transmitted to Google's API infrastructure as part of prompts. This has implications for organizations with data residency requirements or those working with sensitive intellectual property, though enterprise Vertex AI configurations offer greater data control.

**Windows Support.** Gemini CLI runs natively on Windows, and Google's installation guide recommends Windows 11 24H2 or later.[47] Version 0.36.0 (April 1, 2026) added native macOS Seatbelt and Windows sandboxing for subagents.[24] Windows support is no longer a point of difference with Codex CLI, which once recommended WSL2 but now runs natively on Windows with its own Windows sandbox.[40]

**[Rate Limits](https://aiwiki.ai/wiki/ai_usage_limits) on Free Tier.** Before the personal-account free tier ended on June 18, 2026, its 1,000 requests per day limit could be exhausted by intensive users, particularly in workflows that involve many small, iterative queries during active development sessions.

## What replaced Gemini CLI? Transition to Antigravity CLI

On May 19, 2026, at Google I/O 2026, Google announced that Gemini CLI would be superseded by Antigravity CLI, the terminal component of the Antigravity 2.0 release of [Antigravity (Google)](https://aiwiki.ai/wiki/antigravity), the company's agent-first development platform.[25][27] Google framed the change as consolidating its developer tooling into a single product line built for multi-agent development. Antigravity CLI is written in Go rather than TypeScript, which Google said makes it faster and more responsive, and it is designed for asynchronous workflows in which multiple agents are orchestrated in the background, for example running large-scale refactors or several research tasks without blocking the terminal session.[25] Google acknowledged there would not be one-to-one feature parity at the outset, but said Agent Skills, Hooks, Subagents, and Extensions (renamed Antigravity plugins) are supported in the new tool.[25]

Under the published transition schedule, Gemini CLI and the Gemini Code Assist IDE extensions stopped serving requests on June 18, 2026, for users of the free Gemini Code Assist for individuals plan and for Google AI Pro and AI Ultra subscribers. Organizations using Gemini Code Assist Standard or Enterprise licenses, users of Gemini Code Assist for GitHub through Google Cloud, and holders of paid Gemini API keys retain access, and Google said it would continue to support Gemini CLI for those customers with access to the latest Gemini models. The consumer version of Gemini Code Assist for GitHub stopped accepting new installations on June 18, 2026, and Google's deprecation schedule lists its shutdown date as July 17, 2026.[25][26][28]

At the time of the announcement, Google credited the project with more than 100,000 GitHub stars, over 6,000 merged pull requests, and hundreds of outside contributors, and trade press reported the tool had reached millions of users.[25][27] Google stated that the open-source codebase "remains available to the community as an Apache 2.0 licensed repository with no changes."[26] The Register noted that Antigravity CLI, by contrast, had not been released as open source at announcement, and described the reaction in the project's GitHub discussions as strongly negative, citing developer frustration over Antigravity usage quotas and over open-source contributions feeding a proprietary successor.[26]

## See Also

- [Gemini](https://aiwiki.ai/wiki/gemini)
- [Gemini 2.5 Pro](https://aiwiki.ai/wiki/gemini_2_5_pro)
- [Gemini 3 Pro](https://aiwiki.ai/wiki/gemini_3_pro)
- [Google DeepMind](https://aiwiki.ai/wiki/google_deepmind)
- [Claude Code](https://aiwiki.ai/wiki/claude_code)
- [Codex (OpenAI)](https://aiwiki.ai/wiki/codex)
- [OpenAI Codex CLI](https://aiwiki.ai/wiki/codex_cli)
- [Terminal-Bench](https://aiwiki.ai/wiki/terminal_bench)
- [Coding agent](https://aiwiki.ai/wiki/coding_agent)
- [Model Context Protocol](https://aiwiki.ai/wiki/model_context_protocol)
- [Jules (Google)](https://aiwiki.ai/wiki/jules_google)
- [Gemini Code Assist](https://aiwiki.ai/wiki/gemini_code_assist)
- [Antigravity (Google)](https://aiwiki.ai/wiki/antigravity)
- [Agent Skills](https://aiwiki.ai/wiki/agent_skills)
- [Gemini 3 Flash](https://aiwiki.ai/wiki/gemini_3_flash)

## References

1. Google Developers Blog. "Introducing Gemini CLI: your open-source AI agent." June 25, 2025. https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemini-cli-open-source-ai-agent/
2. TechCrunch. "Google unveils Gemini CLI, an open source AI tool for terminals." June 25, 2025. https://techcrunch.com/2025/06/25/google-unveils-gemini-cli-an-open-source-ai-tool-for-terminals/
3. GitHub. "google-gemini/gemini-cli." https://github.com/google-gemini/gemini-cli
4. Gemini CLI Documentation. "Extensions." https://google-gemini.github.io/gemini-cli/docs/extensions/
5. Gemini CLI Documentation. "Quotas and pricing." https://geminicli.com/docs/resources/quota-and-pricing/
6. SecurityWeek. "Critical Gemini CLI Flaw Enabled Host Code Execution, Supply Chain Attacks." 2025. https://www.securityweek.com/critical-gemini-cli-flaw-enabled-host-code-execution-supply-chain-attacks/
7. SC Media. "Google fixes Gemini CLI flaws that risked silent data exfiltration." 2025. https://www.scworld.com/news/google-fixes-gemini-cli-flaws-that-risked-silent-data-exfiltration/
8. LinkedIn. Jack Wotherspoon. "50k GitHub stars in one week for Gemini CLI." July 2025. https://www.linkedin.com/posts/jack-wotherspoon_50k-github-stars-in-one-week-for-gemini-activity-7346536562991448064-hzo0
9. Google Developers Blog. "Introducing the Jules extension for Gemini CLI." 2025. https://developers.googleblog.com/en/introducing-the-jules-extension-for-gemini-cli/
10. Google Developers Blog. "Meet your new AI coding teammate: Gemini CLI GitHub Actions." 2025. https://blog.google/technology/developers/introducing-gemini-cli-github-actions/
11. CodeAnt AI. "Claude Code vs Codex CLI vs Gemini CLI: Which Is Best in 2026?" July 6, 2026. https://www.codeant.ai/blogs/claude-code-cli-vs-codex-cli-vs-gemini-cli-best-ai-cli-tool-for-developers-in-2025
12. FOSS Force. "Gemini CLI AI Is Cool, but You Should Wear Protection." July 2025. https://fossforce.com/2025/07/gemini-cli-ai-is-cool-but-you-should-wear-protection/
13. npm. "@google/gemini-cli." https://www.npmjs.com/package/@google/gemini-cli
14. Help Net Security. "Google's Gemini CLI brings open-source AI agents to developers." June 26, 2025. https://www.helpnetsecurity.com/2025/06/26/google-gemini-cli-open-source-ai-agents/
15. Google. "Gemini CLI extensions let you customize your command line." October 8, 2025. https://blog.google/innovation-and-ai/technology/developers-tools/gemini-cli-extensions/
16. TechCrunch. "Google launches extensions system for its command-line coding tool." October 8, 2025. https://techcrunch.com/2025/10/08/google-launches-extensions-system-for-its-command-line-coding-tool/
17. Google Developers Blog. "5 things to try with Gemini 3 Pro in Gemini CLI." November 18, 2025. https://developers.googleblog.com/en/5-things-to-try-with-gemini-3-pro-in-gemini-cli/
18. BleepingComputer. "Flaw in Gemini CLI AI coding assistant allowed stealthy code execution." July 28, 2025. https://www.bleepingcomputer.com/news/security/flaw-in-gemini-cli-ai-coding-assistant-allowed-stealthy-code-execution/
19. Google Developers Blog. "Plan mode is now available in Gemini CLI." March 11, 2026. https://developers.googleblog.com/plan-mode-now-available-in-gemini-cli/
20. GitHub Discussions. "Gemini CLI v0.33.0: Introducing Plan Mode for Safer, Smarter Gemini CLI." google-gemini/gemini-cli, March 2026. https://github.com/google-gemini/gemini-cli/discussions/22078
21. Google Developers Blog. "Subagents have arrived in Gemini CLI." April 15, 2026. https://developers.googleblog.com/subagents-have-arrived-in-gemini-cli/
22. Gemini CLI Documentation. "Agent Skills." https://geminicli.com/docs/cli/skills/
23. Gemini CLI Documentation. "Gemini 3 Pro and Gemini 3 Flash on Gemini CLI." https://geminicli.com/docs/get-started/gemini-3/
24. Gemini CLI Documentation. "Gemini CLI release notes." https://geminicli.com/docs/changelogs/
25. Google Developers Blog. "An important update: Transitioning Gemini CLI to Antigravity CLI." May 19, 2026. https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/
26. The Register. "Bye-bye, Gemini CLI; Google nudges devs toward Antigravity." May 20, 2026. https://www.theregister.com/ai-ml/2026/05/20/bye-bye-gemini-cli-google-nudges-devs-toward-antigravity/5243605
27. Virtualization Review. "Google Moves Gemini CLI Into Antigravity CLI as Agent Platform Expands." May 19, 2026. https://virtualizationreview.com/articles/2026/05/19/google-moves-gemini-cli-into-antigravity-cli-as-agent-platform-expands.aspx
28. Google for Developers. "Gemini Code Assist deprecations." Last updated September 2, 2026, accessed September 23, 2026. https://developers.google.com/gemini-code-assist/docs/deprecations
29. Claude Code Docs. "Model configuration." Anthropic, accessed September 23, 2026. https://code.claude.com/docs/en/model-config
30. Claude Code Docs. "Advanced setup." Anthropic, accessed September 23, 2026. https://code.claude.com/docs/en/setup
31. Claude Code Docs. "Configure the sandboxed Bash tool." Anthropic, accessed September 23, 2026. https://code.claude.com/docs/en/sandboxing
32. Claude Code Docs. "Connect Claude Code to tools via MCP." Anthropic. https://code.claude.com/docs/en/mcp
33. Claude Code Docs. "Common workflows." Anthropic. https://code.claude.com/docs/en/common-workflows
34. GitHub. "anthropics/claude-code: LICENSE.md." https://github.com/anthropics/claude-code/blob/main/LICENSE.md
35. Anthropic. "Plans & Pricing." Accessed September 23, 2026. https://claude.com/pricing
36. GitHub. "openai/codex." Apache-2.0 license. https://github.com/openai/codex
37. OpenAI. "Pricing." Codex documentation, accessed September 23, 2026. https://developers.openai.com/codex/pricing
38. OpenAI. "Models." Codex documentation, accessed September 23, 2026. https://developers.openai.com/codex/models
39. OpenAI. "Sandbox." Codex documentation. https://developers.openai.com/codex/concepts/sandboxing
40. OpenAI. "Windows sandbox." Codex documentation. https://developers.openai.com/codex/windows
41. OpenAI. "Model Context Protocol." Codex documentation. https://developers.openai.com/codex/mcp
42. OpenAI. "Codex CLI." Codex documentation. https://developers.openai.com/codex/cli
43. OpenAI. "GPT-6 Sol Model." OpenAI API documentation. https://developers.openai.com/api/docs/models/gpt-6-sol
44. OpenAI. "GPT-6 Astra Model." OpenAI API documentation. https://developers.openai.com/api/docs/models/gpt-6-astra
45. Terminal-Bench. "Terminal-Bench 4.0 leaderboard." tbench.ai, accessed September 23, 2026. https://www.tbench.ai/leaderboard/terminal-bench/4.0
46. Gemini CLI Documentation. "Model routing." https://geminicli.com/docs/cli/model-routing/
47. Gemini CLI Documentation. "Gemini CLI installation, execution, and releases." https://geminicli.com/docs/get-started/installation/
48. Gemini CLI Documentation. "Sandboxing in Gemini CLI." https://geminicli.com/docs/cli/sandbox/
49. GitHub. "Release v0.60.0." google-gemini/gemini-cli, September 15, 2026. https://github.com/google-gemini/gemini-cli/releases/tag/v0.60.0
50. Google for Developers. "Gemini Code Assist consumer accounts." Last updated September 2, 2026. https://developers.google.com/gemini-code-assist/docs/deprecations/code-assist-individuals
51. OpenAI. "Changelog." Codex documentation, accessed September 23, 2026. https://developers.openai.com/codex/changelog
52. Claude Code Docs. "Overview." Anthropic. https://code.claude.com/docs/en/overview
53. Terminal-Bench. "Terminal-Bench 2.1 leaderboard." tbench.ai, Wayback Machine capture of August 26, 2026. https://web.archive.org/web/20260826020311/https://www.tbench.ai/leaderboard/terminal-bench/2.1

