Turn ideas into shipped features at lightspeed with Friday.
Get Started
Migrate from Gemini CLI to Antigravity
Time to say bye-bye to Gemini CLI.

How to Migrate from Gemini CLI to Antigravity 2.0 Before June 18 (Complete Guide)

Article Contents

June 18 is 13 days away, and Google is cutting off consumer Gemini CLI access permanently. Over 6,000 community pull requests have been built up around an open-source TypeScript tool that is now being replaced by a closed-source Go binary called agy. If you use Gemini CLI daily for agentic workflows, this is not a soft deprecation; rather, a hard shutdown. Here is everything you need to migrate cleanly before the deadline.

What Is Actually Getting Shut Down

Google’s official announcement is clear on scope. The deprecation hits consumer and free tiers only. Enterprise customers keep access to their existing workflows, at least in the short term.

The Gemini CLI you installed via npm install -g @google/gemini-cli and invoked as gemini stops working on June 18 for non-enterprise accounts. Your scripts, CI pipelines, and project memory files all need updating before then.

Shut down June 18, 2026:
• Consumer and individual Gemini CLI users (free Google accounts)
• Free tier access
• Individual Pro and Ultra subscription tiers

Not shut down:
• Organizations on Gemini Code Assist Standard/Enterprise through Google Cloud
• Gemini Code Assist for GitHub enterprise licenses

Source: Google Developers Blog — An important update: Transitioning Gemini CLI to Antigravity CLI
Check your account tier first. Before relying on this guide, confirm which tier you are on. Log into Google AI Studio or the Antigravity console and check your current subscription. If your organization has a Google Cloud enterprise agreement, talk to your admin before migrating — your Gemini Code Assist access may be unaffected.

The bigger controversy is the open-source question. Gemini CLI was Apache 2.0 licensed TypeScript. Antigravity CLI is a closed-source Go binary. That shift is the main driver of developer backlash, but it does not change the migration deadline for anyone still on free or Pro tiers.

What Antigravity 2.0 Actually Is

Google launched Antigravity 2.0 on May 19, 2026 at Google I/O. It is not just a CLI rename. It is a five-surface platform: desktop app, CLI, SDK, API, and Enterprise. The CLI piece — the agy binary — is what replaces your gemini command.

Scope of this guide: This article focuses specifically on migrating from Gemini CLI to Antigravity CLI (agy). Antigravity 2.0 also ships a desktop IDE, a Python SDK, and a Managed Agents API — but those are separate products. If you used Gemini CLI in the terminal, this guide covers your migration path.

For a broader look at where Antigravity sits relative to other agentic IDEs, this breakdown of Antigravity vs Windsurf covers the competitive landscape in 2026.

The headline technical changes are meaningful. Gemini 3.5 Flash is now the default model, running 4x faster than Gemini 1.0. You get parallel subagents — up to five simultaneous background agents spawned via /agent. And multi-model routing means you can call Claude Sonnet, Claude Opus, and GPT-OSS 120B from the same interface — though access to Anthropic and OpenAI models is handled through integrations and MCP servers and may require separate API keys. The exact supported model list can change; check the latest Antigravity docs for current availability.

New Capabilities You Get That Gemini CLI Lacked

  • Parallel subagents: spawn up to 5 concurrent background agents with /agent [name] "[task]"
  • Python SDK via the google.antigravity package
  • Desktop app sync: /export in CLI pushes sessions to the desktop app
  • Native voice input
  • Multi-model routing — Claude and GPT-OSS alongside Gemini from one tool
  • Background task scheduling
  • A2A protocol and Managed Agents API support

Install Antigravity CLI

Antigravity CLI is not on npm and is not in Homebrew at launch. You install it only via Google’s official installer script. Do not try to npm install it — that package does not exist yet.

macOS and Linux

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

Windows (PowerShell)

irm https://antigravity.google/cli/install.ps1 | iex

Verify and Update

agy --version
agy update

Run agy with no arguments on first launch. It triggers an OAuth browser flow automatically. If you prefer API key auth, export ANTIGRAVITY_API_KEY=your_key before running. Your legacy GEMINI_API_KEY still works until June 18 but logs deprecation warnings on every invocation.

The 5-Step Migration

Run these five commands in order. Each step is a hard dependency on the previous one. Do not skip step 4 — your project memory does not carry over automatically.

  1. Install the CLI via the installer script above
  2. Run agy to complete the OAuth browser flow
  3. Run agy plugin import gemini to import any Gemini CLI plugins
  4. Rename your project files: mv GEMINI.md AGENTS.md && mv .gemini/skills/ .agents/skills/
  5. Run agy doctor to validate your environment and flag any remaining issues

