Home
Blog
Antigravity CLI Prompting Guide (2026): Google's Alternative to Gemini CLI

Antigravity CLI Prompting Guide (2026): Google's Alternative to Gemini CLI

Learn Antigravity CLI prompting in 2026: Install agy, migrate from Gemini CLI, scope parallel subagents, and set AGENTS.md rules without burning quota.

Satadeep Kar
•
11 mins
TL;DR
  • What changed: Gemini CLI stopped serving free, AI Pro, and AI Ultra accounts on 18 June 2026. Antigravity CLI (agy), a Go binary on the Antigravity 2.0 harness, replaced it. Enterprise licences and paid API keys keep access.
  • Migration: Installation takes about 15 minutes per machine. Import extensions with agy plugin import gemini, move .gemini/skills/ to .agents/skills/, and search every script and CI file for gemini.
  • Prompting: Parallel subagents share one quota, so vague prompts get expensive. Partition work by file path, state exclusions, give each agent a verifiable finish line, and start with two agents.
  • Safety and setup: Modes govern file edits, while /permissions governs shell commands. Keep rules in AGENTS.md, scope every MCP server tightly, and use plan mode first.

Gemini CLI scripts broke overnight on 18 June 2026. Any build that called gemini failed because Google had stopped serving consumer accounts that morning. Google Antigravity is the replacement, a Go-based command-line interface called agy. This terminal CLI has its own terminal UI and a tighter quota, so vague prompts now cost real money. 

Across 150+ client engagements in 30+ industries, we have watched teams lose a week to a migration that should take an afternoon. This guide covers the install, the migration path, and the prompt patterns that keep agy fast and affordable. Treat it as a field manual for the new generation of AI coding tools, written for developers and budget owners.

Should your team move to agy at all?

A 30-minute call with a BuildNexTech engineer reviews your Gemini CLI setup and leaves you with a written risk list.

Why Antigravity CLI Replaced Gemini CLI

Google Antigravity is Google's agentic coding product, and agy is its terminal front end on the Antigravity 2.0 harness. Google announced the transition on 19 May 2026 on the Google Developers Blog, and Gemini CLI stopped serving consumer accounts on 18 June 2026. Here is who gains and loses access:

  • Lost access: Free, AI Pro, and AI Ultra accounts.
  • Kept access: Gemini Code Assist Standard and Enterprise licences, plus paid API keys from Google AI Studio.
  • New runtime: A Go binary with no Node.js dependency, on the harness Google has pushed since Google I/O 2026.

Do not install the Gemini CLI again as a workaround, because it no longer serves consumer accounts. If you weighed Claude Code vs. Gemini CLI last year, the question is now agy against Claude Code. Beyond Claude Code pricing, no list of the best AI coding tools settles that.

Parallel subagents aren't new; Gemini CLI shipped them in April 2026, and Real Python says the same. What changed is the quota model, and quota is where sloppy prompts hurt.

Stack Overflow's 2025 Developer Survey reports that 84% of developers use or plan to use AI tools, so AI for coding and AI tools for software development are now a budget line. Every AI coding vendor competes on cost and control across its models, and an AI coding assistant that burns quota on overlapping work becomes a budget problem.

Antigravity CLI vs Gemini CLI

Gemini CLI Antigravity CLI (agy)
Runtime TypeScript on Node.js Go binary, no Node.js
Source model Apache 2.0 Proprietary
Models Gemini models only Gemini 3.5 Flash, Gemini 3.1 Pro, Claude Sonnet 4.6, Claude Opus 4.6, GPT-OSS 120B
Subagents Yes (April 2026) Yes, on the Antigravity 2.0 harness

Three differences deserve a closer look. Each one changes how you plan the move:

  • Model choice is the quiet upgrade. One picker covers Gemini models, Claude, and an open-weight option.
  • The licence is the quiet cost. Teams that audited or forked the Gemini CLI GitHub repository cannot do the same with agy, which is proprietary.
  • Gemini Code Assist IDE users should check settings. Do not assume the IDE plugin and agy share configuration.

How to Install and Migrate to Antigravity CLI

Installation takes one command per platform. Pick the route that matches your machine:

  • macOS or Linux: Run the official install.sh.
  • Windows: Run install.ps1.
  • Sign in: Use Google OAuth or one of your Google Cloud projects.
  • First test: Send a prompt in print mode, which runs once and exits.
agy --version
agy -p "Summarise the structure of this repository"
agy update

Those three commands confirm the binary works, the login holds, and you can keep it current. Setup time: about 15 minutes for one developer machine.

Headless execution is where teams get caught, because authentication has changed between releases. Check the current API references before wiring agy into a CI/CD pipeline or a GitHub Actions workflow.

Leaders often ask whether migration will eat a sprint. It will not, because a single repository moves in an afternoon and a monorepo with years of shell scripts takes a few days, mostly because of the scripts.

Real Python walks a Python project through this flow in detail, and AI Builder Club works better as a flag reference. We stick to the steps that decide whether a migration succeeds.

Import Gemini CLI Extensions, Settings, and Skills

