Antigravity CLI
Manual install
Section titled “Manual install”If your machine does not have the agy command yet, complete the official installation for your system first. The Antigravity CLI command is agy, not antigravity.
Open the official installation guide and follow the Windows installation method shown there.
Open a new terminal and check the version:
agy --versionUse the official install script:
curl -fsSL https://antigravity.google/cli/install.sh | bashHomebrew is also supported:
brew install antigravity-cliOpen a new terminal and check the version:
agy --versionUse the official install script:
curl -fsSL https://antigravity.google/cli/install.sh | bashOpen a new terminal and check the version:
agy --versionSee the official Antigravity CLI command reference for more commands and options.
Manual setup
Section titled “Manual setup”Google sign-in and Gemini API key mode are separate authentication modes in Antigravity CLI. To use Qiuqiu Token, set modelProvider: "gemini", then provide the token and endpoint through environment variables. Do not continue with Google OAuth sign-in in the CLI.
-
Create the configuration directory.
mkdir "%USERPROFILE%\.gemini\antigravity-cli"mkdir -p ~/.gemini/antigravity-climkdir -p ~/.gemini/antigravity-cliThe settings file is
%USERPROFILE%\.gemini\antigravity-cli\settings.jsonon Windows and~/.gemini/antigravity-cli/settings.jsonon macOS/Linux. -
Create or update
settings.json.If the file already contains other settings, add or replace only
modelProvider; keep the remaining fields.{ "modelProvider": "gemini" } -
Set the Gemini API key and Gemini-compatible root URL.
Use the root URL without appending
/v1. Replacesk-your-tokenwith a token from the Gemini CLI group.setx GEMINI_API_KEY "sk-your-token" setx GOOGLE_GEMINI_BASE_URL "https://api.qiuqiutoken.net"setxwrites user-level environment variables, but it does not update terminals that are already open.export GEMINI_API_KEY="sk-your-token" export GOOGLE_GEMINI_BASE_URL="https://api.qiuqiutoken.net"For persistence, add these two lines to
~/.zshrc.export GEMINI_API_KEY="sk-your-token" export GOOGLE_GEMINI_BASE_URL="https://api.qiuqiutoken.net"For persistence, add these two lines to
~/.bashrcor the profile used by your shell.If both
GOOGLE_API_KEYandGEMINI_API_KEYare present, the CLI usesGOOGLE_API_KEY; remove or unset the former first. -
Close any running Antigravity CLI process, make sure the environment variables are loaded, and start it again.
cd your-project-folder agycd your-project-folder agycd your-project-folder agy
Verify the connection
Section titled “Verify the connection”List the available models, then start the interactive CLI:
agy models
agyIf the CLI still opens Google sign-in, check the settings.json path and the spelling of modelProvider, then fully quit and restart the CLI.
