Building Module 6 · CLI Tools Setup

Antigravity CLI

Last reviewed · content updated

Beginner

What you'll learn

~15 min
  • Know what happened to Gemini CLI on 2026-06-18 and which path (Antigravity or licensed Gemini CLI) applies to you
  • Install Antigravity CLI (`agy`) and keep it updated
  • Authenticate with a Google account, over SSH, or with a Gemini API key
  • Run your first task, switch execution modes, and check your quota
  • Know when to reach for Antigravity vs Claude Code
ℹWhat happened to Gemini CLI?

On June 18, 2026, Google stopped serving Gemini CLI (and the Gemini Code Assist IDE extension) for individual accounts — Free, Google AI Pro, and Google AI Ultra. If you run gemini with a personal Google login today, it fails with IneligibleTierError: This client is no longer supported … migrate to the Antigravity suite. Google’s replacement for individuals is Antigravity CLI — the agy command.

Gemini CLI itself did not disappear. It is still open source and still shipping — stable release v0.57.0 as of 2026-08-25, not deprecated — but it now only works with a Gemini Code Assist Standard/Enterprise license, a Gemini API key, or Vertex AI credentials — see the enterprise section near the end.

This lesson teaches Antigravity CLI as the primary path and keeps Gemini CLI as the licensed/API-key option.

ℹCloud Equivalent

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 a licensed seat or an API key — and understand when to reach for it.

What changed — and why

Gemini CLI was Google’s popular open-source command-line agent. In May 2026, Google consolidated its consumer terminal agent into Antigravity CLI, a closed-source Go binary that shares one agent engine with the Antigravity 2.0 desktop app and the Antigravity IDE. Settings, MCP servers, skills, and permissions sync across all three, and you can hand a terminal session off to the GUI.

Antigravity carries over everything you’d learn in any modern CLI agent — execution modes, Skills, Hooks, Subagents, MCP servers, and plugins (the successor to Gemini CLI extensions). On first launch it offers to import your Gemini CLI profile; GEMINI.md files keep working unchanged.

The good news: the skills transfer directly. Whichever Google CLI you run, you’re still directing an agent from your terminal — and everything you learn here applies to Claude Code and Codex CLI too.

What you get

  • Massive context: ~1 million tokens of input on every Gemini 3.x model — read enormous codebases in one pass
  • A multi-vendor model menu: Gemini 3.8 Flash (added in CLI 1.1.25, September 2026), 3.7 Flash, and 3.6 Flash — each at Low, Medium, or High reasoning effort — plus 3.1 Pro (High or Low), plus Claude Sonnet 4.6, Claude Opus 4.6, and GPT-OSS 120B. Gemini 3.5 Flash has dropped off the menu. Run /model to see what your account can use today — the default changes as new models ship.
  • Three execution modes: default (review each edit), accept-edits (auto-approve file writes), and plan (think first, touch nothing). Cycle with Shift+Tab.
  • Project context files — GEMINI.md or AGENTS.md at your project root — that give the agent persistent instructions (like Claude Code’s CLAUDE.md)
  • MCP, Skills, Hooks, Subagents, plugins: the same extension vocabulary as the other CLIs in this module
  • Background tasks: kick off long work, keep typing, check /tasks later
  • One-shot mode: agy -p "your prompt" runs a single prompt non-interactively and exits — handy for scripts

Install Antigravity CLI (individuals)

Antigravity CLI is a native binary — no Node.js or npm required (like Claude Code’s and Codex’s native installers; only Copilot CLI still needs npm).

Step 1: Install

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

Requires macOS 12 or newer.

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

Works on WSL too. Requires glibc 2.28+ (Ubuntu 20.04+, Debian 10+, Fedora 36+, RHEL 8+).

PowerShell:

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

Antigravity CLI runs on Windows native (64-bit Windows 10+) — it does not require WSL. If you work in WSL, use the Linux command instead.

The installer adds the agy command (it lands in ~/.local/bin on macOS/Linux). Verify:

Terminal window
agy --version

Keep it current with agy update — releases ship roughly twice a week. If a new terminal can’t find agy, run agy install to repair your PATH.

Step 2: Authenticate

Start Antigravity CLI:

Terminal window
agy

It opens your browser to sign in with your Google account. Sign in, and you’re done — credentials are stored in your OS keyring.

💡Authenticating over SSH or on a remote server

Antigravity detects that you’re on SSH and, instead of trying to open a browser, prints an authorization URL. Open that URL on your local machine, sign in, copy the code it shows you, and paste the code back into the remote prompt. This works through tmux and double-hop SSH.

Alternative — Gemini API key: since version 1.1.13 you can skip Google sign-in entirely. Add "modelProvider": "gemini" to ~/.gemini/antigravity-cli/settings.json, then:

