Antigravity CLI logo
Compatibility guide

Antigravity CLI: setup & compatibility

Google's agy terminal agent: installation, custom Gemini endpoint settings and TokenRex compatibility limits.

Checked against Google's CLI repository and release 1.1.13 notes. The documented Gemini custom endpoint setting is real; a working TokenRex integration, streaming and agent tools have not been verified. This is a compatibility guide, not a claim of TokenRex support.

Before you start

  • Google Antigravity CLI (agy)
  • A Google sign-in or Gemini API credential for the chosen mode
  • A Gemini-native endpoint for custom Gemini provider mode

Setup methods

01

Install on macOS or Linux

Official Google installation. This does not connect TokenRex.

  1. 1

    Open Terminal on your Mac or Linux computer. Review Google's installer at the linked repository before running it.

  2. 2

    Run the installation command below, then open a new terminal if the agy command is not yet available.

  3. 3

    Run agy and follow the CLI's Google sign-in instructions. Start with a small read-only task in a folder you are authorized to access.

  4. 4

    Use /config for interactive settings and /help for available commands. Review permissions before letting the agent edit files or execute commands.

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

Setup reference
02

Install on Windows

  1. 1

    Open PowerShell and review Google's installer before executing it.

  2. 2

    Run the official command below, reopen PowerShell if necessary, then start agy and complete Google sign-in.

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

Setup reference
03

Custom endpoint — Gemini API mode

Documented in release 1.1.13. This requires Gemini-native API compatibility; an OpenAI Chat Completions URL is not interchangeable.

  1. 1

    Update to a CLI release supporting Gemini API-key mode. Open its settings.json and merge modelProvider: gemini with existing settings; do not replace permission settings.

  2. 2

    Supply GEMINI_API_KEY privately in the environment used to launch agy. Use a credential accepted by your Gemini-compatible provider, not a TokenRex key.

  3. 3

    Set GOOGLE_GEMINI_BASE_URL only to a provider-documented Gemini-native endpoint. Google documents the override but does not establish a TokenRex URL or arbitrary OpenAI model-ID support.

  4. 4

    Start agy. Check that the banner or /help identifies Gemini API key credentials. Verify a short request with that provider before enabling agent actions.

Configuration
{
  "modelProvider": "gemini"
}

Setup reference
04

Can I use a TokenRex base URL and model ID?

Not directly verified. A custom base URL alone does not make two API formats compatible.

  1. 1

    Do not set GOOGLE_GEMINI_BASE_URL to TokenRex's OpenAI-compatible base: the documented CLI mode uses Gemini-native requests.

  2. 2

    Do not assume OPENAI_BASE_URL, OPENAI_API_KEY or arbitrary TokenRex model IDs work in agy. These are not established by the official CLI sources checked here.

  3. 3

    For TokenRex today, choose a documented compatible tool such as OpenCode, Hermes Agent or Codex CLI from Integrations, and follow that tool's protocol-specific guide.

  4. 4

    Recheck Google's CLI documentation when provider support changes. A protocol adapter would be a separate integration and must be tested before being recommended.

Setup reference

Troubleshooting

Custom URL fails
Confirm the endpoint speaks the Gemini-native API expected by this mode. Changing an OpenAI-compatible URL or model name cannot resolve a protocol mismatch.
TokenRex model ID is unavailable
Arbitrary TokenRex model IDs are not verified in agy. Use an existing compatible-tool guide rather than inventing a provider setting.

Further references