Back to terminal directory

AI coding agents · AI coding

Gemini CLI

Google's open-source Gemini agent. Since June 2026 it needs a paid API key, Vertex AI or Code Assist; free users moved to Antigravity CLI.

Open sourceTypeScript
Official site
Short answer

Gemini CLI is Google's open-source AI agent for the terminal, licensed under Apache 2.0. Since June 18, 2026, it no longer serves free Google accounts or Google AI Pro and Ultra subscribers. Google moved those users to Antigravity CLI, a new terminal agent that shares its engine with the Antigravity desktop app. Gemini CLI still works with a paid Gemini API key, with Vertex AI, and with Gemini Code Assist Standard and Enterprise licenses. Install it with npm install -g @google/gemini-cli or Homebrew, run gemini in a project, and choose an authentication method.

License
Apache 2.0
GitHub, google-gemini/gemini-cli
Free and Google AI plan access ended
June 18, 2026
Google Developers Blog
Replacement for consumer users
Antigravity CLI
Google
Code Assist Standard daily requests
1,500
Gemini CLI docs

Updated October 21, 2026How we evaluate tools

Gemini CLI guide: who can still use it, setup, features and the move to Antigravity CLI

Gemini CLI launched in June 2025 and quickly became one of the most popular open-source coding agents, passing 100,000 GitHub stars and more than 6,000 merged pull requests. Much of its appeal came from a free tier that let anyone with a Google account use Gemini models in the terminal at no cost.

That changed in 2026. On May 19, 2026, Google announced that free users and Google AI Pro and Ultra subscribers would move to a new tool, Antigravity CLI. The cutoff took effect on June 18, 2026. Gemini CLI is still maintained and still open source, but it now serves developers who pay through the Gemini API, Vertex AI or a Gemini Code Assist license.

This page explains who can use Gemini CLI today, how to set it up, what it does and how it compares with Antigravity CLI and other agents.

Who can use Gemini CLI now

Account typeGemini CLI after June 18, 2026
Free personal Google accountNo. Moved to Antigravity CLI
Google AI Pro or Ultra subscriberNo. Moved to Antigravity CLI
Gemini API key (paid tier)Yes, billed per token
Vertex AI on Google CloudYes, billed through your Cloud project
Gemini Code Assist StandardYes, 1,500 model requests per user per day
Gemini Code Assist EnterpriseYes, 2,000 model requests per user per day

If you sign in with an account in the first two rows, Gemini CLI tells you to move to Antigravity CLI. API key and Vertex AI users pay standard Gemini API rates, which differ by model.

Google also states that using Gemini CLI's OAuth sign-in through third-party tools violates its terms. Several projects had routed other agents through Gemini CLI's free login. That route is closed.

Installing Gemini CLI

Gemini CLI is a Node.js program and needs Node 20 or newer.

MethodCommand
npmnpm install -g @google/gemini-cli
Homebrewbrew install gemini-cli
Run without installingnpx @google/gemini-cli

Then run gemini inside a project. On first launch it asks you to pick an authentication method. For an API key, set GEMINI_API_KEY in your environment. For Vertex AI, set your Google Cloud project and location and sign in with gcloud. Code Assist users sign in with their organization account.

How it works

Gemini CLI follows the same pattern as other terminal agents. You describe a task, and it reads files, proposes edits, runs shell commands and checks the results. Each file write and command waits for your approval unless you allow it in settings or run in a mode that accepts edits automatically.

Its built-in tools include file reading and writing, search across the project, shell commands, web fetch and Google Search grounding, which lets the model look up current documentation and error messages while it works. That last tool is a distinctive feature, since most agents need an MCP server or a separate integration for web search.

Features

GEMINI.md. A markdown file in your project, or in ~/.gemini/, that Gemini CLI loads as standing instructions. Use it for build commands, code style and project notes, the same way Claude Code uses CLAUDE.md and Codex CLI uses AGENTS.md. You can configure Gemini CLI to read AGENTS.md as well.

MCP servers. You add Model Context Protocol servers in settings.json to give the agent access to databases, issue trackers, design tools or internal APIs.

Extensions. Packages that bundle MCP servers, custom commands and context files, installed with gemini extensions install. Google and partners publish extensions for services such as Google Cloud, Firebase and various databases.

Custom slash commands. Define reusable prompts as TOML files and call them with a slash.

Checkpointing. Gemini CLI can snapshot the project before changes, and /restore rolls back to a checkpoint.

Headless mode. gemini -p "prompt" runs a single task and prints the result, with JSON output available for scripts. Google publishes a GitHub Action that uses this mode for pull request review and issue triage.

Sandboxing. On macOS it can run commands under Seatbelt profiles, and on any platform inside a Docker or Podman container.

Antigravity CLI, the replacement for consumer users

Antigravity CLI is Google's newer terminal agent. It is written in Go, ships as a single binary and shares its agent engine with the Antigravity 2.0 desktop app, so sessions, skills and settings work across both. It imports Gemini CLI skills, MCP server configuration and GEMINI.md files.

