Googleâs Antigravity CLI is the successor to Gemini CLI and the centerpiece of the Antigravity 2.0 platform. Built from the ground up in Go, it delivers agentic coding, file management, web browsing, and sandboxed code executionâall from your terminal. Powered by Gemini 3.5 Flash by default at a blistering 289 tokens per second, itâs the fastest AI coding agent you can run locally today.
This Antigravity CLI setup guide walks you through installation, authentication, configuration, and practical usage so you can start shipping code faster in under ten minutes.
Why Antigravity CLI?
If youâve been following the best AI coding tools in 2026, you know the terminal-based agent space is crowded. Antigravity CLI stands out because:
- Speed: Gemini 3.5 Flash CLI responses arrive at 289 tok/sâfaster than any competing model at this quality tier.
- Agentic by default: It reads your project, edits files, runs tests, and iterates without you babysitting each step.
- Unified platform: Part of Antigravity 2.0, so your CLI sessions sync with the web IDE and mobile app.
- Compute-based limits: No arbitrary message caps. You get a compute budget that refreshes every 5 hours.
Whether youâre migrating from Gemini CLI or evaluating it against Claude Code, Codex CLI, and others, this guide has you covered.
Prerequisites
Before starting the Antigravity CLI setup, make sure you have:
- A Google account â any personal or Workspace account works.
- A subscription tier â the free tier gives you limited compute. For heavy use (multiple projects, long sessions), Google AI Pro at $20/month is recommended.
- Operating system â macOS (Apple Silicon or Intel), Linux (x86_64 or arm64), or Windows 10/11.
- Terminal â any modern terminal emulator. On Windows, use PowerShell or Windows Terminal.
Installation
macOS (Homebrew)
The fastest path on macOS:
brew install google/antigravity/antigravity
Verify the installation:
antigravity --version
Linux
Use the official install script:
curl -fsSL https://antigravity.google/install.sh | sh
This installs the binary to ~/.local/bin. Make sure that directory is in your PATH.
Windows
Download the installer from antigravity.google/download or use winget:
winget install Google.Antigravity
First Run and Authentication
Launch Antigravity CLI for the first time:
antigravity
It opens your browser for Google OAuth. Sign in, grant permissions, and youâre authenticated. The CLI stores your token locallyâyou wonât need to sign in again unless you revoke access.
Once authenticated, youâll see the interactive prompt. Type a natural language request or pass one inline:
antigravity "what files are in this project?"
Basic Commands
Antigravity CLI accepts prompts as arguments or through its interactive REPL. Here are the patterns youâll use daily:
Ask questions about your codebase
antigravity "explain the authentication flow in this project"
Edit files
antigravity "fix the failing tests in this project"
The agent reads your test output, identifies failures, edits the relevant files, and re-runs tests to confirm the fix. It asks for approval before writing changes (unless you enable yolo mode).
Run code in a sandbox
antigravity "write a Python script that generates a CSV report from data.json, then run it"
Code execution happens in an isolated sandboxâsafe even for untrusted operations.
Web browsing
antigravity "look up the latest Express.js release notes and summarize breaking changes"
Configuration
Model Selection
Gemini 3.5 Flash is the default, but you can switch models:
antigravity --model gemini-3.5-pro "review this PR for security issues"
To change the default permanently, edit ~/.config/antigravity/config.yaml:
default_model: gemini-3.5-flash
Custom Instructions
Create a ~/.config/antigravity/instructions.md file with your global preferences:
- Always use TypeScript strict mode
- Prefer functional patterns over classes
- Write tests for any new function
Project Context
Drop a .antigravity.md file in your project root to give the agent project-specific context:
# Project Context
This is a Next.js 15 app with App Router. We use:
- Drizzle ORM with PostgreSQL
- Tailwind CSS v4
- Vitest for testing
Always run `pnpm test` after making changes.
This is the evolution of Gemini CLIâs GEMINI.md approachâsame concept, better execution.
Using Gemini 3.5 Flash Specifically
Gemini 3.5 Flash is the default model, so you donât need any flags for standard use. But there are Flash-specific features worth knowing:
Explicit Model Flag
If youâve changed your default model, force Flash with:
antigravity --model gemini-3.5-flash "refactor this function"
Thinking Mode
For complex architectural decisions, enable thinking mode. This uses Flashâs extended reasoning capabilityâslower but more thorough:
antigravity --think "design a caching layer for this API"
Thinking mode is ideal for system design, debugging complex issues, and multi-file refactors. For quick edits and questions, standard mode is faster and usually sufficient.
When to Use Flash vs Pro
For a deeper comparison of model capabilities, see our Gemini 3.5 Flash vs Claude Opus 4.7 vs GPT-5.5 benchmark. The short version:
- Flash: Day-to-day coding, quick fixes, file edits, test writing. Fast and cheap on compute.
- Pro: Complex multi-step reasoning, large refactors across 20+ files, security audits.
Custom Agents
Antigravity CLI supports custom agentsâspecialized personas you define for recurring tasks. This is the improved successor to Gemini CLI subagents.
Create agents in ~/.config/antigravity/agents/ or in your project at .antigravity/agents/:
# .antigravity/agents/reviewer.yaml
name: reviewer
description: "Code review agent focused on security and performance"
instructions: |
You are a senior security engineer reviewing code.
Focus on: injection vulnerabilities, auth bypasses, data leaks, N+1 queries.
Format findings as a numbered list with severity ratings.
model: gemini-3.5-flash
Use it:
antigravity --agent reviewer "review the changes in the last commit"
You can create agents for documentation writing, test generation, migration scripts, or any repeatable workflow.
Tips for Maximum Productivity
Yolo Mode
Skip all confirmation prompts. The agent edits files and runs commands without asking:
antigravity --yolo "add error handling to all API routes"
Use this when you trust the operation and want speed. Always have git as your safety net.
Pipe Input
Feed logs, diffs, or file contents directly:
cat error.log | antigravity "explain this error and fix it"
git diff HEAD~3 | antigravity "summarize these changes for a changelog"
Batch Operations
Combine with shell scripting for bulk tasks:
find . -name "*.test.ts" | antigravity "update all these test files to use the new assertion syntax"
Session Persistence
Your conversation history persists within a session. Start a session, give context once, then issue follow-up commands without repeating yourself.
For more CLI agent productivity patterns, check our guide on how to choose an AI coding agent in 2026.
Migrating from Gemini CLI
If youâre an existing Gemini CLI user, migration is straightforward. After our one-week review of Antigravity, we found the transition takes about 15 minutes.
What changed
| Gemini CLI | Antigravity CLI |
|---|---|
gemini command | antigravity command |
GEMINI.md context file | .antigravity.md context file |
Subagents in .gemini/agents/ | Agents in .antigravity/agents/ |
| Node.js runtime | Go binary (faster startup) |
| Message-based limits | Compute-based limits (5h refresh) |
--sandbox flag | Sandbox is default |
Migration steps
- Install Antigravity CLI using the instructions above.
- Rename context files:
GEMINI.mdâ.antigravity.md(content format is compatible). - Move agents: Copy
.gemini/agents/*.yamlto.antigravity/agents/. The YAML schema is nearly identicalâjust remove any deprecatedtoolsfield. - Update scripts: Replace
geminiwithantigravityin any shell scripts or CI pipelines. - Test: Run
antigravity "hello"to confirm everything works.
Your Google authentication carries over automaticallyâno need to re-authenticate.
Whatâs better
- 3x faster startup thanks to the Go binary (no Node.js cold start).
- Better file editing: Antigravity uses a diff-based approach thatâs more reliable for large files.
- Compute limits are more generous than Gemini CLIâs message caps for most workflows.
- Agent definitions are more powerful with support for model overrides and tool restrictions.
If youâre also evaluating other options, see our comparison of Codex CLI and the broader MCP ecosystem.
FAQ
Is Antigravity CLI free to use?
Yes, thereâs a free tier with limited compute. For serious development workâmultiple projects, long coding sessionsâyouâll want Google AI Pro at $20/month. The compute budget refreshes every 5 hours, so even free-tier users can get meaningful work done in bursts.
Whatâs the difference between Antigravity CLI and Gemini CLI?
Antigravity CLI is the direct successor to Gemini CLI. Itâs rewritten in Go (faster), uses compute-based limits instead of message caps, has improved agent support, and defaults to Gemini 3.5 Flash. Gemini CLI still works but is no longer receiving feature updates. See our full Antigravity 2.0 guide for details.
Can I use models other than Gemini 3.5 Flash?
Yes. Use the --model flag to specify any available model: gemini-3.5-pro, gemini-3.5-flash, or experimental models. You can also set a default in your config file.
Is yolo mode safe?
Yolo mode skips confirmation prompts, meaning the agent can edit files and run commands without asking. Itâs safe if youâre working in a git repository (you can always revert) and you trust the operation. Donât use it for destructive operations on production systems.
How does Antigravity CLI compare to Claude Code or Codex CLI?
Each has strengths. Antigravity CLI is fastest (289 tok/s with Flash), Claude Code excels at complex reasoning, and Codex CLI integrates tightly with OpenAIâs ecosystem. See our head-to-head comparison for benchmarks.
Can I use Antigravity CLI in CI/CD pipelines?
Yes. Authenticate with a service account token via the ANTIGRAVITY_TOKEN environment variable, then call antigravity non-interactively. Itâs useful for automated code reviews, changelog generation, and test writing in CI.
Wrapping Up
Antigravity CLI with Gemini 3.5 Flash gives you the fastest agentic coding experience available today. The setup takes five minutes, the learning curve is minimal (especially if youâre coming from Gemini CLI), and the productivity gains are immediate.
Start with basic prompts, add a .antigravity.md for project context, and build custom agents as you identify repeatable patterns. Once youâre comfortable, enable yolo mode and let the agent handle the tedious parts while you focus on architecture and design decisions.
For more on the broader Antigravity ecosystem, read our complete Antigravity 2.0 guide and one-week review.