Antigravity CLI
Install
macOS / Linux
bash
curl -fsSL https://antigravity.google/cli/install.sh | bashWindows (PowerShell)
powershell
irm https://antigravity.google/cli/install.ps1 | iexWindows (CMD)
cmd
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmdbash
agy --versionConfigure
Enable API key authentication
Edit ~/.gemini/antigravity-cli/settings.json and add this to the existing JSON:
json
{
"modelProvider": "gemini"
}Warning: Setting
GEMINI_API_KEYalone does not change the authentication method.modelProvidermust 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_URLto the service root without an API path. The endpoint must implement the Gemini API. - Set
GEMINI_API_KEYto your API key. - Run both exports in the same shell that starts
agy. The CLI does not read.envorGOOGLE_API_KEY.
For persistent configuration, add both exports to ~/.zshrc or ~/.bashrc.
Launch and verify
bash
agyWhen the header shows Gemini API key, start a conversation.
- Sign-in still opens: verify
"modelProvider": "gemini", exit, and restartagy. - Startup reports a missing key: set
GEMINI_API_KEYagain in the current shell. - Requests fail: check the API key, service root, and access to the selected model.