Install it with:

curl -fsSL https://antigravity.google/cli/install.sh | bash

Its plans follow Antigravity's pricing:

PlanPriceUsage
Free$0Weekly quota
Google AI Pro$20/monthLimits refresh every 5 hours, plus a weekly cap
Google AI Ultra$100 or $200/month5x or 20x Pro usage

Early users have reported frustration with the weekly reset on the free plan, which can leave you locked out for days after a heavy session, and with the lack of a diff preview before some file writes.

Where Gemini CLI still fits

  • Teams already on Google Cloud who want an open-source agent billed through Vertex AI.
  • Companies with Gemini Code Assist Standard or Enterprise licenses, where the daily request limits are generous and usage stays under Google Cloud terms.
  • Developers who want to read, fork or extend an agent's code. The Apache 2.0 license allows commercial forks, and Alibaba's Qwen Code began as a fork of Gemini CLI.
  • Work that benefits from very long context, such as reading a large codebase or a long log file in one pass.

Limits and risks

The account rules changed fast. Many tutorials and blog posts from 2025 still describe the free tier. Check which account you are using before you plan around it.

It runs real commands. In July 2025, a widely shared incident involved Gemini CLI deleting a user's files after misreading the result of a folder move. Keep approvals on for destructive commands, work on a branch, and use the sandbox for unattended runs.

API costs add up. On an API key, long sessions with large context can cost more than a flat subscription. Watch usage in Google AI Studio or the Cloud console.

Gemini CLI compared with other terminal agents

ToolWho can use itLicenseCost to start
Gemini CLIAPI, Vertex AI, Code AssistApache 2.0Gemini API rates or a Code Assist license
Antigravity CLIAny Google accountProprietaryFree weekly quota
Codex CLIAny ChatGPT accountApache 2.0Included on ChatGPT Free
Claude CodePaid Claude plans or APIProprietaryClaude Pro, $20/month
Qwen CodeAlibaba Cloud and other providersApache 2.0Provider rates
OpenCodeAny provider, including GeminiMITFree tool, pay for model

If you want a free agent from a large vendor, Codex CLI on ChatGPT Free and Antigravity CLI are the two options. If you want Gemini models in an open, provider-neutral tool, use a Gemini API key with Aider or OpenCode. For the wider picture, see the terminal tools guide.

Frequently asked questions

Is Gemini CLI still free?

Not for most individuals. Until June 18, 2026, anyone could sign in with a personal Google account and get a generous free daily allowance. Google ended that on June 18 and moved free users and Google AI Pro and Ultra subscribers to Antigravity CLI, which has its own free plan with a weekly quota. Gemini CLI itself remains free, open-source software, but you now need a paid Gemini API key, Vertex AI or a Gemini Code Assist Standard or Enterprise license to use it.

What is Antigravity CLI?

Antigravity CLI is Google's newer terminal agent, written in Go and built on the same agent engine as the Antigravity 2.0 desktop app. Google announced the change on May 19, 2026. It can import your Gemini CLI skills, MCP servers and GEMINI.md context. It uses Antigravity's plans: a free tier with a weekly quota, Google AI Pro at $20 a month with limits that refresh every five hours plus a weekly cap, and Ultra tiers at $100 and $200 a month.

How do I install Gemini CLI?

Gemini CLI needs Node.js 20 or newer. Install it with npm install -g @google/gemini-cli, with brew install gemini-cli on macOS or Linux, or run it once without installing via npx @google/gemini-cli. Start it with the gemini command inside a project folder. On first run it asks how you want to authenticate. Choose a Gemini API key, Vertex AI or your Code Assist organization login.

Can I use my Gemini CLI login in other tools?

Google says no. Its terms state that using Gemini CLI's OAuth sign-in from third-party software, such as other coding agents or proxies, violates the terms of service. If you want Gemini models in another tool such as OpenCode or Aider, use a Gemini API key or Vertex AI credentials in that tool.

What are Gemini CLI's main features?

It reads and edits files, runs shell commands with approval, and searches the web through built-in Google Search grounding. It supports MCP servers, a GEMINI.md file for project instructions, custom slash commands, extensions that bundle tools and prompts, checkpointing to roll back changes, and a non-interactive mode for scripts and CI. It also has a large context window inherited from Gemini models, which helps when you load big codebases.

Should I switch from Gemini CLI to something else?

If you used Gemini CLI on a free or Google AI account, your choices are Antigravity CLI, which keeps you with Google, or another agent. Codex CLI is included on every ChatGPT plan including Free. Claude Code needs a paid Claude plan. Aider and OpenCode work with any provider, including Gemini through an API key. If your company has Code Assist Standard or Enterprise, Gemini CLI keeps working as before.

Sources

  1. Google Developers Blog, Gemini CLI transition to Antigravity CLI
  2. Gemini CLI on GitHub
  3. Gemini CLI documentation
  4. Antigravity plans
  5. Gemini Code Assist editions
  6. Google, Gemini API pricing