Antigravity CLI (agy): install, sign in, plans and config
Install Google's Antigravity CLI on macOS, Linux and Windows, sign in over SSH, the free and Pro quotas, where MCP and skills live, agy -p, and moving from Gemini CLI.
Antigravity CLI is Google’s terminal coding agent, run as agy, and since June 18, 2026 it is where free Google accounts and Google AI Pro and Ultra subscribers go instead of Gemini CLI. Install it with curl -fsSL https://antigravity.google/cli/install.sh | bash on macOS or Linux, or irm https://antigravity.google/cli/install.ps1 | iex in Windows PowerShell, then run agy in a project folder and sign in with your Google account. Over SSH it prints a URL; open it on your own computer and paste the code back. The free tier is $0 with a weekly quota; Pro and Ultra refresh every five hours. As of November 27, 2026 the current version is 1.5.16.
What it is, next to the Antigravity app, the IDE and Gemini CLI
Google Antigravity is a family of products: a desktop app, a standalone IDE (version 2.8.0 on the download page), extensions for other editors, a Python SDK and the CLI. The CLI is a full-screen terminal program, like Claude Code or Codex CLI, that reads your code, edits files and runs commands with your approval. Google’s feature page says “The Antigravity App and the Antigravity CLI run the same agent, so most features work on both.” Skills, rules and MCP servers work in both, and plugins installed in the app show up in the CLI. The app is the one that connects to a remote machine over SSH from your desktop; the CLI is the one you install on the server itself.
Gemini CLI still exists but no longer serves free or Google One accounts. Its README now says:
Free individual access and Google AI Pro / Ultra (Google One) moved to Antigravity CLI on June 18, 2026CopiedPaid Gemini API keys and Gemini Code Assist Standard and Enterprise licences keep working there. If that is you, the Gemini CLI guide covers it; the rest of this page is about agy.
Install it on macOS, Linux and Windows
The download page gives one line per system:
# macOS, Linux, and a Googlebook's Linux terminal
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Windows PowerShell
irm https://antigravity.google/cli/install.ps1 | iex
# Windows CMD
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmdCopiedThe script needs no root. It picks a build for your system (macOS, or Linux on glibc or musl, on x86_64 or arm64), checks its SHA-512 against Google’s manifest and puts the binary at ~/.local/bin/agy; on Windows it goes to C:\Users\<username>\AppData\Local\agy\bin. To put it elsewhere, pass --dir to the script, which through a pipe is | bash -s -- --dir /path. The script is plain shell at antigravity.google/cli/install.sh; to read it before it runs, download it, look, then run it:
curl -fsSLO https://antigravity.google/cli/install.sh
less install.sh
bash install.shCopiedAfter copying the binary it runs agy install to configure your shell. Then check:
agy --versionCopiedIf the shell answers bash: agy: command not found, ~/.local/bin is not on your PATH. Add it to ~/.bashrc or ~/.zshrc and reload:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
source ~/.bashrcCopiedOn Windows, add the agy\bin folder above to your user PATH and open a new terminal.
Sign in, on a laptop and on a server over SSH
There is no login subcommand: run agy and it signs you in on first launch. The first run also asks for a colour theme, whether to use a full-screen buffer or inline output, and whether you trust the folder before it indexes the files. On a computer with a browser, it opens one; choose Google OAuth for a personal account, or “Use a Google Cloud project” for an enterprise licence or pay-as-you-go billing.
On a server, the install docs say “The CLI detects the SSH environment and prints a unique, secure authorization URL.” Open that URL on your own computer, sign in, and the browser shows an authorization code; paste it into the prompt in your SSH session.
The token is kept in the operating system’s keyring, and that is where headless machines trip. The troubleshooting page gives this error:
Error: failed to retrieve token: secret keyring is lockedCopiedOn a Linux server with no desktop session, a D-Bus session and a keyring daemon have to be running; Google’s suggestion is export $(dbus-launch) before starting agy. On a Mac you reach over SSH, unlock the login keychain with security unlock-keychain, and in Keychain Access check that agy is allowed on the Antigravity CLI item.
Two other routes skip the Google account sign-in. With a Gemini API key from AI Studio, set the provider in ~/.gemini/antigravity-cli/settings.json and export the key, because, in the docs’ words, “Only setting a GEMINI_API_KEY environment variable on its own has no effect.”
{
"modelProvider": "gemini"
}Copiedexport GEMINI_API_KEY="your-api-key" # better from a chmod 600 file you source than typed into history
agyCopiedThe header then shows “Gemini API key” where your email would be, and agy refuses to start if the provider is set and the key is missing. With Google Cloud’s Application Default Credentials, run gcloud auth application-default login --project YOUR_PROJECT and export AGY_ADC_AUTH=true. To sign out of an account sign-in, type /logout, which removes the tokens from the keyring.
Plans, models and the free quota
Every plan includes the CLI. Google’s pricing page describes quotas in words, not numbers, as of November 27, 2026:
| Plan | Price shown | Quota | Models |
|---|---|---|---|
Individuals (free) | $0/month | Baseline agent quota refreshed weekly | Gemini 4 Hydrogen, Gemini 3.8 Flash, Claude Sonnet 4.6 and Opus 4.6, GPT-OSS-120b |
Google AI Pro | Not shown | Generous agent quota refreshed every 5 hours and higher weekly limits | Adds Gemini 4 Neon, Carbon and Argon, Orchestrator, Claude Sonnet 5.5 and Opus 5.5 (paid, non-trial plans; trials get the Claude 4.6 models instead) |
Google AI Ultra | Not shown | Highest agent quota refreshed every 5 hours and maximum weekly limits | The Pro set, without the Claude 4.6 models |
Business, via Google Cloud | Standard and Plus from $30 a seat a month, or pay as you go with a $0 seat fee | Pooled seat credits ($10 a month Standard, $15 Plus), or consumption-based pricing on pay as you go | The Gemini 4 set, older Gemini models, Claude 5.5 (Claude needs an administrator to opt in) |
The models page lists November 30, 2026 as the removal date for Gemini 4 Argon, Gemini 3.8 Flash, GPT-OSS-120b and the Claude 4.6 models, and the pricing page marks the same models on each plan. Argon was never on the free plan, so after that date free accounts keep Gemini 4 Hydrogen alone. The Claude 5.5 models on Pro need a paid plan, not a trial. The pricing page shows no price for Pro or Ultra; they are sold on Google One’s AI plans page. On those two plans, AI credits can pay for use past the quota; turn that on with "useG1Credits": true in the settings file or “Use AI Credits” in /config. Inside a session, /usage shows what is left of the quota, /credits the credit balance, /model switches model and /effort sets the reasoning level, from low up, with the levels on offer depending on the model (the models page names xhigh as the top one for Gemini 4 Neon and Hydrogen). From the shell, agy models lists the model slugs to pass to --model.
Where its settings, MCP servers, skills and rules live
| What | For you, everywhere | For one project |
|---|---|---|
Settings | ~/.gemini/antigravity-cli/settings.json | |
Keybindings | ~/.gemini/antigravity-cli/keybindings.json | |
MCP servers | ~/.gemini/config/mcp_config.json | .agents/mcp_config.json |
Skills | ~/.gemini/config/skills/ (shared with the app); the CLI also reads ~/.gemini/antigravity-cli/skills/ and ~/.gemini/skills/ | .agents/skills/ |
Rules | ~/.gemini/AGENTS.md, ~/.gemini/GEMINI.md, ~/.gemini/config/AGENTS.md, ~/.gemini/config/GEMINI.md, ~/.gemini/config/rules/*.md | AGENTS.md, GEMINI.md or .agents/rules/*.md |
Project rules and skills are read from the folder where you start agy and each parent up to the repository root, not from subfolders below it. A skill is a folder with a SKILL.md whose YAML frontmatter needs a description (the name defaults to the folder name). Add "$schema": "https://antigravity.google/schemas/v1/settings.json" to the settings file and your editor will autocomplete its keys.
MCP servers go under an mcpServers map. A local server takes command with optional args, env and cwd; a remote one takes serverUrl and optional headers, and the MCP page says “Remote MCP servers must use the Streamable HTTP transport.” The older SSE transport and the httpUrl key are not supported. The server names and package below are placeholders:
{
"mcpServers": {
"local-tools": {
"command": "npx",
"args": ["-y", "your-mcp-server-package"]
},
"remote-api": {
"serverUrl": "https://mcp.example.com/mcp/",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}CopiedA token in that file is a secret on disk: keep the global file at chmod 600, and keep tokens out of a project’s .agents/mcp_config.json if the repository is shared. Type /mcp in a session to see each server’s status and logs and to reload the file.
Run it without a person: agy -p
The headless docs run one prompt and exit with -p (also --print or --prompt). The answer goes to stdout and diagnostics to stderr.
agy -p "Summarize what changed in the last commit"
agy -p "List the failing tests" --output-format json --print-timeout 10m
agy -p "Now fix the first one" --continueCopied--output-format json prints one object at the end with status, response, error and usage, so a script checks that status is SUCCESS; stream-json prints events as they happen. --print-timeout defaults to no limit, so set one for anything on a timer. Two behaviours matter on a server:
- Approvals: nobody is there to answer, so an action that needs approval is refused, the run carries on and still exits 0, with a notice on stderr. Read stderr, or allow what the job needs in advance (below).
- Sign-in: “Headless mode uses your cached credentials.” Sign in once interactively as the same user. Without a terminal and without credentials, the run exits with an
authentication requirederror rather than waiting.
--dangerously-skip-permissions approves every tool call, shell commands included, with whatever access your user has. The narrower way is a permissions block in the settings file, where deny beats ask and ask beats allow:
{
"permissions": {
"allow": ["command(git status)", "command(npm test)", "write_file(src/)"],
"deny": ["command(rm -rf)", "write_file(.git/)"]
}
}Copied--sandbox (or enableTerminalSandbox in the settings, off by default) runs the agent’s commands in an isolated space: kernel namespaces on Linux, Seatbelt profiles on macOS, and an AppContainer on Windows 11 24H2 with the August 2026 update or later. Sandboxed commands have no network by default, and ~/.ssh and .env files are blocked. On Linux hosts and containers that block unprivileged user namespaces, the docs say the flag and the setting “have no effect”, so do not count on it there without checking. Google’s FAQ says headless mode “is intended for direct scripting and CI workflows”, and that “Wrapping agy inside third-party coding agents or applications, or automating account rotation, is not supported under consumer plans.”
For long interactive work on a server, run agy inside tmux so the session survives a dropped connection; what tmux is covers the few commands that matter.
Updating and uninstalling
The installer says the CLI “automatically self-updates in the background during regular runs”. To update by hand, Google’s Remote Agents page says “To update the CLI, run agy update.” And /changelog inside a session shows the release notes. This warning means a previous updater hung or crashed, or your user cannot write to the install folder:
Warning: another background updater process is already active (update.lock)CopiedDelete ~/.gemini/antigravity-cli/updater/update.lock and check the folder’s permissions. To stop updates, for a pinned CI image say, set AGY_CLI_DISABLE_AUTO_UPDATE=true in your shell profile.
Google documents no uninstall command. The installer copies one binary, and if it finds agy already there it tells you to delete that binary first; it also runs agy install to configure your shell, and what that writes is not documented, so check your shell profile for anything mentioning agy afterwards. Removal is: sign out with /logout while it is still installed, then
rm ~/.local/bin/agy
# Optional, and permanent: the CLI's own settings, keybindings and skills
rm -rf ~/.gemini/antigravity-cliCopiedOn Windows, delete the C:\Users\<username>\AppData\Local\agy\bin folder and take it off your PATH. Leave the rest of ~/.gemini unless you mean to lose it: it also holds the MCP config, the global skills and rules shared with the Antigravity app, and Gemini CLI’s files if you used it.
Moving from Gemini CLI
The two tools share ~/.gemini, and the first agy run on a machine with Gemini CLI’s files offers a checklist of what to convert. According to the migration guide:
agy plugin import geminiturns Gemini CLI extensions into Antigravity plugins, their custom commands into skills, and their MCP servers intomcp_config.json.GEMINI.mdandAGENTS.md, in projects and in~/.gemini, are read as they are.- A project’s
.gemini/skills/is not read: move it to.agents/skills/yourself. - MCP servers move out of
settings.jsoninto their own file, and a remote server’surlorhttpUrlbecomesserverUrl.
Gemini CLI’s own commands, flags and API-key setup are in the Gemini CLI guide. If you are choosing a terminal agent rather than following Google’s path, Claude Code alternatives puts Antigravity CLI beside Codex, OpenCode, Pi and the rest, and choosing a VPS for a coding agent covers the server any of them runs on.