đŸ€– AI Tools
· 8 min read

How to Use Gemini 3.5 Flash with Antigravity CLI: Setup Guide


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:

  1. A Google account — any personal or Workspace account works.
  2. 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.
  3. Operating system — macOS (Apple Silicon or Intel), Linux (x86_64 or arm64), or Windows 10/11.
  4. 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 CLIAntigravity CLI
gemini commandantigravity command
GEMINI.md context file.antigravity.md context file
Subagents in .gemini/agents/Agents in .antigravity/agents/
Node.js runtimeGo binary (faster startup)
Message-based limitsCompute-based limits (5h refresh)
--sandbox flagSandbox is default

Migration steps

  1. Install Antigravity CLI using the instructions above.
  2. Rename context files: GEMINI.md → .antigravity.md (content format is compatible).
  3. Move agents: Copy .gemini/agents/*.yaml to .antigravity/agents/. The YAML schema is nearly identical—just remove any deprecated tools field.
  4. Update scripts: Replace gemini with antigravity in any shell scripts or CI pipelines.
  5. 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.