Antigravity CLI — Getting Started
Install, authenticate, and run your first Antigravity CLI session. Covers curl install, npm, Homebrew, OAuth, API key auth, and essential commands.
Antigravity CLI — Getting Started
Antigravity CLI (agy) replaces Gemini CLI for individual consumers. This guide covers installation, authentication, and your first session.
Installation
Quick install (recommended)
curl -fsSL https://antigravity.google/cli/install.sh | bash
The script detects your OS and architecture, downloads the Go binary, verifies the checksum, and installs to ~/.local/bin/agy.
npm
npm install -g @google/antigravity-cli
Homebrew (macOS/Linux)
brew install antigravity-cli
Verify
agy --version
If the command isn't found, add ~/.local/bin to your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Authentication
Antigravity CLI supports three authentication methods:
Option 1: OAuth (recommended)
agy
Choose "Sign in with Google" and follow the browser flow. Your token is cached in the system keyring.
Option 2: API Key
export ANTIGRAVITY_API_KEY="your-api-key"
agy
Get a free API key at aistudio.google.com/apikey. The free tier supports 1,000 requests/day.
Option 3: Enterprise (Vertex AI / Code Assist)
export GOOGLE_CLOUD_PROJECT="your-project-id"
agy
First Session
cd your-project
agy
You'll see the Antigravity CLI prompt:
⚡ Antigravity CLI
Model: Gemini 3.5 Flash (High)
Context: 1,048,576 tokens
Sandbox: workspace
Type /help for commands.
>
Essential Commands
| Command | What it does |
|---|---|---|
| /help | Show all commands |
| /model | Switch AI model |
| /config | Open configuration settings |
| /clear | Clear conversation |
| /mcp | Manage MCP servers |
| /skills | Manage installed skills and plugins |
| /agents | List and monitor active agents |
Quick Examples
# Analyze your codebase
> Explain the architecture of this project
# Generate code
> Create a REST API endpoint for user authentication
# Debug
> Why is this test failing?
# Refactor
> Rename `User` to `Account` across all files
Model Selection
Switch models during a session:
/model
Available models:
| Alias | Model |
|---|---|
Gemini 3.5 Flash (High) | Fast, general-purpose coding |
Gemini 3.5 Flash (Low) | Cheapest, fastest |
Gemini 3.1 Pro (High) | Deep reasoning, architecture |
Claude Sonnet 4.6 (Thinking) | Balanced reasoning |
Claude Opus 4.6 (Thinking) | Maximum reasoning depth |
GPT-OSS 120B (Medium) | Open-source alternative |
Or set via flag:
agy --model "Claude Sonnet 4.6 (Thinking)"
Next Steps
- Prompt Engineering — Write effective prompts
- Configuration Reference — Settings, MCP, plugins
- Migration Guide — If migrating from Gemini CLI
- Patterns — Subagents, hooks, async tasks
Related Articles
Continue.dev — AI Coding Tool Guide
Open-source AI code assistant. Local model support, custom slash commands, configuration, and integration with Ollama, LM Studio, and cloud APIs.
Offload Bulk Generation to DeepSeek via Claude Code
Claude designs and reviews, a shell script calls DeepSeek API for cheap bulk generation. Split reasoning from volume for 95% lower cost on test suites, boilerplate, and documentation.
CLI-First Development with Antigravity Image Pipeline
Use fast CLI tools for all coding, then switch to Antigravity for Nano Banana image generation. Both under one Google AI Pro plan with no per-image fees.