Dev tools

Gemini CLI: How to Install It and the Antigravity Switch

Gemini CLI is Google's open-source AI agent for the terminal. How to install and use it, who it's for now, the move to Antigravity CLI and how it compares.

By OmniAI Editorial · Nov 20, 2026 · 8 min read

Gemini CLI is Google's open-source AI agent for the terminal: it reads your code, edits files, runs commands and connects to tools through the Model Context Protocol (MCP), using Google's Gemini models. It's free and open source under the Apache 2.0 licence, and you install it with npm install -g @google/gemini-cli. But its role has changed: on June 18, 2026, Google moved free users and Google AI Pro and Ultra subscribers to a new terminal agent, Antigravity CLI (command agy), which shares its engine with the Antigravity desktop app. Gemini CLI now mainly serves organizations using Gemini Code Assist Standard or Enterprise and some paid API and Vertex AI setups. If you're an individual starting today, Antigravity CLI is usually the tool to install.

This guide covers what Gemini CLI is, how to install and use it, who should still use it, how to move to Antigravity CLI, and how it compares with Claude Code.

What Is Gemini CLI?

Gemini CLI is a command-line AI agent. Like other coding agents, it works in a loop: you describe a task, and it reads files, plans, edits code, runs shell commands and checks the results, asking for your approval before risky actions. Key features:

  • Open source: the code is on GitHub under the Apache 2.0 licence, with a large community of contributors.
  • Built-in tools: reading and writing files, shell commands, web search and fetching web pages.
  • Project context files: a GEMINI.md file gives the agent instructions about your project, similar to AGENTS.md and CLAUDE.md. Our guide to AGENTS.md explains how these files work.
  • MCP support: connect external tools and data sources through MCP servers configured in ~/.gemini/settings.json.
  • Extensions: packages that add commands, context and MCP servers.
  • Non-interactive mode for scripts and automation.

What Changed: Gemini CLI and Antigravity CLI

In May 2026, Google announced that it would consolidate its developer agents around Antigravity. The key changes:

Gemini CLIAntigravity CLI
Commandgeminiagy
Who it's forGemini Code Assist Standard and Enterprise, Code Assist for GitHub on Google Cloud, legacy paid API and Vertex AI keysFree users and Google AI Pro and Ultra subscribers (since June 18, 2026)
Built withTypeScript and Node.jsGo
Shares engine withIts ownThe Antigravity desktop app
Newest modelsNot tuned for the latest Gemini modelsBuilt for Google's newest models
CustomizationGEMINI.md, MCP, extensions, skills, hooksAgent Skills, hooks, subagents, plugins (extensions carried over as plugins); still reads GEMINI.md and AGENTS.md
LicenceOpen source (Apache 2.0)Check Google's terms

In short: Gemini CLI continues for enterprise customers, while individual developers are expected to use Antigravity CLI.

A light terminal window with four ink prompt lines and an arrow pointing to two overlapping documents, one light and one grey, above an orange tick.
A terminal agent reads your project, runs commands and proposes changes for approval.

Gemini CLI Install

The Gemini CLI install needs Node.js. Choose one method:

npm install -g @google/gemini-cli   # install globally with npm
npx @google/gemini-cli              # or run without installing
brew install gemini-cli             # or use Homebrew on macOS and Linux

Then start it in your project folder:

cd my-project
gemini

On first run, it asks you to sign in. For organizations, that's usually a Google account with a Gemini Code Assist licence, or an API key or Vertex AI project configured through environment variables, as described in the project's README.

How to Use Gemini CLI

Once it's running, you work in plain language:

  • Explore code: "Explain how authentication works in this project."
  • Make changes: "Add input validation to the signup form and update the tests."
  • Run tasks: "Run the test suite and fix any failures."
  • Use files in prompts: reference files with @path/to/file.
  • Slash commands: /help lists commands, /memory manages context and /tools shows available tools.

Good habits:

  1. Create a GEMINI.md describing how to build, test and follow your conventions.
  2. Review every proposed change before approving it, especially shell commands.
  3. Commit often, so you can roll back easily.
  4. Add MCP servers for tools you use, such as issue trackers or databases, with care about permissions.

How to Use Gemini CLI for Free

How to use Gemini CLI for free changed with the Antigravity switch. Gemini CLI's own code is free and open source, but the model access behind it now depends on your account:

  • Individuals with a personal Google account, including Google AI Pro and Ultra subscribers, now get their terminal agent access through Antigravity CLI rather than Gemini CLI.
  • Organizations using Gemini Code Assist Standard or Enterprise continue to use Gemini CLI as part of their licence.
  • Developers with paid Gemini API or Vertex AI keys may continue to use Gemini CLI with those keys, paying for usage.

If you want a free terminal agent from Google today, check Antigravity CLI's current free tier and limits.

Extending Gemini CLI with MCP and Extensions