Terminal window
export GEMINI_API_KEY="your-key" # from aistudio.google.com/apikey
agy

On this route, expect the Gemini models only — Claude and GPT-OSS come with the Antigravity subscription, not the Gemini API — billed at Gemini API rates; the banner shows “Gemini API key” as your credential.

Your first interaction

Step 1: Create a project folder

Terminal window
mkdir hello-agy && cd hello-agy

Step 2: Start the CLI

Terminal window
agy

Type /help to see the command list and keybindings for your installed version.

Step 3: Give it a task

Create a simple HTML page with a counter. It should have a dark
background, a large number in the center, and + / - buttons to
increment and decrement. Use vanilla JavaScript — no frameworks.

Watch as the agent:

  1. Plans the approach
  2. Shows you the proposed file as a diff (in default mode you approve each write)
  3. Writes the HTML, CSS, and JavaScript
  4. Reports what it did

Step 4: Check the result

Terminal window
ls
cat index.html
Terminal window
open index.html

From WSL:

Terminal window
explorer.exe index.html

Or right-click the file in VS Code’s Explorer panel.

Terminal window
xdg-open index.html

On a remote server, use VS Code’s file explorer or download the file.

Modes, permissions, and the commands you’ll actually use

Press Shift+Tab to cycle default → accept-edits → plan. Plan mode is the one to reach for on anything non-trivial: the agent reads your project and proposes a strategy without editing a file. You can also start in a mode from the command line:

Terminal window
agy --mode plan # think first
agy --dangerously-skip-permissions # auto-approve everything — throwaway projects only
agy --sandbox # run shell commands inside an OS sandbox
CommandWhat it does
/modelChoose the reasoning model; the choice persists across sessions. Since 1.1.27, /model <name> <prompt> runs one prompt on another model and switches back
/fastSkip reasoning plans for a quicker answer
/planningMulti-turn plan generation before edits
/permissionsInteractive manager for which tools run without asking
/agentsSwitch custom agents and monitor background subagents (Module 19)
/tasksBackground shell logs
/usageCheck model quota consumption
/creditsCheck remaining credits or purchase more
/codesearchSearch the codebase
/diffReview pending changes
/resumePick up an earlier conversation
!At the start of a line, run a shell command
@Reference a file or folder by path — tab-completes
EscStop the current action without exiting

Plans and quotas

Antigravity CLI works without a subscription — the free tier gets the full model menu (including Claude and GPT-OSS) under basic weekly rate limits. Paid Google AI plans raise the ceiling and add a faster-refreshing five-hour bucket on top of the weekly one:

PlanPriceWhat it means for Antigravity
Free$0All models; basic weekly limits
Google AI Pro$19.99/moHigher limits, refreshed every five hours until the weekly cap
Google AI Ultra (5×)$99.99/mo5× Pro usage
Google AI Ultra (20×)$199.99/mo20× Pro usage

Quota is tracked in two separate buckets — “Gemini Models” and “Claude and GPT models” — each with its own five-hour and weekly limit. Check yours any time, even from a script, without spending quota:

Terminal window
agy -p "/quota"
💡Students

As of August 2026, US college students get 12 months of Google AI Pro free (redeem by 2026-12-31; it auto-renews at $19.99 afterward). Students in most other countries get a year of Google AI Plus. Check the Google AI plans page for current eligibility.

Investment framing, same as the other tools: the free tier is enough to finish this course. Upgrade when the weekly limit is the thing slowing you down, not before.

Antigravity vs Claude Code

Both are excellent. Here’s how they compare:

AspectAntigravity CLIClaude Code
AccessGoogle account (free tier available), Gemini API key, or enterprise Google Cloud projectClaude subscription or API key
Context window~1M tokens input on Gemini 3.xLarge (varies by model and plan)
ModelsGemini 3.x plus Claude 4.6 and GPT-OSSClaude only
Open sourceNo (Gemini CLI is)No
Project contextGEMINI.md or AGENTS.mdCLAUDE.md
Best forBig codebases, free-tier access, background tasksComplex reasoning, nuanced instructions

Context windows and model capabilities change frequently — check each tool’s official docs for current limits. Many people use both: Antigravity 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 (roughly $19–23 and $45–54 per user per month on Google Cloud), Gemini CLI keeps working exactly as before — the June 18 cutoff only removed the individual tiers. Gemini CLI also works with a Gemini API key or Vertex AI credentials. Install it the usual way:

Terminal window
npm install -g @google/gemini-cli
gemini --version

Authenticate with your licensed Google Workspace account (you’ll be asked for a Google Cloud project ID). Gemini CLI’s in-session commands — /help, /plan, /model, /memory show, /memory reload, /clear — and GEMINI.md project-context files work as before.

