Skip to content

Gemini CLI: Install, Sign-in, Pricing and the Antigravity Move

Gemini CLI now serves Code Assist licenses and paid API keys only.

The words "Gemini CLI" in large black type above a screenshot of the google-gemini/gemini-cli repository on GitHub, with its file list, Apache 2.0 license and 109k stars.

Pick the right Google terminal tool

Check your account type, choose Gemini CLI or Antigravity CLI, install it, sign in and add your MCP servers.

  1. Check account
  2. Pick the CLI
  3. Install
  4. Sign in
  5. Add MCP servers

Better Design

Direct answer

Gemini CLI is Google's open-source AI coding agent for the terminal. You install it with npm and run gemini. Since 18 June 2026 it no longer serves free, Google AI Pro or Ultra accounts. Individuals moved to Antigravity CLI, and Gemini CLI now serves Gemini Code Assist Standard and Enterprise licenses and paid API keys.

Published 21 November 2026 by the Better Design team. Versions, limits and US prices were read that day. Sources: the project's GitHub page and documentation, Google's transition post, the Antigravity docs and pricing page, and the Gemini API price list.

Summary

What it is
An open-source agent for the terminal. It reads your code, edits files, runs shell commands and connects to MCP servers.
Install
npm install -g @google/gemini-cli, then run gemini. It needs Node.js 20 or newer. The current stable version is 0.70.0.
Who can use it
Organizations with Gemini Code Assist Standard or Enterprise or Code Assist for GitHub on Google Cloud. Paid Gemini API and Vertex AI keys also work.
Who cannot
Free users and Google AI Pro and Ultra subscribers. Their access moved to Antigravity CLI on 18 June 2026.
Models
The /model menu offers Auto (Gemini 3) and Auto (Gemini 2.5). Google says the tool is not tuned for the Gemini 4 models.

What is Gemini CLI?

It is a terminal agent from Google, released as open source under the Apache 2.0 license. You type a task in plain words, and it reads files, proposes edits, runs commands and reports back. Google says the project passed 100,000 GitHub stars and 6,000 merged pull requests before the June 2026 change.

Developers use it to ask questions about a large codebase, fix issues from an error message, write a new feature and run the tests. It also handles a rebase or a task from a script. It can also build an app from a PDF, an image or a sketch, because the Gemini models read images.

Read the README on GitHub for its features and status notice.

Who can still use Gemini CLI?

It still works for organizations. Google moved individual users to Antigravity CLI and kept the original tool for enterprise Code Assist on Google Cloud. Check which group you are in before you install anything.

Still served
Gemini Code Assist Standard and Enterprise licenses and Code Assist for GitHub bought through Google Cloud. Paid Gemini API and Vertex AI keys work too.
Stopped on 18 June 2026
Google AI Pro and Ultra subscribers and free Gemini Code Assist for individuals. The Code Assist IDE extensions stopped serving these accounts on the same date.
Consumer Code Assist for GitHub
No new installs from 18 June 2026, and requests stopped in the weeks after.

If you sign in with a personal Google account and see errors, this change is the usual cause. Install Antigravity CLI instead, or use a paid API key.

Read Google's post on moving individual users to Antigravity CLI.

Which Google CLI do you need?

Google now ships three command line tools with similar names. The README on GitHub sorts them by who should use each one.

Antigravity CLI (agy)
An interactive coding agent with subagents. Use it with a free Google account, Google AI Pro or Ultra, Google Cloud, or for the Gemini 4 models.
Gemini API CLI (gemini-api)
A stateless command line client for the Gemini API, not a coding agent. Other agents such as Claude Code or Codex call it to generate images, analyze files or start managed agents.
Gemini CLI (gemini)
The original terminal agent. Google keeps it for Code Assist Standard and Enterprise, Code Assist for GitHub on Google Cloud, and paid API keys.

See the Gemini API CLI on GitHub.

How do you install Gemini CLI?

Install the package from npm with one command, then start it in your project folder. You need Node.js 20 or newer on macOS, Linux or Windows.

  1. Check Node.js with node --version, and install version 20 or newer if needed.
  2. Run npm install -g @google/gemini-cli, or brew install gemini-cli on macOS and Linux.
  3. Open your project folder in the terminal.
  4. Type gemini to start a session.
  5. Pick a sign-in method when asked, then type your first task.

To try it without installing, run npx @google/gemini-cli. MacPorts users can run sudo port install gemini-cli, and the README also shows an Anaconda setup for locked-down machines.

How do you update Gemini CLI?

Run npm install -g @google/gemini-cli@latest. Google publishes a stable release every Tuesday at 20:00 UTC. A preview release follows on Tuesdays at 23:59 UTC under the preview tag, and a nightly build ships every day. Version 0.70.0 was the latest on npm on 21 November 2026.

Follow Google's installation guide in the documentation.

Check the latest version on npm.

How do you sign in to Gemini CLI?

There are three ways to sign in. Pick the one that matches how your organization pays for Gemini.

