Your gemini command has an expiry date. On June 18, 2026, Google is cutting off Gemini CLI access for every free, Pro, and Ultra account. If you need to migrate to Antigravity CLI, the migration window is under three weeks. The replacement is invoked as agy, and the old binary will stop serving requests.

I’ve been through the migration on both macOS and Linux. Most of it is painless — under 10 minutes if your setup is simple. But there are a few spots the official docs gloss over that will quietly break your scripts and MCP configs if you miss them. This guide covers the full process, the gotchas, and one honest concern about where this is all heading.

Who Actually Needs to Migrate?

Before you do anything, check which bucket you’re in.

Affected (migrate now): Google AI Free tier, Google AI Pro, Google AI Ultra, and free Gemini Code Assist for individuals. On June 18, 2026, the gemini binary stops serving requests for you — permanently.

Not affected: Code Assist Standard, Code Assist Enterprise, and Code Assist for GitHub users on a Google Cloud subscription. Your Gemini CLI keeps working indefinitely. Migration is still worth doing for workflow consistency, but it’s not urgent.

Not sure which tier you’re on? Run this and check the header line:

gemini --version

What Is Antigravity CLI, Actually?

Google announced Antigravity 2.0 at I/O on May 19, 2026. It’s a full platform — a desktop IDE, a CLI, and an SDK — and Antigravity CLI is the terminal piece of that. The command is agy.

A few things that are genuinely different from Gemini CLI:

  • Built in Go, not TypeScript/Node.js. Startup is noticeably faster. If Gemini CLI felt sluggish on cold starts, this is better.
  • Shared agent harness with the desktop app. Any update Google ships to Antigravity 2.0’s core agents automatically rolls into the CLI — you don’t get a separate, lagging terminal version.
  • Multi-model by default. agy ships with access to Gemini 3.5 Flash (the default), Gemini 3.1 Pro, Claude Sonnet 4.6, Claude Opus 4.6, and GPT-OSS 120B from a single switch screen. That’s a meaningful upgrade if you were pinned to Gemini models in the old CLI.
  • Async agent workflows. Antigravity CLI can run multi-agent tasks in the background, so a large refactor or a long research task doesn’t lock your terminal session.

Skills, Hooks, Subagents, and Extensions from Gemini CLI all carry over — they’re called Antigravity plugins now, but the migration tooling handles the rename.

Step-by-Step Guide: How to Migrate to Antigravity CLI

Do this in order. Skipping steps 3 or 4 is where most breakage happens.

Step 1: Install Antigravity CLI

Run the official installer. It handles PATH configuration automatically:

# macOS and Linux (including WSL2)
curl -fsSL https://antigravity.google/cli/install.sh | bash

# After install, verify
agy --version

Windows users without WSL2: there’s a native installer at antigravity.google/cli — download the .exe and add it to your PATH manually.

Step 2: Authenticate

Run agy on its own. It opens a browser OAuth flow — same Google account you used for Gemini CLI. After auth, your token is cached at ~/.config/agy/credentials.json.

agy

If you’re in a CI pipeline, Docker container, or any headless environment where there’s no browser available, pass the --no-browser flag instead. It prints the auth URL to stdout so you can complete it manually and cache the token as a secret:

# Headless / CI auth
agy --no-browser

# Store the cached token for reuse
# cp ~/.config/agy/credentials.json $CI_SECRETS_PATH/agy-credentials.json

Step 3: Import Your Gemini CLI Configuration

This is the step most people skip — and then wonder why their MCP servers aren’t registered anymore.

On first launch, if ~/.gemini/ still exists on your machine, agy prompts you to import it automatically. Accept the prompt. It pulls in:

  • Registered MCP servers
  • Commands on your allow-without-confirmation list
  • Custom keybindings and your visual theme

Everything lands in ~/.gemini/antigravity-cli/settings.json. If you missed the prompt or want to do it manually, run:

# Import all Gemini plugins (Skills, Extensions, Hooks)
agy plugin import gemini

# Move workspace-level skills to the new location
mv .gemini/skills/ .agents/skills/

