TL;DR — Google is sunsetting Gemini CLI on June 18, 2026. After that date, gemini commands return HTTP 410 and your CI breaks. The replacement is Antigravity CLI (av), which keeps most of the same surface but moves auth, configuration, and a handful of commands. This guide is the 15-minute migration path for engineers who use Gemini CLI in scripts, agents, or CI pipelines today.
Why Gemini CLI Is Being Shut Down
Google announced the Gemini CLI deprecation on May 8, 2026, with a hard cutover on June 18, 2026. The replacement, Antigravity CLI, consolidates Google's developer-side AI tooling — Gemini models, Vertex AI agents, and the new Antigravity multi-agent runtime — under one binary. Existing Gemini CLI installs will receive a deprecation warning on every invocation until the deadline; after that, the auth endpoint returns 410 Gone and every command fails.
If you have ever scripted gemini chat, gemini generate, or gemini agents run into a CI job, a Makefile, or a Claude Code / Cursor hook, this affects you. The good news: most of the migration is automatic.

The Migration in 4 Steps
Step 1: Install Antigravity CLI
# macOS / Linux
curl -fsSL https://antigravity.dev/install.sh | sh
# Windows (PowerShell)
iwr -useb https://antigravity.dev/install.ps1 | iex
# Verify
av --versionThe new binary is av (short for "antigravity"). It coexists with gemini during the deprecation window, so you can migrate gradually.
Step 2: Authenticate
Antigravity CLI uses the same Google account but a new OAuth scope. Re-auth once:
av auth loginFor CI / service accounts, swap the environment variable:
| Old (Gemini CLI) | New (Antigravity CLI) |
|---|---|
| `GEMINI_API_KEY` | `AV_API_KEY` |
| `GEMINI_PROJECT_ID` | `AV_PROJECT_ID` |
| `GEMINI_REGION` | `AV_REGION` (defaults to `us-central1`) |
Old keys are honored until June 18, but Antigravity will warn on every invocation. Rotate now.
Step 3: Rewrite Your Commands
Most subcommands map 1:1 with one rename. Here is the side-by-side:
| Old (Gemini CLI) | New (Antigravity CLI) |
|---|---|
| `gemini chat` | `av chat` |
| `gemini generate` | `av gen` |
| `gemini agents run` | `av agent run` |
| `gemini agents list` | `av agent ls` |
| `gemini eval` | `av eval` |
| `gemini tune` | `av tune` |
| `gemini export` | `av export` |
| `gemini logs` | `av logs` |
The big rename to watch: agents is now agent (singular). That breaks scripted invocations. Grep your repo before pushing.
# Find lingering Gemini CLI references in your repo
grep -rn "gemini " --include="*.sh" --include="*.yml" --include="*.yaml" --include="Makefile"Step 4: Update CI Pipelines
GitHub Actions, GitLab CI, and CircleCI all need a workflow tweak. The most common Gemini CLI step:
# Old — Gemini CLI in GitHub Actions
- name: Run Gemini agent
run: gemini agents run code-review --diff "${{ github.event.pull_request.diff_url }}"
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}Migrates to:
# New — Antigravity CLI in GitHub Actions
- name: Install Antigravity CLI
run: curl -fsSL https://antigravity.dev/install.sh | sh
- name: Run Antigravity agent
run: av agent run code-review --diff "${{ github.event.pull_request.diff_url }}"
env:
AV_API_KEY: ${{ secrets.AV_API_KEY }}If you templatized the binary name with a CI variable ($AI_CLI gemini), this is a one-line change.
Breaking Changes to Watch
Most of the migration is mechanical, but four behaviors actually changed:
- ›Default model. Gemini CLI defaulted to
gemini-1.5-pro. Antigravity defaults togemini-3-pro(the model Google announced alongside Antigravity). If your prompts were tuned against 1.5, pin the model explicitly with--model gemini-1.5-pro. - ›Streaming output format. Gemini CLI's
--streamemitted plain text deltas. Antigravity emits SSE-formatted events by default. If you pipedgemini chat --streaminto another tool, add--stream-format=plainto keep the old behavior. - ›Agent state directory. Was
~/.gemini/agents/. Now~/.antigravity/agents/. The firstav agent runmigrates state automatically, but--state-diroverrides break. - ›Exit codes. Gemini CLI exited 0 on tool-use failures. Antigravity exits non-zero. If your CI swallowed errors silently, this will catch them — and your green builds may suddenly turn red. That is intended.
Migration Verification Script
Save this as verify-av-migration.sh and run it before the June 18 deadline. It exits non-zero if any Gemini CLI reference remains:
#!/usr/bin/env bash
set -euo pipefail
# Check binary
if ! command -v av >/dev/null; then
echo "✗ Antigravity CLI not installed" && exit 1
fi
# Check auth
av auth status >/dev/null || { echo "✗ Not authenticated"; exit 1; }
# Check repo for stale references
LEFTOVERS=$(grep -rn "gemini " --include="*.sh" --include="*.yml" --include="*.yaml" --include="Makefile" . || true)
if [[ -n "$LEFTOVERS" ]]; then
echo "✗ Found stale Gemini CLI references:"
echo "$LEFTOVERS"
exit 1
fi
# Check env vars
[[ -n "${AV_API_KEY:-}" ]] || { echo "✗ AV_API_KEY not set"; exit 1; }
echo "✓ Antigravity migration verified"Wire this into your CI as a job that runs daily through June 17. It catches the migration debt before the shutdown does.
Common Migration Gotchas
- ›MCP servers that wrapped
geminiwill fail silently. If you wired Gemini CLI as a tool inside a Model Context Protocol server, the spawn command must be rewritten. For background on MCP tool servers in general, see my Model Context Protocol production guide. - ›Pinned versions.
gemini@2.xwas the LTS line. Antigravity starts at 1.0 — there is noav@2.x. Update version pins. - ›Brew formula moved.
brew install gemini-cliis gone. Usebrew install antigravity-cli. The old formula will be markeddisabledafter May 30. - ›Vertex AI auth tokens. If you used
gemini auth print-tokento mint Vertex tokens, the equivalent isav auth token --vertex.
Why This Migration Matters Beyond One CLI Tool
The Gemini → Antigravity rename is more than a binary swap. It signals Google consolidating its developer-AI surface into a single multi-agent runtime, the same direction Anthropic took with Claude Opus 4.7 and OpenAI took with Agents SDK. Single-purpose CLIs are losing ground to unified agent runtimes that ship models, tools, eval harnesses, and observability under one binary.
If you maintain dev tooling that wraps an AI vendor's CLI, expect this same migration pattern from every major provider over the next 18 months. The lesson: keep your AI CLI invocation behind a thin wrapper in your codebase. The next rename will hurt less.
Bottom Line
Gemini CLI shuts down June 18, 2026. Antigravity CLI is a near-drop-in replacement, but four breaking behaviors (default model, streaming format, state dir, exit codes) catch teams who run the rename mechanically. Migrate this week. Wire the verification script into CI. Pin your model. Done.
Frequently Asked Questions
When does Gemini CLI shut down?
Google's Gemini CLI shuts down on June 18, 2026. After that date the auth endpoint returns HTTP 410 Gone and every gemini command fails. The deprecation was announced on May 8, 2026.
What replaces Gemini CLI?
Antigravity CLI, invoked as 'av', replaces Gemini CLI. It consolidates Google's developer-side AI tooling — Gemini models, Vertex AI agents, and the Antigravity multi-agent runtime — under one binary.
Is the migration from Gemini CLI to Antigravity CLI difficult?
No. Most of the migration is a binary rename and an environment variable swap (GEMINI_API_KEY → AV_API_KEY). Watch for four breaking changes: the default model is now gemini-3-pro, --stream emits SSE by default, the agent state directory moved to ~/.antigravity/, and exit codes are non-zero on tool-use failures.
Can I install Antigravity CLI alongside Gemini CLI?
Yes. The two binaries coexist during the deprecation window so you can migrate scripts incrementally. After June 18, 2026, only the 'av' binary works.
What is the new env var for Antigravity CLI authentication?
Use AV_API_KEY (replaces GEMINI_API_KEY), AV_PROJECT_ID (replaces GEMINI_PROJECT_ID), and AV_REGION (replaces GEMINI_REGION, default us-central1). Old vars work until June 18 but emit warnings.
What is the default model on Antigravity CLI?
Antigravity CLI defaults to gemini-3-pro. Gemini CLI defaulted to gemini-1.5-pro. If your prompts were tuned against 1.5, pin the model explicitly with --model gemini-1.5-pro to preserve behavior.
Does Antigravity CLI work with Model Context Protocol (MCP)?
Yes. Antigravity exposes the same tool-server interface as Gemini CLI did, plus a native MCP client. If you wrapped Gemini CLI inside an MCP server's spawn command, rewrite the spawn to use 'av' before the cutover.
Written by Harsh Rastogi — Full Stack Engineer building production Generative AI systems at Modelia. Connect with me on LinkedIn for more on Shopify, Generative AI, agentic systems, and production engineering.

