Gemini CLI: what it is and what still works

Gemini CLI is Google's open-source terminal coding agent. It still installs and still runs, but the rail most people signed in with was switched off on 18 June 2026, and that is the first thing to check before anything else.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Gemini CLI is Google's open-source terminal coding agent, installed with npm install -g @google/gemini-cli or brew install gemini-cli. As of August 2026 it needs a Gemini API key, Vertex AI, or an enterprise Gemini Code Assist license: personal Google sign-in for free, AI Pro, and AI Ultra accounts stopped being served on 18 June 2026. Google's replacement for individuals is Antigravity CLI, a Go binary called agy. The npm package is still shipping releases, so Gemini CLI remains a working tool on the auth rails that are left.

What you need to know
  • Install: npm install -g @google/gemini-cli. Needs Node 20+.
  • Personal Google sign-in stopped working on 18 June 2026 for free, Pro, and Ultra.
  • What still works: a Gemini API key, Vertex AI, or an enterprise Code Assist license.
  • Google's successor for individuals is Antigravity CLI (agy), a Go binary.
  • The repo is still active: v0.54.4 shipped on 7 August 2026.
  • Non-interactive mode is gemini -p "...", with -o json for structured output.

What Gemini CLI is, and what changed in June

Gemini CLI is an open-source (Apache 2.0) agent that runs in your terminal, reads your repository, edits files, runs shell commands, and calls tools over MCP. It is the same shape as Claude Code and the Codex CLI: a REPL you launch in a project directory, plus a non-interactive mode for scripts.

The complication is that Google reorganised its developer tooling at I/O on 19 May 2026 and consolidated everything under the Antigravity brand. On 18 June 2026, Gemini CLI stopped serving requests for individual accounts: free tier, Google AI Pro, and Google AI Ultra. The project itself was not deleted, archived, or abandoned. Only that authentication rail was switched off.

Status of each rail, as of August 2026.

How you authenticateStatusWhat to do
Personal Google sign-in (free tier)Not served since 18 June 2026Move to an API key, or to Antigravity CLI
Personal Google sign-in (AI Pro / AI Ultra)Not served since 18 June 2026Your subscription now runs Antigravity, not Gemini CLI
GEMINI_API_KEY from AI StudioWorksMetered, or the free API tier
Vertex AI (ADC, service account, or API key)WorksNeeds a Google Cloud project
Enterprise Gemini Code Assist licenseWorksStandard and Enterprise licenses were explicitly unaffected

That table is the single most important thing on this page. Everything below assumes you are on a rail that still resolves.

Five Gemini CLI authentication rails meeting the 18 June 2026 cutover: the two personal Google sign-in rails stop there, while an API key, Vertex AI and a Code Assist license pass through GEMINI CLI AUTH RAILS 18 JUN 2026 personal Google, free not served Google AI Pro / Ultra not served GEMINI_API_KEY metered API billing Vertex AI needs a Cloud project Code Assist license unaffected The rails that still resolve all bill separately from a Google AI subscription.

Install it

Pick one. npm is the route Google documents first.
npm install -g @google/gemini-cli

# macOS and Linux, via Homebrew
brew install gemini-cli

# macOS, via MacPorts
sudo port install gemini-cli

# no install at all
npx @google/gemini-cli

gemini --version

Google's recommended specifications.

RequirementValue
RuntimeNode.js 20.0.0 or newer
macOS15 or newer
Windows11 24H2 or newer
LinuxUbuntu 20.04 or newer
RAM, light use4 GB or more
RAM, large codebases16 GB or more
ShellBash, Zsh, or PowerShell

Homebrew lags npm by a meaningful margin. When this guide was checked in August 2026 the npm package was on 0.54.4 and the Homebrew formula was on 0.46.0. If a flag in this guide is missing from your build, check gemini --version before assuming the documentation is wrong.

There are three release channels. Stable ships weekly on Tuesdays and is what you get by default. Preview ships weekly and is unvetted. Nightly ships daily from main.

npm install -g @google/gemini-cli@latest    # stable, the default
npm install -g @google/gemini-cli@preview
npm install -g @google/gemini-cli@nightly

Authentication that still resolves

Two rails are available to an individual developer in August 2026: a Gemini API key from AI Studio, or Vertex AI through a Google Cloud project. Both bill separately from any Google AI subscription you hold.

01

Get an API key from AI Studio

Create one at aistudio.google.com/app/apikey. The free API tier is capped at 250 model requests per day and is restricted to Flash-class models. Enabling billing on the key lifts both.