Migration is a short checklist, and its failures are silent. Work through these items in order:

  • Run agy plugin import gemini to bring extensions across.
  • Move .gemini/skills/ to .agents/skills/.
  • Confirm GEMINI.md still loads.
  • Check any VS Code extension that shells out to gemini.

Settings now live in ~/.gemini/antigravity-cli/settings.json. A stale value there is the most common reason settings get ignored, and it never raises an error. The nastiest failure is simpler, because scripts keep calling gemini. Search your repositories, cron jobs, and CI files for that string before anything else.

Antigravity CLI Execution Modes: Default, Accept-Edits, and Plan

Antigravity CLI has three execution modes, and they govern file edits, not shell commands. Set one with --mode, cycle with Shift+Tab, or set agentMode in settings. 

Mode What it does Suits
Default Standard behaviour; check the docs for current edit approvals Everyday work
Accept-edits Applies file edits without stopping Well-understood refactors
Plan Proposes a plan before changing anything Multi-file changes

Keep these commands within reach, because they decide how much freedom the agent gets. Here is the set that controls modes and permissions:

  • agy --mode <mode>: Starts a session in the mode you choose.
  • Shift+Tab: Cycles through the modes during a session.
  • agentMode in settings.json: Sets your default mode.
  • /permissions: Sets the rules that govern shell commands.
  • agy -p "<prompt>": Runs one prompt in print mode and exits.
  • agy --dangerously-skip-permissions: Approves everything, so use it only in a sandbox.

Three rules keep you safe in practice. They matter most on shared repositories:

  • Commands follow /permissions. Accept-edits does not mean approve everything, whatever people assume.
  • --dangerously-skip-permissions is the real approve-everything switch. The name is honest, so we use it only in a sandbox or a throwaway directory.
  • Plan mode comes first for multi-file changes. Reading a plan takes seconds, while unpicking a wrong edit across twelve files takes an hour.

That is AI prompt engineering at its simplest: Make the agent show its reasoning before it acts. Vibe coding AI habits, where you prompt loosely and accept whatever comes back, are exactly what a shared quota punishes.

How to Prompt Parallel Subagents in Antigravity CLI

A platform team at a fintech pointed three subagents at one instruction: tidy up the API backend. Two rewrote the same error handler. Both edits were billed, one was thrown away, and the merge took longer than doing it by hand.

Good multi-agent orchestration comes down to three habits. Topic splits fail because topics overlap on disk, so follow these instead:

  • Partition work by file path, never by topic.
  • State exclusions plainly.
  • Give each agent a finish line it can verify.

Give Each Subagent Its Own Files

# Before: Split by topic
Use subagents to improve error handling and validation across the API.

