If you recently tried to authenticate with the Gemini CLI and encountered a sudden, unresolvable login failure, you are not alone.
As of June 18, 2026, Google has officially deprecated the consumer-tier Gemini CLI. Authentication servers for individual tiers (Free, AI Premium, and Google One) have been deactivated. If you want to continue using Google's terminal-based coding agents, a mandatory migration to the new Antigravity CLI (agy) is required.
In this guide, we will break down why Google made this change, how the new platform differs, and how to migrate your existing configurations, skills, and extensions in under five minutes.
TL;DR
| Question | Short answer |
|---|---|
| What happened? | Consumer Gemini CLI auth endpoints disabled June 18, 2026 |
| Replacement | Antigravity CLI (agy) — Go-based, sandboxed, multi-agent |
| Install | curl -fsSL https://antigravity.google/cli/install.sh | bash |
| Migrate extensions | agy plugin import gemini |
| Verify | agy inspect |
| Deep dive | Antigravity CLI features reference |
Migration Quick Reference
| Feature | Gemini CLI (Legacy) | Antigravity CLI (agy) |
|---|---|---|
| Status | Deprecated (Auth Fails) | Active & Supported |
| Binary Command | gemini | agy |
| Engine Language | Python | Go (Go-powered execution) |
| Core Paradigm | Single-turn Prompting | Multi-Agent Loops & Subagents |
| Extensions/Plugins | Gemini Extensions | Antigravity Plugins |
| Security | None (Host command execution) | Terminal Sandbox (sandbox-exec, nsjail) |
Why Google Retired the Gemini CLI
The original Gemini CLI was built as a Python wrapper around the Gemini API. While excellent for single-turn code generation and simple file explanation, it struggled with long-running, stateful agent operations.
Google’s transition to the Antigravity platform reflects a shift from simple prompting to loop engineering and multi-agent systems. The new Antigravity CLI:
- Executes faster by using a compiled Go core.
- Supports subagents, letting a primary conversation delegate work to background workers.
- Isolates commands in a secure terminal sandbox to protect your local files from destructive agent actions.
- Groups agent elements (skills, rules, MCPs, hooks) into unified, shareable directory bundles called Plugins.
Who is affected?
| Account type | Gemini CLI status | Recommended action |
|---|---|---|
| Free / Google One AI Premium | Auth fails — deprecated | Migrate to agy immediately |
| Gemini Code Assist (Standard/Enterprise) | May still work | Migrate for subagents + sandbox |
| Vertex AI API keys (paid) | Legacy paths may work | Plan migration; test agy in staging |
| New projects (June 2026+) | N/A | Install Antigravity only |
If your error is authentication failed or invalid_grant on a consumer account after June 18, 2026, migration is not optional—the old CLI will not return for those tiers.
Common migration errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
agy: command not found | Shell PATH not reloaded | Restart terminal or source ~/.zshrc |
| OAuth browser loop | Blocked redirect | Allow 127.0.0.1 callback; try incognito |
| Empty plugin list after import | Wrong legacy path | Confirm ~/.gemini/extensions/ exists; rerun agy plugin import gemini |
Sandbox blocks npm test | Strict permissions | Adjust permissions.allow in settings.json |
| Context overflow warnings | Large monorepo indexed | Use /add-dir narrowly; review with /context |
Document your team's allowed commands list before widening sandbox bypass—see Antigravity CLI reference for toolPermission modes.
How to Migrate to Antigravity CLI
The migration process is simple. The Antigravity CLI has built-in detection for legacy Gemini CLI installations.
Step 1: Install the Antigravity CLI (agy)
To install the Antigravity CLI on macOS, Linux, or WSL, run the official installation script:
curl -fsSL https://antigravity.google/cli/install.sh | bash
This downloads the compiled binary, registers the agy alias in your terminal profile, and creates your settings directory under ~/.gemini/antigravity-cli/.
Step 2: Run Initial Auth & Detection
Launch the new command-line tool:
agy
On launch, the CLI will output:
[info] Legacy Gemini CLI configuration detected at ~/.gemini/config.json
[info] Would you like to run the interactive migration wizard? (Y/n):
Press Y and follow the prompt. Press Enter to open the browser-based OAuth flow, authenticate with your Google account, and copy the verification code back into the CLI.
Complete AI Builder Bootcamp
Claude, Python automation & full-stack — 12 live sessions with Yash Thakker.
The Complete AI Builder Bootcamp is the best AI development course for learning Claude AI, prompt engineering, Python automation, and full-stack web development. This intensive 6-week live bootcamp teaches you how to build AI-powered applications using Claude Projects, Claude Artifacts, Claude Code, and the complete Claude ecosystem. You'll master prompt engineering techniques, learn to create custom Claude connectors and MCP integrations, build Python automation workflows, develop full-stack websites with AI assistance, and create AI marketing agents.
The bootcamp includes 12 live Zoom sessions with Yash Thakker, founder of AISOLO Technologies and instructor to 350,000+ students. You'll build 8+ portfolio projects including AI playbooks, full-stack note-taking applications, Python automation scripts, marketing agents, and personal portfolio websites. The curriculum covers AI fundamentals, Claude Projects and Artifacts, Claude Co-work, Claude plugins and skills, Claude Code for Python development, full-stack development, AI marketing, and capstone projects.
Students receive 1-year access to all recordings, permanent Discord community access, a certificate of completion, and personalized career guidance. All enrollments include a 7-day money-back guarantee. This is the most comprehensive Claude AI bootcamp available, taking students from zero AI knowledge to expert AI builder in 6 weeks.
Step 3: Import Legacy Extensions as Plugins
In the old Gemini CLI, you wrote custom extensions. In Antigravity CLI, these are called plugins. If the migration wizard did not automatically import them, you can manually trigger the translator:
agy plugin import gemini
This command parses your old ~/.gemini/extensions/ directory, extracts custom instructions, and structures them into valid plugin.json formats staged in ~/.gemini/antigravity-cli/plugins/.
Step 4: Verify the Migration
Run the diagnostic command to confirm your account credentials, workspace paths, and imported skills are correctly indexed:
agy inspect
You should see your active email session, standard Gemini models (such as gemini-3.5-flash), and any migrated custom plugins.
Gemini extensions → Antigravity plugins mapping
| Legacy (Gemini CLI) | Antigravity CLI |
|---|---|
~/.gemini/extensions/ | ~/.gemini/antigravity-cli/plugins/ |
| Extension manifest | plugin.json |
| Custom instructions | rules/ + skills/ markdown |
| MCP configs | mcp_config.json per plugin |
| Hooks (if any) | hooks.json |
After import, run /skills and /mcp inside agy to confirm registration. Pin plugin folders in git if your team shares internal workflows—same discipline as agent skills lockfiles.
Post-migration checklist (5 minutes)
agy inspect— session, models, plugins indexed./contexton a real repo — confirm workspace roots are intentional./permissions— deny destructive commands; allow your test runner.enableTerminalSandbox— starttruefor untrusted code paths.- Run one real task — e.g. fix a failing test via subagent +
/agentsreview. - Remove stale
geminialiases from docs/CI so new hires installagyonly.
Enterprise and team rollout
Rolling out agy across an engineering org:
- Pilot squad — 3–5 developers migrate personal configs first; capture friction in a shared doc.
- Standard plugin bundle — security rules, test commands in
permissions.allow, shared MCP configs. - CI documentation — headless
agymay need sandbox off with strict deny lists; never store OAuth tokens in CI logs. - Training — 30-minute session on
/agents,/context, and permission prompts. - Sunset Gemini CLI — remove brew/npm install docs from internal wikis after pilot success.
Vertex and Code Assist teams should confirm billing and model allowlists with Google account reps before disabling legacy CLI paths.
Install notes by platform
macOS (Apple Silicon / Intel): Official install script adds agy to PATH via shell profile. Grant Terminal Full Disk Access only if sandbox profiles require it—default project-scoped access is usually enough.
Linux / WSL: Prefer native Linux binary over WSL1; WSL2 supports nsjail sandbox paths better than legacy WSL. Confirm curl TLS interceptors (corporate proxies) do not strip the install script.
Windows: Use WSL2 for parity with Linux sandbox behavior; native Windows AppContainer sandboxing follows different permission prompts—test /permissions before team rollout.
If install fails with bad pattern or mangled paste (common when terminal bracketed paste corrupts URLs), type the curl pipe manually or download the script to a file first:
curl -fsSL https://antigravity.google/cli/install.sh -o install-antigravity.sh
bash install-antigravity.sh
FAQ (migration)
Can I run Gemini CLI and Antigravity side by side? On consumer tiers, Gemini CLI auth no longer works—only enterprise paths may retain legacy access temporarily. Do not plan dual-consumer setups.
Will my Google One AI Premium subscription bill change? Subscription tiers are separate from CLI tooling; verify current Google pricing pages—this guide covers tooling migration only.
Do Cursor / Claude Code skills transfer automatically? No. Only legacy Gemini extensions import via agy plugin import gemini. For agent skills in other ecosystems, reinstall via /skills or copy SKILL.md into plugin folders manually.
How long does migration take? Install + wizard + import typically under 15 minutes for individual developers; team plugin standardization may take 1–2 sprints.
What if I only used Gemini CLI for gemini chat? Antigravity replaces that workflow with agy interactive TUI—rebind muscle memory from gemini to agy in shell aliases and internal docs.
What Changes for Developers?
Migrating to agy is not just a syntax update — it opens up new ways of working with AI in your terminal:
-
Commands: You will use
/mcpto manage Model Context Protocol connections instead of configuring endpoints in environment variables. -
Context Management: Running
/contextoutputs a visual grid of exactly which files are loading into the model's memory, warning you before you overflow the context limit. -
Subagents: Commands that edit code can spawn background subagents (viewable via
/agentsor screen split panels) to run tests and fix errors in isolation. -
Loop-native workflows: Long tasks become orchestrated loops rather than one-shot prompts—see loop engineering for the mental model shift from Gemini CLI chat sessions.
-
Context discipline:
/contextreplaces guesswork about what's in memory—critical as context windows fill with tool output and retrieved files.
If you want a complete breakdown of the new features, sandbox settings, and slash commands inside the CLI, head over to our deep dive: Google Antigravity CLI: Sandbox, Plugins, and Slash Commands Reference.
Related Reading
- Antigravity CLI: sandbox, plugins, slash commands
- What is MCP?
- What are agent skills?
- Loop engineering paradigm
- Browse agent skills on ExplainX
Summary
Google deprecated consumer Gemini CLI authentication on June 18, 2026. Antigravity CLI (agy) is the supported path: install via the official script, run the migration wizard, agy plugin import gemini, and verify with agy inspect. Enable sandboxing and permissions before pointing agents at production repos.
Bookmark both this migration guide and the Antigravity CLI feature reference—together they cover auth transition, sandbox configuration, slash commands, and subagent approvals for Gemini-first teams standardizing on Google terminal agents in 2026.
Keywords this guide targets: google gemini cli deprecated, migrate to antigravity cli, agy install, gemini cli authentication fail, and agy plugin import gemini—search-friendly phrases for developers hitting dead auth screens in June 2026.
If migration wizard does not appear, you may not have legacy config—run agy plugin import gemini manually anyway after confirming old extension folders exist, then agy inspect before deleting Gemini CLI binaries from PATH.
Consumer-tier developers should plan migration this week—waiting does not restore Gemini CLI authentication for individual Google accounts after the June 18, 2026 cutoff.
Share this guide with teammates still pasting OAuth errors into Slack—most consumer failures after mid-June 2026 are deprecation, not misconfigured API keys.
After migration, run one non-destructive task end-to-end—fix a unit test or refactor a small module—while watching /agents, /context, and permission prompts. That dry run surfaces misconfigured permissions.deny rules before you trust Antigravity on production repositories.
Document your final settings.json and imported plugin list in the team wiki so the next hire does not re-debug the same OAuth and sandbox mistakes.
If your team standardizes on Antigravity, bookmark ExplainX Antigravity CLI coverage for sandbox, plugin, and subagent setup after you finish migration.
Last updated June 19, 2026 — Antigravity CLI migration guide for ExplainX readers.
Note: Migration steps based on Google's June 2026 Antigravity 2.0 release specs. Re-check official docs if your account tier or error messages differ.