# Validate the migration
agy doctor

agy doctor is worth running regardless. It checks your config, lists anything it couldn’t import, and flags permission mismatches. Commands that lived on your Gemini CLI allow list don’t always survive to agy‘s permissions.allow, and that’ll silently halt terminal steps mid-run if you don’t fix it.

Step 4: Fix the Desktop App Conflict (macOS Only)

If you also installed the Antigravity 2.0 desktop app, there’s a known version conflict between the desktop binary and the CLI binary. You’ll see it when agy inspect can’t detect the IDE. Fix with:

# Verify CLI is in PATH correctly
which agy

# Should print "Antigravity 2.0 detected" — if not, re-run:
agy --version
agy inspect

The symlink approach is the cleanest fix — it keeps the desktop binary intact and avoids version drift between the two. Check the official migration docs at antigravity.google/docs/gcli-migration for the exact symlink command specific to your OS version.

Step 5: Update Your Scripts and CI

Any script, GitHub Action, cron job, or Dockerfile that calls gemini will break on June 18. Find them now:

# Find all references to gemini command in your projects
grep -r "gemini " ~/.bashrc ~/.zshrc .github/ --include="*.yml" --include="*.sh" 2>/dev/null

# Replace with agy
# Example: sed -i 's/gemini /agy /g' your-script.sh

For CI, remember to update the auth step too. Gemini CLI used personal OAuth tokens; agy in headless mode needs the cached credentials file mounted as a secret.

Key Commands You’ll Actually Use Daily

Most of this will feel familiar if you used Gemini CLI. A few additions worth knowing:

# Start interactive session
agy

# Resume a previous conversation
agy --conversation=<conversation-id>   # or -c for short

# Run a one-shot prompt (non-interactive)
agy "refactor this function for readability" --file=./utils.ts

# Switch models inside a session
/model   # opens the model picker — Gemini 3.5 Flash is default

# Attach a file to your prompt
@path/to/file.ts   # @ opens a path picker

# Run a raw shell command inside agy
!ls -la

# Check and edit permissions
/permissions

# Shell mode (run shell commands without the ! prefix)
/sh

The @ file autocomplete is genuinely useful — it’s faster than copy-pasting code into the prompt. And if you were pinning gemini-3.1-pro-preview in Gemini CLI, switch to Gemini 3.1 Pro (High) in the /model picker to keep roughly the same behavior.

The One Thing Worth Being Honest About

Gemini CLI was Apache 2.0 licensed. You could fork it, audit it, run it against your own API key, contribute pull requests. It had 100,000+ GitHub stars and 6,000 merged PRs before the sunset announcement.

Antigravity CLI is closed source. Google hasn’t committed to opening the repository. Within 24 hours of the May 19 announcement, the GitHub transition thread collected 143 thumbs-down reactions versus 4 cheers. That reaction is worth understanding — not to avoid migrating, but to know what you’re actually signing up for.

If open source matters to your workflow — for auditing, self-hosting, or BYOK setups — the community has already solved this: use a paid API key from AI Studio or Vertex AI with the original open-source Gemini CLI binary. The Apache 2.0 codebase stays alive. Your existing skills, hooks, and MCP configs don’t need to change. Only the first-party free endpoints stop on June 18.

For everyone else — the deadline is real. agy doctor takes 30 seconds to run. Do it this week, not June 17.

Quick Migration Checklist

  • Run curl -fsSL https://antigravity.google/cli/install.sh | bash
  • Authenticate with agy (or agy --no-browser for headless)
  • Accept the config import prompt, or run agy plugin import gemini manually
  • Move workspace skills: mv .gemini/skills/ .agents/skills/
  • Run agy doctor and fix anything it flags
  • Grep your scripts and CI configs for gemini and replace with agy
  • If on macOS with the desktop app, fix the symlink conflict

The migration itself isn’t the hard part. The hard part is finding every place you’ve quietly embedded gemini into an automated workflow and forgotten about it. Run the grep now while you still have time to fix things calmly.