Two related retirements to know about: the free Gemini Code Assist IDE extension ended on June 18, 2026, and the consumer Gemini Code Assist for GitHub app shut down on July 17, 2026. The enterprise GitHub app is unaffected.

Organizations that want Antigravity rather than Gemini CLI sign in with a Google Cloud project (Gemini Enterprise Agent Platform), which adds SSO, audit logging, and consumption billing — but confirm current model availability with your Google Cloud rep, since third-party models like Claude and GPT-OSS haven’t always matched the individual-tier roster on the enterprise tier.

🧬In Your Field: Biotechclick to expand

The ~1M-token context window is especially useful for bioinformatics. You can feed Antigravity 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. The free tier is enough to try this today; if your lab has a Gemini Code Assist license, Gemini CLI works too.

🏛️In Your Field: Government / State Devclick to expand

For government work, the right path is an enterprise seat — either a Gemini Code Assist license (keeps Gemini CLI) or Antigravity signed in through an agency Google Cloud project — not a personal free tier. Enterprise licensing comes with the data-handling, retention, access-control, and audit-logging terms a compliance review requires. Treat a personal Google account 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

  1. Take advantage of the large context. A 1M-token window can hold very large codebases — don’t hesitate to point it at big projects.

  2. Plan first for anything non-trivial. Shift+Tab into plan mode (or start with agy --mode plan) and review the strategy before letting the agent execute.

  3. Set up project context early. Even a few lines in GEMINI.md or AGENTS.md (“This is a Python Flask app, we use pytest, follow PEP 8”) makes every response better. Use AGENTS.md if teammates use Codex CLI too — it’s the cross-tool convention.

  4. Watch your quota, not your wallet. On the free tier the constraint is the weekly limit. agy -p "/usage" tells you where you stand.

  5. Run agy update weekly. Releases ship fast; the changelog is one command away (agy changelog).

Verify it works

Terminal window
agy --version

You should see a version number (something like 1.1.27). If you get “command not found,” revisit the installation step (and confirm ~/.local/bin is on your PATH — agy install fixes it).

🔧

When Things Go Wrong

Use the Symptom → Evidence → Request pattern: describe what you see, paste the error, then ask for a fix.

Symptom
Google account authentication fails or browser doesn't open
Evidence
Error: Could not open browser for authentication or 'Authentication failed'
What to ask the AI
"Antigravity CLI (agy) tried to open my browser for Google sign-in but it failed. I'm on a remote server via SSH. How do I complete sign-in using the authorization URL it prints, and what are the alternatives (Gemini API key with modelProvider: gemini)?"
Symptom
'agy: command not found' after the install script runs
Evidence
bash: agy: command not found
What to ask the AI
"The Antigravity CLI install script finished but my terminal can't find the 'agy' command. It installs to ~/.local/bin — how do I check whether that directory is on my PATH, and does 'agy install' fix it?"
Symptom
The old 'gemini' command refuses to sign in
Evidence
IneligibleTierError: This client is no longer supported for Gemini Code Assist for individuals
What to ask the AI
"Gemini CLI rejects my personal Google login with IneligibleTierError. I understand individual accounts were cut off on 2026-06-18. Should I move to Antigravity CLI (agy), switch Gemini CLI to a Gemini API key, or get a Gemini Code Assist license? Walk me through the trade-offs."
Symptom
Antigravity says I've hit a rate limit
Evidence
Requests fail with a quota or rate-limit error mid-session
What to ask the AI
"Antigravity CLI is telling me I've hit a limit. How do I check my five-hour and weekly quota for the Gemini bucket versus the Claude/GPT bucket, and what are my options — wait for the reset, switch model buckets, or upgrade to Google AI Pro?"
💬Another tool in your arsenal

Tools come and go — Gemini CLI became Antigravity CLI for individuals in a single summer. 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

  • Individual Gemini CLI access ended 2026-06-18 — individuals use Antigravity CLI (agy); Gemini Code Assist licenses, Gemini API keys, and Vertex AI keep Gemini CLI working
  • Install with one curl command (no Node.js needed), then agy update to stay current
  • Three auth routes — browser sign-in, the SSH authorization-URL flow, or GEMINI_API_KEY to use the Gemini models without a Google sign-in
  • Shift+Tab cycles default → accept-edits → plan — plan first, then execute
  • Free tier includes the full model menu (Gemini 3.x, Claude 4.6, GPT-OSS) under weekly limits; paid plans add five-hour buckets
  • For government/regulated work, use an enterprise seat, not a personal account — route tool access through your security office
  • Pair it with Claude Code — Antigravity for broad exploration, Claude for precision reasoning
Search lessons