Skip to content

Antigravity CLI

Install

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
bash
agy --version

Configure

Enable API key authentication

Edit ~/.gemini/antigravity-cli/settings.json and add this to the existing JSON:

json
{
  "modelProvider": "gemini"
}

Warning: Setting GEMINI_API_KEY alone does not change the authentication method. modelProvider must be the lowercase value "gemini".

Set environment variables

export GOOGLE_GEMINI_BASE_URL="https://enjoy.aigemini.org"
export GEMINI_API_KEY="codex_your_api_key"
  • Set GOOGLE_GEMINI_BASE_URL to the service root without an API path. The endpoint must implement the Gemini API.
  • Set GEMINI_API_KEY to your API key.
  • Run both exports in the same shell that starts agy. The CLI does not read .env or GOOGLE_API_KEY.

For persistent configuration, add both exports to ~/.zshrc or ~/.bashrc.

Launch and verify

bash
agy

When the header shows Gemini API key, start a conversation.

  • Sign-in still opens: verify "modelProvider": "gemini", exit, and restart agy.
  • Startup reports a missing key: set GEMINI_API_KEY again in the current shell.
  • Requests fail: check the API key, service root, and access to the selected model.

OpenAI-compatible gateway integration docs