# After: Split by path, with exclusions and a finish line
Run two subagents.
1. Own src/api/errors/**. Standardise error responses. Do not touch src/api/shared/**. Done when `pytest tests/errors` passes.
2. Own src/api/validation/**. Add input checks. Do not touch src/api/shared/**. Done when `pytest tests/validation` passes.
Neither agent edits files outside its path.

Path-based scopes cannot collide. Topic-based scopes produce conflicting edits, and you still pay for both.

Set Boundaries and a Finish Line

A subagent without a finish line keeps working and keeps spending. Give every agent clear limits before it starts:

  • Write exclusions as flat statements: Do not touch src/api/shared/**, and do not change public function signatures.
  • Give each subagent a check it can run itself, such as 'done when pytest tests/errors pass '.
  • Results then merge in any order.

Start With Two Subagents

Subagents burn quota in parallel, and that quota is shared across the CLI, the desktop agent manager, and the Agent SDK. One paid Google AI Pro user reported hitting the limit after two prompts, while AI Builder Club suggests Pro and Ultra plans comfortably support three to five subagents. So the sequence is simple:

  • Check /usage before you start.
  • Run two well-scoped Antigravity agents.
  • Scale up only when both land cleanly.

Cost-minded leaders ask whether this makes parallel agents too expensive. Scoped, it is cheaper, because a path-partitioned pair finishes faster than one serial agent, and discarded edits are what inflate the bill.

One of the clearer AI agent examples we have run is not about code. Agentic AI auto-resolved 64% of IT tickets for a 400-location US retail chain, and the gain came from narrow scopes per agent, not more agents. The best AI agents are narrow ones, and our guide to orchestrating parallel subagents covers the team-level version.

Our Take: Run two subagents, not five. Most teams reach for parallelism before they have a prompt worth parallelising, and the quota punishes that instinct. Scope first, then scale.

Struggling with subagent scoping or runaway quota costs?

Bring one repository to a 45-minute session with our engineers, and we will partition it into scopes and flag spend leaks.

Context Files, Skills, and Slash Commands

Antigravity CLI reads project rules from both AGENTS.md and GEMINI.md. Good rules shorten every prompt you write afterwards.

AGENTS.md vs GEMINI.md: Which to Keep

agy reads both files, so every subagent you launch starts from the same rules. Put in what a new hire would need on day one, and keep it short enough to read in a minute. A good rules file covers four things: 

  • Commands: How to run tests, linting, and builds.
  • Style: Formatting rules and naming conventions.
  • Boundaries: Paths the agent must never edit.
  • Done criteria: What a finished task looks like.
# Project rules
Run tests with pytest -q.
Format with Black, 100-character lines.
Never edit src/api/shared/**.
A task is done when tests pass, and lint is clean.

Short rules files get followed, and long ones get skimmed. If a rule does not change what the agent does, delete it. Then choose which file to keep:

Which one fits your team?

  1. Only one agent in your workflow? Keep GEMINI.md.
  2. Two or more agent tools? Consolidate into AGENTS.md.
  3. Unsure? Start with AGENTS.md, since agy reads both.

Whichever you pick, keep one source of truth, because two files that drift apart give your agents two sets of rules. Will your industry change any of this? No. A healthcare team and a retailer need the same file, and only the constraints differ.

Build Reusable Skills in .agents/skills

A markdown file becomes a slash command, so lint.md becomes /lint. Treat these as workspace skills that your whole repository shares. Two design rules keep them useful:

  • Write the body as a numbered procedure.
  • Do not repeat what AGENTS.md already says.

Duplicated rules drift apart, and then the agent obeys whichever file it read last. For enterprise teams, this is where consistency is won or lost.

Essential Slash Commands

Six commands earn their place in daily use. Learn these before you write any custom skill:

  • /grill-me: The agent asks clarifying questions before executing.
  • /goal: Runs a task to completion.
  • /agents: Lists your subagents.
  • /model: Switches model.
  • /usage: Shows quota.
  • /schedule: Queues recurring work.

Be careful with /goal, because it removes intermediate approvals. We reserve it for well-scoped jobs with a passing test as the finish line. That tradeoff has no clean answer, and anyone who says otherwise has not left an agent running overnight.

How to Connect MCP Servers to Antigravity CLI

MCP serve is a small service that exposes tools and data to an agent through the Model Context Protocol, so agy can query a database, a ticket system, or Google Workspace without custom glue. Setup takes four steps:

  • Add the server: Run agy mcp add <name> <url>, with --transport http for remote servers or --header for an API key.
  • Check the config: The command writes to mcp_config.json. Workspace servers live in .agents/mcp_config.json, and global servers live in your ~/.gemini folder.
  • Rename url to serverUrl: Remote servers use serverUrl inside the mcpServers block, so fix this when you migrate from Gemini CLI.
  • Verify: Run agy mcp list, or open the /mcp panel inside a session.
{
  "mcpServers": {
    "docs": {
      "serverUrl": "https://docs.example.com/mcp"
    }
  }
}

That block registers one remote server called docs. Commit the workspace file so your whole team gets the same tools, but keep API keys out of it.

Google publishes remote MCP servers for Gmail, Drive, and Calendar that use the same serverUrl format, so Google Workspace is a quick first test. Our guide to production-ready agent workflows shows how teams structure these connections. If you use Google Search grounding to keep answers current, treat it as another tool with its own permissions.

Wider tool access widens the prompt-injection surface. A Chrome DevTools MCP server gives an agent a live browser, which is useful and risky in equal measure. Three rules keep the risk contained:

  • Read-only first: Start with servers that only read data, and add write access later.
  • One task, one server: Connect only what the current job needs.
  • Untrusted output: Treat text returned by a tool as untrusted, because a web page can carry instructions meant for the agent.

Conclusion

Antigravity is less a new tool than a new cost structure. Teams that get value from Google Antigravity scope prompts by path, pick the right mode, and keep rules in AGENTS.md, then watch /usage.

Since Google I/O, agentic development has moved from one developer's terminal into shared Google Cloud workflows, and enterprise teams should evaluate the Gemini Enterprise Agent Platform alongside agy. Add agent observability before agents reach shared repositories. The harder question is not whether agy beats Claude Code. It is who on your team owns the quota.

Will your coding agents hold up in shared workflows?

Our AI agent development and AI business integration work spans 150+ teams; a 30-minute call maps your gaps, no commitment.

People Also Ask

Is Antigravity CLI free?

Partly. There is a free tier, but its limits are tight and have shifted since launch, so run /usage regularly and check Google's current plan details before relying on it.

Is Antigravity CLI better than Claude Code?

Not universally. Antigravity suits Google-stack teams and parallel runs, while Claude Code offers more maturity and a wider tooling ecosystem. Your existing stack should decide the winner.

Is Antigravity CLI safe to use on a private codebase?

It can be, but check your account's data-handling terms first. Consumer plans and enterprise licences differ, so confirm retention and training settings with Google before pointing agy at proprietary code.

What is the best AI for coding?

There is no single winner. The best AI for coding depends on your stack, quota budget, and security needs, so pilot two tools on one real repository before standardising.

How do I undo changes that agy makes?

Work on a branch and commit before each session. Unwanted edits: revert with git restore, whichever mode agy ran in. Shell side effects outside the repository need manual cleanup.

Don't forget to share this post!