Sign in with Google
For a Gemini Code Assist license from your organization. Set your Google Cloud project first with export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID".
Gemini API key
Create a key in Google AI Studio, click Set up billing to move its project to the Paid Tier, then export GEMINI_API_KEY="YOUR_API_KEY". A new key starts on the Free Tier, and Gemini CLI now serves paid API keys only. Keys on a paid project need no change.
Vertex AI
Export GOOGLE_API_KEY="YOUR_API_KEY" and export GOOGLE_GENAI_USE_VERTEXAI=true, or set GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION instead of the key. This suits teams that already run on Google Cloud.

The export lines above are for macOS and Linux. In Windows PowerShell, use $env: instead. For example: $env:GEMINI_API_KEY="YOUR_API_KEY". These last only for the current window unless you add them to your PowerShell profile.

Read the authentication guide.

Is Gemini CLI free?

No, not for individuals any more. The README says the tool has no free tier and does not serve Google AI plans. You pay through a Code Assist license or per token with an API key.

Gemini Code Assist Standard
Up to 1,500 model requests per user per day, as a fixed-price seat bought through Google Cloud.
Gemini Code Assist Enterprise
Up to 2,000 model requests per user per day.
Gemini API key, pay as you go
Gemini 2.5 Pro costs $1.25 per million input tokens and $10 per million output tokens for prompts up to 200,000 tokens. Gemini 2.5 Flash costs $0.30 and $2.50, and Gemini 3 Flash Preview $0.50 and $3.

Output prices include thinking tokens, so an agent that plans a lot costs more than its replies suggest. Type /stats model in a session to see token use and your limits, and set a budget on your Google Cloud billing account. Prices were read on 21 November 2026; recheck them before you commit.

Read the quota and pricing page in the documentation.

Check current rates on the Gemini API price list.

What can Gemini CLI do?

Project context
A GEMINI.md file in your project tells the agent your rules, and ~/.gemini/GEMINI.md holds rules for every project.
MCP servers
Connect tools such as databases, issue trackers or design tools through the Model Context Protocol.
Extensions, Agent Skills, hooks and subagents
Add your own commands and split work between agents.
Plan mode and checkpointing
Review a plan before edits, then save and resume a session.
Security
Sandboxing and trusted folders limit what the agent may run and where.
Web search and fetch
Ground answers in current pages.
Headless mode
Run gemini -p "your prompt" in a script, with --output-format json or stream-json for structured output.

Which commands should you know?

gemini
Start a session in the current folder.
gemini -m gemini-2.5-flash
Start with a chosen model.
gemini --include-directories ../lib,../docs
Give the agent more folders.
/model
Switch between Auto (Gemini 3), Auto (Gemini 2.5) and a manual pick.
/stats model
Show token use and limits for the session.
/help
List every slash command.

Read the model selection docs.

How do you move from Gemini CLI to Antigravity CLI?

Install Antigravity CLI and run it in a project that has your old setup. On first launch it finds your settings and offers to convert them. A few paths change, so check them after the import.

  1. Install it on macOS or Linux with curl -fsSL https://antigravity.google/cli/install.sh | bash. Windows has PowerShell and CMD installers on the same page.
  2. Run agy --version to check the install, then run agy in your project.
  3. Pick the extensions and settings to convert from the first-launch checklist.
  4. Run agy plugin import gemini to turn old extensions into Antigravity plugins.
  5. Move project skills from .gemini/skills/ to .agents/skills/.
  6. Move MCP servers from ~/.gemini/settings.json to ~/.gemini/config/mcp_config.json, or .agents/mcp_config.json for one project, and rename url or httpUrl to serverUrl.

Your GEMINI.md and AGENTS.md files keep working without changes. Google says Antigravity CLI does not have every feature of the old tool yet, and some custom themes do not carry over.

Follow Google's migration guide.

Read the Antigravity CLI getting started guide.

What does Antigravity CLI cost?

Free, $0
The Antigravity app, CLI and IDE extensions with a baseline quota that refreshes every week, and Gemini 3.8 Flash.
Google AI Pro, $19.99 a month
Higher quotas that refresh every 5 hours, Gemini 4 models and Claude Sonnet 5.5 and Opus 5.5.
Google AI Ultra, from $99.99 a month ($199.99 for 20x Pro usage)
The highest quotas and Gemini 4 Neon and Carbon.
Google Cloud
Pay per use through the API, or Gemini Enterprise Standard and Plus seats from $30 per seat per month.

Google AI Pro and Ultra need a personal Google account. Work accounts on Google Workspace use a Google Cloud project or Gemini Enterprise instead.

Compare plans on the Antigravity pricing page.

Check Google AI plan prices in US dollars.

Gemini CLI vs Claude Code and Codex CLI

All three are terminal agents that edit code, run commands and read MCP servers. The difference now is access. Gemini CLI fits a company that already pays for Gemini Code Assist. Claude Code fits people on a Claude plan, and Codex CLI fits people on a ChatGPT plan. For a personal Google account, the like-for-like choice is Antigravity CLI.

Setting up OpenAI's agent instead? Read Better Design's Codex CLI install guide.

Comparing terminal agents? Read Better Design's guide to Claude Code alternatives.

For every Gemini app and API plan, read Better Design's Gemini pricing guide.

Design from your terminal agent

Both CLIs read MCP servers. Better Design is an MCP server that turns a prompt into on-brand pages, slides and social images. The same agent can then design as well as code.

Add Better Design to Gemini CLI.

Add Better Design to Antigravity.

Frequently asked questions