Gemini CLI becomes more useful when it can reach the tools you already use. MCP servers are added in settings.json, either globally in your home folder or per project, and give the agent new tools such as querying a database, reading issues or calling an internal API. Extensions bundle MCP servers, custom commands and context into one installable package, which makes it easier to share a setup across a team. Add only servers you trust, and limit their permissions, since the agent can call them on its own.

Gemini CLI Safety Settings

Because a terminal agent can edit files and run commands, it's worth knowing the safety controls:

  • Approval prompts: by default, Gemini CLI asks before running shell commands and editing files. Avoid auto-approving everything except in throwaway environments.
  • Sandboxing: Gemini CLI can run tools inside a sandbox, such as a container, to limit what commands can affect on your machine.
  • Trusted folders: you can control which folders the agent treats as trusted before it loads project settings.
  • Scripts and automation: in non-interactive mode, such as in a script or CI job, give the agent only the permissions and credentials the task needs.

Antigravity CLI: Install and Migration

Antigravity CLI is Google's newer terminal agent. To install it:

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

On Windows, the documentation provides a PowerShell install command. The binary is installed as agy.

To migrate from Gemini CLI:

  1. Install Antigravity CLI and sign in with your Google account.
  2. Import your extensions with agy plugin import gemini, which converts Gemini CLI extensions to Antigravity plugins.
  3. Move workspace skills from .gemini/skills/ to .agents/skills/.
  4. Keep your context files: Antigravity CLI still reads GEMINI.md and AGENTS.md.
  5. Recheck MCP servers and hooks after migrating.
A grey open box on the left and a light box with a lid on the right, joined by an ink arrow with three small squares above it, the middle square orange.
Extensions, skills and context files move across from Gemini CLI to Antigravity CLI.

Gemini CLI vs Claude Code

Gemini CLI vs Claude Code is a common comparison, since both are terminal coding agents:

Gemini CLIClaude Code
MakerGoogleAnthropic
ModelsGemini modelsClaude models
Open sourceYes (Apache 2.0)No
Context fileGEMINI.md (also reads AGENTS.md if configured)CLAUDE.md
MCP supportYesYes
ExtensionsExtensions, skills, hooksSkills, hooks, subagents, plugins
Cloud and background tasksThrough other Google productsCloud sessions on the web and mobile
AccessEnterprise Code Assist licences and paid API keys; individuals moved to Antigravity CLIPaid Claude plans or API

Both are capable. For individuals choosing today, the realistic comparison is Antigravity CLI vs Claude Code. Our guide to how to use Claude Code covers Anthropic's agent in detail, and our Claude Code vs Cursor comparison covers editor-based options.

Should You Still Use Gemini CLI?

Your situationRecommendation
Your company uses Gemini Code Assist Standard or EnterpriseUse Gemini CLI
You're an individual with a free Google account or Google AI Pro or UltraUse Antigravity CLI
You need a fully open-source agent you can modifyGemini CLI's code remains open source
You use paid Gemini API or Vertex AI keysGemini CLI still works; check Google's guidance on the newest models

FAQ

What is Gemini CLI?

Gemini CLI is Google's open-source AI agent for the terminal. It uses Gemini models to read and edit code, run commands and connect to tools through MCP, guided by a GEMINI.md project file.

How do I install Gemini CLI?

Install it with npm install -g @google/gemini-cli, run it without installing using npx @google/gemini-cli, or use brew install gemini-cli on macOS and Linux. Then run gemini in your project folder.

Is Gemini CLI still free?

The code is free and open source, but free and Google AI Pro and Ultra access moved to Antigravity CLI on June 18, 2026. Gemini CLI now mainly serves Gemini Code Assist enterprise customers and paid API or Vertex AI users.

What is Antigravity CLI?

Antigravity CLI is Google's newer terminal coding agent, run with the agy command. It's built in Go, shares its engine with the Antigravity desktop app, and supports skills, hooks, subagents and plugins.

Is Gemini CLI better than Claude Code?

Neither is better for everyone. Both are capable terminal agents with MCP support. Gemini CLI is open source and tied to Google's models and licences; Claude Code uses Claude models and offers cloud sessions. Try both on your own tasks.

All articles

Read next

Language

EnglishEnglish · en TürkçeTurkish · tr DeutschGerman · de العربيةArabic · ar

Account

Enter your email. We’ll send you a sign-in link and a 6-digit code. No password needed.

Sign in

Theme

Language

Show our email address

To keep spam out of our inbox, please confirm your own email first. We will send you a 6-digit code.

We send codes only to these providers: gmail.com, googlemail.com, outlook.com, hotmail.com, live.com, msn.com, proton.me, protonmail.com, pm.me, icloud.com, me.com, mac.com, yahoo.com, aol.com, gmx.de, gmx.net, web.de, t-online.de, yandex.com, omniai.blog