Migrate from Gemini CLI to Antigravity CLI: Complete Guide (Deadline June 18, 2026)
Google is shutting down Gemini CLI on June 18, 2026. If youโre on a Pro, Ultra, or free account, your gemini binary will stop serving requests after that date. The replacement is Antigravity CLI โ invoked as agy โ and you need to migrate before the deadline.
This guide walks you through every step to migrate from Gemini CLI to Antigravity CLI, from installation to validation. The entire process takes under 10 minutes for most setups.
Whoโs affected โ and whoโs not
Must migrate (deadline: June 18, 2026):
- Google AI Pro subscribers
- Google AI Ultra subscribers
- Free-tier Gemini CLI users
Not affected:
- Enterprise/Workspace users โ Google confirmed these accounts keep Gemini CLI access indefinitely. No action required.
If youโre unsure which tier youโre on, run gemini --version and check your account type in the output header.
TL;DR โ the fast path
If you just want the commands and already understand the changes:
# Install
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Authenticate (opens browser)
agy
# Import all Gemini plugins
agy plugin import gemini
# Move workspace skills
mv .gemini/skills/ .agents/skills/
# Validate
agy doctor
That covers 90% of migrations. Read on for MCP config changes and edge cases.
Step 1: Install Antigravity CLI
Antigravity CLI is a Go binary (Gemini CLI was Node.js), so itโs a single self-contained executable. No runtime dependencies.
macOS / Linux:
curl -fsSL https://antigravity.google/cli/install.sh | bash
Windows (PowerShell):
irm https://antigravity.google/cli/install.ps1 | iex
After installation, verify:
agy --version
The binary name is agy, not antigravity. Both gemini and agy can coexist on your system during the migration window โ thereโs no conflict.
For a deeper look at what Antigravity brings beyond the CLI, see the Antigravity 2 complete guide.
Step 2: Authenticate
Run agy with no arguments. On first launch it opens your default browser for Google OAuth. Sign in with the same Google account you used for Gemini CLI.
agy
SSH / headless sessions: If no browser is available, agy prints a URL to your terminal. Copy it, authenticate in any browser, and the CLI picks up the token.
For fully headless environments (CI, cron jobs), see the headless section below.
Step 3: Import plugins
Gemini CLI extensions migrate with a single command:
agy plugin import gemini
This scans your existing Gemini CLI plugin directory and registers each plugin with agy. Plugins that depend on Node.js APIs may need updates from their authors โ agy will warn you about incompatible ones during import.
If you were using custom plugins with Gemini CLI subagents, those carry over as well.
Step 4: Move MCP configs
This is the step most likely to trip you up. Gemini CLI stored MCP server configurations inline in settings.json. Antigravity CLI uses a dedicated mcp_config.json file.
Before (Gemini CLI โ settings.json):
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["my-mcp-server"],
"url": "https://mcp.example.com/sse"
}
}
}
After (Antigravity CLI โ mcp_config.json):
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["my-mcp-server"],
"serverUrl": "https://mcp.example.com/sse"
}
}
}
Key changes:
- Separate file โ create
mcp_config.jsonin your project root or~/.config/agy/ - Field rename โ remote MCP servers use
serverUrlinstead ofurl - Local stdio-based servers (with
command+args) work unchanged
If youโre new to MCP or need a refresher on the protocol, check the MCP complete developer guide.
Step 5: Move workspace skills
Gemini CLI stored workspace skills in .gemini/skills/. Antigravity CLI looks for them in .agents/skills/.
# From your project root
mkdir -p .agents
mv .gemini/skills/ .agents/skills/
Context files are unchanged. Both GEMINI.md and AGENTS.md continue to work in Antigravity CLI with no modifications. You donโt need to rename or move them.
Hooks are unchanged. If you have lifecycle hooks configured, they use the same JSON format and the same lifecycle events. No migration needed.
Step 6: Validate
Run the built-in doctor command to verify everything migrated correctly:
agy doctor
This checks:
- Authentication status
- Plugin compatibility
- MCP server connectivity
- Workspace skills discovery
- Context file detection
Fix any warnings before the June 18 deadline. You can also run both CLIs side-by-side to compare outputs during the transition period.
What changes: Gemini CLI vs Antigravity CLI
| Aspect | Gemini CLI (gemini) | Antigravity CLI (agy) |
|---|---|---|
| Language | Node.js | Go |
| Model | Gemini 2.5 Pro/Flash | Gemini 3.5 Flash |
| Model selection | --model flag | Auto-selects (no flag) |
| MCP config | Inline in settings.json | Separate mcp_config.json |
| Remote MCP field | url | serverUrl |
| Skills directory | .gemini/skills/ | .agents/skills/ |
| Context files | GEMINI.md, AGENTS.md | GEMINI.md, AGENTS.md (same) |
| Hooks | JSON lifecycle hooks | JSON lifecycle hooks (same) |
| Plugins | gemini plugin | agy plugin |
| Auth | OAuth browser flow | OAuth browser flow (same) |
The model upgrade to Gemini 3.5 Flash is automatic โ thereโs no --model flag in agy. The system auto-selects the optimal model for your request. Read more about using Gemini 3.5 Flash with Antigravity CLI.
For a comparison with other AI coding CLIs, see Antigravity 2 vs Claude Code vs Codex CLI.
Headless and cron environments
In CI pipelines, cron jobs, or Docker containers where no browser is available and no TTY is attached, agy needs a hint to use file-based authentication instead of attempting a browser launch.
Set the SSH_CONNECTION environment variable:
export SSH_CONNECTION="127.0.0.1 0 127.0.0.1 0"
agy auth login
This forces agy to print the auth URL to stdout instead of opening a browser. After initial authentication, the token is cached and subsequent runs work non-interactively.
For CI, store the cached token as a secret and mount it at ~/.config/agy/credentials.json.
FAQ
Will my Gemini CLI stop working immediately on June 18?
Yes. Google confirmed that on June 18, 2026, the gemini binary will stop serving requests for Pro, Ultra, and free accounts. Thereโs no grace period after the deadline.
Can I keep both CLIs installed?
Yes. During the migration window (now through June 18), both gemini and agy coexist without conflicts. They use separate config directories and separate auth tokens.
Do I need to re-authenticate?
Yes. Antigravity CLI uses its own OAuth credentials. Run agy once to complete the browser-based auth flow. It takes 10 seconds.
What happens to my GEMINI.md context files?
Nothing โ they keep working. Antigravity CLI reads both GEMINI.md and AGENTS.md unchanged. No rename or migration needed.
Is there a --model flag in agy?
No. Antigravity CLI auto-selects the model (currently Gemini 3.5 Flash). You cannot override it. This is a deliberate design choice โ see the Gemini 3.5 Flash benchmarks for why Google is confident in a single-model approach.
Will my MCP servers work without changes?
Local stdio-based MCP servers (using command + args) work unchanged. Remote MCP servers need the field rename from url to serverUrl, and the config must move to a dedicated mcp_config.json file.
What about Enterprise accounts?
Enterprise/Workspace accounts are explicitly excluded from this migration. Google has committed to maintaining Gemini CLI for enterprise users indefinitely. No action needed.
Is Antigravity CLI faster than Gemini CLI?
Yes. The Go binary starts significantly faster than the Node.js-based Gemini CLI. Cold start is near-instant versus the ~1-2 second Node.js bootstrap. The model itself (Gemini 3.5 Flash) is also faster at inference than the previous 2.5 generation.
Related reading
- Gemini CLI complete guide โ reference for your current setup
- Antigravity 2 complete guide โ the full platform beyond the CLI
- Gemini 3.5 Flash complete guide โ the model powering
agy - How to use Gemini 3.5 Flash with Antigravity CLI
- MCP complete developer guide โ deep dive on MCP configuration
- Claude Code vs Codex CLI vs Gemini CLI โ how the old CLI compared
- Antigravity 2 vs Claude Code vs Codex CLI โ how the new CLI compares
Donโt wait until June 17. Migrate now, run both CLIs in parallel for a week, and decommission gemini once youโre confident. The migration is straightforward โ the hardest part is the MCP config rename, and even thatโs a 2-minute edit.