Gemini CLI → Antigravity CLI
Last reviewed · content updated
What you'll learn
~15 min- Understand the Gemini CLI → Antigravity CLI transition and the 2026-06-18 consumer cutover
- Install Antigravity CLI (`agy`) as a consumer, or Gemini CLI under an enterprise license
- Authenticate with a Google account
- Run your first task and view the output
- Know when to reach for a Google CLI vs Claude Code
Google is retiring the consumer Gemini CLI. On June 18, 2026, Gemini CLI and the Gemini Code Assist IDE extension stop serving requests for Free, Google AI Pro, and Ultra accounts. Google’s replacement is Antigravity CLI — the agy command.
- Individual / consumer users: switch to Antigravity CLI (covered below).
- Enterprise users: if your organization has a Gemini Code Assist Standard or Enterprise license (or Gemini Code Assist for GitHub via Google Cloud), Gemini CLI keeps working — see the enterprise section near the end.
This lesson teaches Antigravity CLI as the primary path and keeps Gemini CLI as the enterprise option.
Gemini Web at gemini.google.com is a free, browser-based way to use Google’s models for conversational tasks with no install. For a full browser terminal where you can install a CLI, see the Cloud Sandbox Cheat Sheet or set up your sandbox.
By the end of this lesson, you’ll have a Google AI CLI running — Antigravity CLI if you’re an individual, Gemini CLI if you’re on an enterprise license — and understand when to reach for it.
What changed — and why
Gemini CLI was Google’s popular open-source command-line agent (tens of thousands of GitHub stars). In May 2026, Google announced it is consolidating its terminal agent into Antigravity CLI, a new Go-based agent that runs asynchronous multi-agent workflows in the background. Consumer Gemini CLI access ends 2026-06-18; enterprise licenses keep Gemini CLI running.
Antigravity carries over the same ideas you’d learn in any modern CLI agent — Agent Skills, Hooks, Subagents, and Extensions (now called “Antigravity plugins”) — though not at full 1:1 parity yet. Unlike Gemini CLI, Antigravity CLI is not open source.
The good news: the skills transfer directly. Whichever Google CLI you run, you’re still directing a Gemini-model agent from your terminal — and everything you learn here applies to Claude Code and Codex CLI too.
What you get
Both Antigravity CLI and (enterprise) Gemini CLI drive Google’s Gemini models from the terminal:
- Massive context: ~1 million tokens — read enormous codebases in one pass
- Gemini 3 family models (3 Pro, 3.5 Flash) with Auto routing — simple prompts go to Flash, complex ones to Pro
- Plan-first workflows: review and approve a strategy before the agent executes
- Project context files that give the model persistent instructions (like Claude Code’s
CLAUDE.md) - MCP-extensible: connect external tools and services
- Async multi-agent workflows (Antigravity): kick off background work and check results later
Install Antigravity CLI (individuals)
Antigravity CLI launched in May 2026 and is evolving quickly. The commands below were current at this lesson’s last review, but always confirm against the official site, antigravity.google, before installing.
Step 1: Install
curl -fsSL https://antigravity.google/cli/install.sh | bashcurl -fsSL https://antigravity.google/cli/install.sh | bashPowerShell:
irm https://antigravity.google/cli/install.ps1 | iexAntigravity CLI runs on Windows native — it does not require WSL.
The installer adds the agy command (it lands in ~/.local/bin on macOS/Linux). Verify:
agy --versionStep 2: Authenticate
Start Antigravity CLI:
agyIt opens your browser to sign in with your Google account. Sign in, and you’re done.
If you’re on a remote server without a browser, use device-flow authentication — the tool shows a URL and a code; open the URL on your local machine, enter the code, and the remote tool authenticates. Alternatively, set a Gemini API key as an environment variable: export GEMINI_API_KEY="your-key" (get one from aistudio.google.com). Because Antigravity CLI is new, run agy --help to confirm the exact auth flags for your version.
Your first interaction
Step 1: Create a project folder
mkdir hello-agy && cd hello-agyStep 2: Start the CLI
agyRun agy --help first if you want to see the available subcommands — the tool is new and its surface is still settling.
Step 3: Give it a task
Create a simple HTML page with a counter. It should have a darkbackground, a large number in the center, and + / - buttons toincrement and decrement. Use vanilla JavaScript — no frameworks.Watch as the agent:
- Plans the approach
- Creates the file(s)
- Writes the HTML, CSS, and JavaScript
- Reports what it did
Step 4: Check the result
lscat index.htmlopen index.htmlFrom WSL:
explorer.exe index.htmlOr right-click the file in VS Code’s Explorer panel.
xdg-open index.htmlOn a remote server, use VS Code’s file explorer or download the file.
A Google CLI vs Claude Code
Both are excellent. Here’s how they compare:
| Aspect | Antigravity / Gemini CLI | Claude Code |
|---|---|---|
| Access | Google account (Antigravity), or enterprise license (Gemini CLI) | API key or subscription |
| Context window | ~1M tokens | Large (varies by model) |
| Open source | Gemini CLI yes; Antigravity no | No |
| Project context | GEMINI.md (Gemini CLI) | CLAUDE.md |
| Best for | Large codebases, async multi-agent runs | Complex reasoning, nuanced instructions |
| Setup | Google account or enterprise license | API key or subscription |
Context windows and model capabilities change frequently — check each tool’s official docs for current limits. Many people use both: a Google CLI for broad exploration over big codebases, and Claude Code for complex, multi-step work where reasoning quality matters most.
Enterprise: keeping Gemini CLI
If your organization has a Gemini Code Assist Standard or Enterprise license (or Gemini Code Assist for GitHub via Google Cloud), Gemini CLI keeps serving requests past the June 18 cutover with continued model access and updates. Install it the usual way:
npm install -g @google/gemini-cligemini --versionAuthenticate with your licensed Google Workspace account. Gemini CLI’s in-session commands — /help, /plan (Plan Mode), /model, /memory show, /memory reload, /clear — and GEMINI.md project-context files work as before.
🧬In Your Field: Biotechclick to expand
The ~1M-token context window is especially useful for bioinformatics. You can feed a Google CLI an entire sequencing pipeline — dozens of scripts, config files, and documentation — and ask “Trace the data flow from raw FASTQ files to the final variant call set” or “Which steps could be parallelized?” It’s among the largest context windows in popular CLI tools, ideal for understanding large, inherited analysis codebases. Use Antigravity CLI individually, or Gemini CLI if your lab has an enterprise Gemini Code Assist license.
🏛️In Your Field: Government / State Devclick to expand
For government work, the right path is an enterprise Gemini Code Assist license — not a personal free tier. Enterprise licensing keeps Gemini CLI serving past the June 18 consumer cutover and, more importantly, comes with the data-handling, retention, and access-control terms a compliance review requires. Treat a personal free tier as off-limits for anything touching agency data, and route tool access through your security office. The draw is still the million-token context window: it can hold hundreds of pages of regulations or legislative text at once.
Tips
-
Take advantage of the large context. A 1M-token window can hold very large codebases — don’t hesitate to point it at big projects.
-
Use plan-first workflows for anything non-trivial. Review the strategy before letting the agent execute.
-
Set up project context early. Even a few lines (“This is a Python Flask app, we use pytest, follow PEP 8”) makes every response better. Gemini CLI uses
GEMINI.md; checkagy --helpfor Antigravity’s project-context file. -
Lean on async multi-agent runs (Antigravity). Kick off longer background work and check the results when it’s done, rather than babysitting the terminal.
-
Run
--helpwhen a command isn’t what you expect. Antigravity CLI is new and its commands are still settling — the tool is the source of truth, not your memory.
Verify it works
agy --versionYou should see a version number. If you get “command not found,” revisit the installation step (and confirm ~/.local/bin is on your PATH).
When Things Go Wrong
Use the Symptom → Evidence → Request pattern: describe what you see, paste the error, then ask for a fix.
Tools come and go — Gemini CLI is becoming Antigravity CLI even as you read this. That’s exactly why the skill matters more than the command. You’re not just learning one CLI; you’re learning to direct an AI agent from the terminal. The specific commands will keep changing. The ability to point an agent at a problem and get real work back will not.
Key Takeaways
- Consumer Gemini CLI ends 2026-06-18 — individuals move to Antigravity CLI (
agy); enterprise Gemini Code Assist licenses keep Gemini CLI - Install Antigravity CLI from antigravity.google — it’s new and evolving, so verify commands against the official docs
- ~1M-token context lets a Google CLI read more of your project than most other tools
- Plan-first, then execute — review the strategy before the agent runs
- For government/regulated work, use an enterprise license, not a personal free tier — route tool access through your security office
- Pair it with Claude Code — a Google CLI for broad exploration, Claude for precision reasoning