02

Export it

export GEMINI_API_KEY="YOUR_KEY"

# make it stick
echo 'export GEMINI_API_KEY="YOUR_KEY"' >> ~/.zshrc
Windows PowerShell
$env:GEMINI_API_KEY="YOUR_KEY"
03

Start it and pick the key

cd ~/code/your-project
gemini

On first run, choose Use Gemini API key. If you pick Sign in with Google on a personal account, the flow will complete and then fail on the first request.

Vertex AI instead

Vertex AI is the route when you want higher limits, an organisation-owned billing account, or Express Mode's 90-day no-billing window. It needs two variables set regardless of which credential type you use.

export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="us-central1"

# then one of:
gcloud auth application-default login   # ADC
# or a service account JSON key, or a Google Cloud API key

Daily request quotas by rail. Figures published by Google; checked August 2026.

RailRequests per user per day
Gemini API key, free tier250, Flash models only
Gemini API key, pay as you goVaries with your billing account
Vertex AI Express ModeVaries; billing required after 90 days
Vertex AI, pay as you goVaries
Code Assist Standard (Workspace)1,500
Code Assist Enterprise (Workspace)2,000

Gemini CLI commands

There are three layers: the shell command and its flags, subcommands like gemini mcp, and slash commands inside the REPL. The flags are where the behaviour actually lives.

Shell-level commands.

CommandWhat it does
geminiStart the interactive session
gemini "query"Start with a prompt already loaded, then stay interactive
gemini -p "query"Run once, print the answer, exit
gemini -i "query"Run the prompt, then drop into the REPL
cat logs.txt | geminiPipe content in as context
gemini -r latestResume the most recent session
gemini -r <id> "query"Resume a specific session with a new prompt
gemini updateUpdate in place
gemini mcpAdd, list, and remove MCP servers
gemini extensionsManage extensions

The flags worth knowing.

FlagAliasEffect
--model-mModel or alias: auto, pro, flash, flash-lite
--prompt-pNon-interactive run
--prompt-interactive-iPrompt first, then stay in the REPL
--approval-modedefault, auto_edit, yolo, or plan
--sandbox-sRun tools inside a container
--output-format-otext, json, or stream-json
--resume-rResume a session by latest, id, or index
--include-directoriesAdd directories to the workspace
--worktree-wStart in a new git worktree (needs experimental.worktrees)
--debug-dVerbose logging when something is silently failing

Slash commands inside the session

CommandUse it for
/initGenerate a first GEMINI.md for the repository
/memoryShow, add to, or reload the loaded context files
/modelSwitch model mid-session
/planPlan before editing
/mcpList and reload MCP servers
/toolsSee which tools are exposed
/permissionsInspect what the agent may do without asking
/compressSummarise the conversation to reclaim context
/restore and /rewindUndo file changes or roll the conversation back
/statsToken counts and session cost
/resumeLoad a previous session
/bugFile an issue with session details attached

How to use it on a real repository

The default install answers questions well and edits files badly, because it knows nothing about your project. Three files close most of that gap.

01

Write a GEMINI.md

This is the standing-instructions file, the same role CLAUDE.md plays for Claude Code and AGENTS.md for Codex. Run /init to get a draft, then cut it down to things that are true and specific.

GEMINI.md, at the repository root
# Project

TypeScript monorepo, pnpm workspaces, Postgres via Prisma.

## Commands
- Test one package: `pnpm --filter @app/api test` (NOT `pnpm test`, that is 9 minutes)
- Typecheck: `pnpm -r typecheck`
- Regenerate the client after a schema change: `pnpm prisma generate`

## Conventions
- Every route handler returns a typed Result, never throws across a boundary.
- packages/generated is generated. Never hand-edit it.

## Do not
- Do not add dependencies without asking.
- Do not touch prisma/migrations unless the task is a migration.
02

Add a .geminiignore

Same syntax as .gitignore, and it keeps the agent out of directories that waste context: build output, fixtures, vendored code, large data files. Gemini CLI respects it during searches by default.

printf 'dist/\ncoverage/\n*.snap\ntestdata/large/\n' > .geminiignore
03

Pick an approval mode deliberately

gemini --approval-mode plan       # read and propose, no edits
gemini --approval-mode auto_edit  # edit files freely, ask for shell commands
gemini --approval-mode yolo       # approve everything, for throwaway containers

auto_edit is the setting most people want and few people find. It removes the per-file confirmation loop without handing over your shell.

Non-interactive runs