Step 3 comes with a caveat Google acknowledges: agy plugin import gemini imports plugins but does not guarantee they work. Test each plugin after import before relying on it in production.

Migrate Your Environment Variables

Update your shell profile, CI secrets, and any Docker environment files. All three variables have direct replacements.

Gemini CLI VariableAntigravity VariableNotes
GEMINI_API_KEYANTIGRAVITY_API_KEY or AV_API_KEYLegacy key works until June 18 with warnings
GEMINI_PROJECT_IDAV_PROJECT_IDRequired for Vertex AI-backed requests
GEMINI_REGIONAV_REGIONDefaults to us-central1 if unset

For CI/CD pipelines, swap the secret name in GitHub Actions, GitLab CI, or whatever runner you use. The value — your actual API key — stays the same if you are on the same Google account. You just need a new key name in your secrets store.

Command Reference: Gemini CLI to Antigravity CLI

Most commands map directly. A handful are renamed and a few flags changed behavior. Use this table during the transition period when muscle memory still types gemini.

Gemini CLIAntigravity CLI (agy)Notes
geminiagyDirect replacement, interactive TUI
gemini -p "prompt"agy -p "prompt"Non-interactive single prompt, identical flag
gemini -cagy -cContinue last conversation, same flag
gemini agents runav agent run or /agent in TUITwo options now; TUI slash command is new
/stats/contextRenamed — shows context window usage
/extensionsagy plugin listMoved out of TUI to CLI subcommand
GEMINI.mdAGENTS.mdProject memory file — rename manually
.gemini/skills/.agents/skills/Skills directory — move the entire folder
~/.gemini/agents/~/.antigravity/agents/State dir moved — old sessions not migrated

The slash commands you used inside the Gemini CLI TUI — /chat save, /chat resume, /compress, /memory add, /mcp, /restore, /vim, /init, /theme — all carry over. The one rename to remember is /stats becoming /context.

