How to Install Google Antigravity CLI (Gemini CLI Replacement)
What Is Antigravity CLI?
Antigravity CLI (agy) is Google’s terminal AI coding agent — the successor to Gemini CLI, announced at Google I/O on May 19, 2026. It shares its agent harness with the Antigravity 2.0 desktop app, bringing plugins, MCP servers, skills, hooks, and subagents to the command line.
It’s free for all Google account holders. No API key setup, no billing — just sign in and code.
I’ve been running it on a remote server for a week. Fast for daily Q&A and small refactors. Struggles a bit with complex multi-file tasks compared to Claude Code.
How to Install Antigravity CLI
macOS / Linux
curl -fsSL https://antigravity.google/cli/install.sh | bash
The binary installs to ~/.local/bin/agy. If it’s not in your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
Windows (PowerShell)
irm https://antigravity.google/cli/install.ps1 | iex
No WSL required — runs natively on Windows.
Verify
agy --version
How to Authenticate
agy
First run opens your browser for Google sign-in. On SSH/remote servers, it prints a URL — open it on any device to complete auth.
For GCP project billing:
agy --project=my-gcp-project
What Commands Does Antigravity CLI Have?
| Command | Purpose |
|---|---|
/config | View/edit settings (model, theme, permissions) |
/permissions | Manage tool and file access |
/goal | Define a multi-step objective for the agent |
/schedule | Queue background tasks |
/artifact | Export generated files |
How Does It Compare to Claude Code and Codex CLI?
| Antigravity CLI | Claude Code | Codex CLI | |
|---|---|---|---|
| Price | Free | $20-200/mo | $20/mo |
| Default model | Gemini 3.5 Flash | Claude Sonnet 4 | GPT-4o |
| Install | curl one-liner | curl one-liner | curl one-liner |
| Auth | Google account | Anthropic API key | OpenAI account |
| Subagents | Native | Via tool use | Via tool use |
| MCP support | Yes | Yes | Yes |
| Plugins/Skills | Built-in system | Community hooks | Plugins |
| Windows native | Yes | Yes | Yes |
| SSH remote auth | Yes | Yes | No |
| Open source | No | No | Yes |
Tips
- Use
/goalfor complex tasks. Define the end state and let the agent plan, instead of chatting step-by-step. - Pin your model. If you have Ultra access:
/config set model gemini-3.5-ultra - Pre-approve directories.
/permissions grant read ~/projectsavoids repeated prompts. - Migrate from Gemini CLI. Your
~/.geminiconfig isn’t auto-imported — copy tool definitions to~/.config/agy/manually.
Troubleshooting
agy: command not found
PATH doesn’t include ~/.local/bin. Fix:
export PATH="$HOME/.local/bin:$PATH"
Auth fails on remote server
Make sure you can open the printed URL in a browser with your Google account. Behind a proxy? Try agy --no-browser.
Rate limit errors
Free-tier users hit limits during sustained sessions. Options:
- Wait a few minutes (limits reset quickly)
- Upgrade to AI Pro ($20/mo) for higher quotas
- Attach a GCP billing project
Related Articles
- How to Install Antigravity CLI on Linux and WSL
- Antigravity CLI Migration from Gemini CLI
- 5 Best Free AI Coding CLI Tools in 2026
- Claude Code vs Antigravity vs Codex: Real Cost
- OpenCode: Use Any Model at API Cost