The -p flag is what makes Gemini CLI scriptable, and -o json is what makes it parseable.

gemini -p "summarize the changes in the last 5 commits"

# structured output for a pipeline
gemini -p "list every TODO in src/ as JSON" -o json | jq

# stdin as context
git diff --staged | gemini -p "write a commit message for this diff"

Antigravity CLI is the successor

Google's replacement for individual developers is the Antigravity CLI: a Go binary called agy, sharing an agent core with the Antigravity 2 desktop app. It installs from a script rather than npm, and it is faster to start because it is a single compiled binary rather than a Node process.

macOS and Linux
curl -fsSL https://antigravity.google/cli/install.sh | bash
agy

What carries over, and what you have to move by hand.

Gemini CLIAntigravity CLIAutomatic?
~/.gemini/~/.gemini/antigravity-cli/Offered on first run
GEMINI.md, AGENTS.mdSame files, same placesYes, unchanged
.gemini/skills/.agents/skills/No. Rename the folder yourself
MCP servers in settings.json~/.gemini/config/mcp_config.jsonPartly. The url key becomes serverUrl
ExtensionsPlugins, via agy plugin import geminiOne command
gemini -p "..."agy -p "..."Same idea, same flag

When it breaks

SymptomCauseFix
Worked yesterday, fails on every request nowPersonal Google sign-in, switched off 18 June 2026Set GEMINI_API_KEY, or install agy
gemini: command not foundPATH not reloaded, or a Node version change moved the npm prefixOpen a new shell; check npm root -g
Quota exhausted after a handful of promptsFree API-key tier is 250 requests per dayEnable billing on the key, or use Vertex AI
Edits are proposed but never appliedApproval mode is default or plan--approval-mode auto_edit
It ignores your GEMINI.mdContext files load at start/memory reload, and check /memory show
An MCP server never appearsConfig edited after launch/mcp reload, then gemini mcp list
A documented flag is rejectedHomebrew build is behind npmgemini --version, then update

If you are moving off it entirely, remove the package and then decide what to do with ~/.gemini, because that directory is now shared with Antigravity CLI.

Questions people ask

The tool is free and open source under Apache 2.0. Access is not. As of August 2026 the free personal Google sign-in rail no longer serves the CLI, so free usage means a Gemini API key on the free API tier, capped at 250 model requests per day and limited to Flash-class models.

Not the project. Google stopped serving it for individual accounts on 18 June 2026 and directs individuals to Antigravity CLI, but the repository is still active and version 0.54.4 shipped on 7 August 2026. Enterprise Code Assist licenses and API key authentication were explicitly unaffected.

Google consolidated its developer tooling under the Antigravity brand at I/O on 19 May 2026. On 18 June the CLI stopped serving requests authenticated with personal Google accounts, covering free tier, Google AI Pro, and Google AI Ultra. Nothing about your local install changed.

npm install -g @google/gemini-cli with Node 20 or newer, or brew install gemini-cli on macOS and Linux. npx @google/gemini-cli runs it without installing. Then set GEMINI_API_KEY and run gemini in a project directory.

Run gemini inside a repository to start an interactive session, or gemini -p "your prompt" for a single non-interactive answer. Write a GEMINI.md with your build and test commands, add a .geminiignore, and pass --approval-mode auto_edit so it can edit without confirming every file.

Gemini CLI is a Node package published to npm as @google/gemini-cli. Antigravity CLI is a Go binary called agy installed from a script, sharing an agent core with the Antigravity desktop app, and it is the path Google now supports for individual developers. Your GEMINI.md carries over; workspace skills and MCP config need moving.

In ~/.gemini/, holding settings.json, oauth_creds.json, google_accounts.json, trustedFolders.json, and a tmp/ directory of per-project state. Project-level settings live in .gemini/settings.json inside the repository. GEMINI_CLI_HOME relocates the user-level root.

Yes, with a Gemini API key or Vertex AI credentials. Use gemini -p for a single run and -o json when something downstream has to parse the answer. A personal sign-in will not work, which is why many pipelines broke on 18 June 2026.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Gemini CLI on GitHub install, commands, quotas
  2. Transitioning Gemini CLI to Antigravity CLI the 18 June 2026 cutover
  3. Antigravity CLI documentation
  4. @google/gemini-cli on npm version and Node requirement
Try it

Google agents,
next to the rest.

Continuum drives Antigravity beside Claude Code and Codex under your own logins, with spend by repo and no markup.

free app · your subscriptions · local-first