File injection syntax stays the same. @file.txt, @src/, and @**/*.ts all work identically in agy. Shell execution via !ls -la also carries over unchanged.

Key Flags in Antigravity CLI

These flags did not exist in Gemini CLI. They are the ones worth learning immediately because they unlock the parallel agent capabilities.

  • -p / --print: single prompt, non-interactive, prints result and exits
  • -c / --continue: resume the last conversation session
  • --conversation [ID]: resume a specific session by ID
  • -i: send an initial prompt then drop into interactive mode
  • --add-dir [path]: add a directory to the workspace context
  • --dangerously-skip-permissions: auto-approve all tool calls (use only in trusted CI)
  • -m [model]: specify a model — e.g. -m claude-opus or -m gemini-3-pro
  • /agent [name] "[task]": spawn a named async background subagent

Breaking Changes You Need to Handle

Six things changed in ways that will silently break existing scripts if you just swap the binary name and nothing else. Go through each one before you cut over.

1. Default Model Change

Antigravity defaults to gemini-3-pro. Gemini CLI defaulted to gemini-1.5-pro. If your prompts are tuned to 1.5-pro behavior, pin the model explicitly with -m gemini-1.5-pro or update AGENTS.md to specify the model. Do not assume behavior is identical across model versions.

2. Streaming Format Changed to SSE

Antigravity now emits Server-Sent Events by default. If you pipe agy output to another tool — grep, jq, a log shipper — you will get SSE metadata in the stream. Add --stream-format=plain to restore the legacy plain-text output your pipes expect.

3. State Directory Moved

Agent state moved from ~/.gemini/agents/ to ~/.antigravity/agents/. Old sessions do not migrate. If you reference session IDs in scripts or documentation, those IDs do not exist in the new state directory.

4. Exit Codes Now Reflect Tool Failures

Gemini CLI always exited 0 even when tool calls failed. Antigravity exits non-zero on tool-use failures. Any CI step that ran gemini -p "..." and checked exit code 0 for success now gets accurate failure signals — which may surface failures you never knew were happening.

5. Closed-Source Binary

The agy binary is closed-source. You cannot audit it, fork it, or build from source. If your organization has open-source compliance requirements, flag this to your security team before deploying agy in production pipelines.

6. Plugin Compatibility Not Guaranteed

agy plugin import gemini will import your existing plugins. It will not tell you which ones actually work. Build a smoke-test list of your critical plugins and verify each one after import. Do not wait until June 17 to do this.

Observed Issues (as of Late May 2026)

These issues were observed in early builds as of late May 2026. Google is actively patching; check the official Antigravity CLI docs and release notes for current status before drawing conclusions about whether these still apply.

  • /usage display does not update in real time — the counter is stale until you restart the TUI
  • --output-format json is documented but not working — do not build pipelines that depend on it yet
  • --sandbox flag is macOS only (uses Apple Seatbelt) — Linux users do not get sandboxing at launch
  • The May 19 auto-update wiped configurations for existing Antigravity 1.0 users — if you were on 1.0, rebuild your AGENTS.md from scratch

Pricing: What Changed

The free tier situation has changed significantly. If you are on a free individual account, plan for tighter limits or consider upgrading before June 18.

TierGemini CLIAntigravity 2.0
Free250 req/day~20 req/day (observed in testing; Google has not officially published exact free-tier limits)
Pro$20/mo$20/mo (unchanged)
Ultra$100/mo$100/mo (unchanged)
PremiumNot available$200/mo (new, 20x limits)
Pricing and limits shown are as of May 2026 and may change. Google has not published a finalized long-term pricing table for Antigravity CLI free vs. paid tiers. Check antigravity.google for current rates.

Two usage behaviors developers have observed: quota appears to refresh on a rolling window rather than at midnight, and parallel subagents consume quota simultaneously. If you spawn five agents at once, all five draw against the same counter at the same time. These behaviors are based on community testing; treat them as directional until Google publishes official documentation.

Based on our testing, the free tier is significantly more constrained and may not be practical for heavy automation workloads. Developers doing serious work should evaluate Pro ($20/mo) or the alternatives. If you are evaluating other tools before committing, this ranked list of AI coding assistants for 2026 covers the realistic options with current pricing.

Validating Your Migration

Before running through this checklist, do three things first: confirm your Google account tier in AI Studio so you know what limits apply to you; run agy doctor immediately after installation and compare the output to your pre-migration config; and test your key scripts in a non-production environment before cutting over anything business-critical.

Then run through this checklist after completing the five migration steps. Do not mark the migration done until every item passes.

  • Run agy --version — confirm you are on Antigravity 2.0, not an older binary
  • Run agy doctor — fix every warning it surfaces, not just errors
  • Confirm AGENTS.md exists at your project root and GEMINI.md is removed or archived
  • Confirm .agents/skills/ exists and contains your migrated skills
  • Run a basic prompt: agy -p "list files in current directory"
  • Check exit code: echo $? — should be 0 on success
  • Test each plugin you depend on after agy plugin import gemini
  • Update all CI secrets from GEMINI_API_KEY to ANTIGRAVITY_API_KEY
  • Verify --stream-format=plain on any scripts that pipe agy output
  • Test your model-dependent prompts with -m gemini-1.5-pro if you need 1.5-pro behavior

Should You Switch to Something Else Instead?

The closed-source Go binary and the free tier cut are legitimate reasons to evaluate alternatives. If you have been using Gemini CLI primarily for its terminal-first workflow compared to Claude Code or Cursor, those tools are still fully open for comparison.

The honest answer is that for most developers already in the Google ecosystem — using Vertex AI, Google Cloud, or Workspace — Antigravity 2.0 is the least-friction path. The multi-model support now covers Claude and GPT-OSS natively, which removes the main reason to jump ship for model access alone.

If you want a fully integrated agentic IDE with persistent context and team collaboration built in, Bind AI IDE is worth a session to evaluate alongside Antigravity before you commit to a new workflow.

Official Migration Resources

The Bottom Line

You have 13 days. The migration itself takes under 30 minutes for a typical developer setup. The five-step process works, agy doctor catches most configuration gaps, and the command surface is familiar enough that you will not feel lost on day one. The real risks are the ones that require testing time: plugin compatibility, CI pipeline exit code changes, and the streaming format shift. Free tier users face a genuine decision — based on testing, roughly 20 requests per day is likely insufficient for serious automation work, and $20/mo for Pro is the practical floor for sustained use. Antigravity 2.0 is a more capable platform than Gemini CLI in almost every technical dimension. The closed-source binary is a real tradeoff. But the June 18 deadline is real too, and the migration path is straightforward. Start today, run agy doctor, and give yourself time to fix what it flags.

Friday

The AI workspace that turns prompts into results.

Plan, research, and ship faster with AI that understands your work.

From PRD to production before the week is over. Build with Friday AI

Available on:

tryfriday.ai
product_team_goals:
time_to_market: "shipped_in_hours"
dev_alignment: "prds_to_clean_code"
overhead: "zero_waste_meetings"
sprint_status: features_deployed_successfully...

The Autonomous Product Team for Founders Product Managers Leaders

Friday AI turns your PC into an autonomous product team. Combines the best models from Claude, OpenAI, Gemini, and ElevenLabs into one seamless operator that doesn’t just think, it executes.