Skip to content

Antigravity CLI

This service supports the Gemini-compatible interface required by Antigravity CLI.

Background

Antigravity CLI is Google's terminal AI coding tool announced at Google I/O on May 19, 2026 — the successor to Gemini CLI. The binary is named agy, rewritten in Go for better performance with native support for SSH remote workflows.

Gemini CLI will stop serving individual (free, Pro, Ultra) users on June 18, 2026. Enterprise users retain access.

Install

Antigravity CLI is installed via an official script. No Node.js required.

macOS / Linux

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

Windows (PowerShell)

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

Windows (CMD)

cmd
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd

Verify the install:

bash
agy --version

Configure

Antigravity CLI carries over Gemini CLI's environment variables. Use these three to connect to a custom gateway:

VariableDescription
GOOGLE_GEMINI_BASE_URLGateway root URL, replaces the default Google endpoint
GEMINI_API_KEYYour API key
GEMINI_MODELDefault model to use

Configuration example:

export GOOGLE_GEMINI_BASE_URL="https://codex.openai.com"
export GEMINI_API_KEY="codex_your_api_key"
export GEMINI_MODEL="gemini-3.5-flash"

Use the service root in GOOGLE_GEMINI_BASE_URL, not a full API path. Antigravity CLI appends the API paths automatically.

To make this permanent, add the export statements to your shell profile (~/.zshrc or ~/.bashrc), then reload it with source ~/.zshrc.

Launch

bash
agy

On first launch, Antigravity CLI opens your default browser for Google Sign-In. In SSH sessions, it detects the remote environment and prints an authorization URL to complete in your local browser.

Verify

Start a conversation in Antigravity CLI. If you receive a normal response, the setup is working.

If you see an auth error, check that GEMINI_API_KEY is correct and GOOGLE_GEMINI_BASE_URL points to the right service address.

Migrating from Gemini CLI

If you were using Gemini CLI, here is what changes:

  • The binary changes from gemini to agy
  • Environment variables (GOOGLE_GEMINI_BASE_URL, GEMINI_API_KEY, GEMINI_MODEL) are unchanged — no reconfiguration needed
  • Extensions become plugins; run agy plugin import gemini to migrate them in one step
  • Workspace Skills move from .gemini/skills/ to .agents/skills/
  • MCP config moves from .gemini/mcp_config.json to .agents/mcp_config.json; remote server field renamed from url to serverUrl
  • Context files (GEMINI.md, AGENTS.md) remain compatible — no changes needed

OpenAI-compatible gateway integration docs