iToverDose/Software· 21 MAY 2026 · 20:08

How to Install and Use Google's Antigravity CLI in 2025

Google’s new Antigravity CLI brings terminal-based AI coding to developers with fast, multi-file editing and sub-agent support. Here’s how to set it up and use it effectively in your workflow.

DEV Community5 min read0 Comments

Google recently launched Antigravity CLI, a terminal-based AI coding agent designed to replace the older Gemini CLI. Built in Go, this tool offers faster performance and deeper integration with your development environment. Unlike traditional chat interfaces, Antigravity CLI can edit multiple files, spawn subagents for parallel tasks, and even call external tools—all while maintaining persistent session history.

Why Antigravity CLI Stands Out in the AI Coding Space

Antigravity CLI is more than just a command-line interface—it’s a full-fledged agent that operates within your terminal. Unlike its predecessor, Gemini CLI, which relied on Node.js, Antigravity CLI is written in Go, resulting in quicker startup times and lower memory usage. This makes it ideal for developers who work in resource-constrained environments or need to switch between coding tasks frequently.

Key features include:

  • Shared engine with Antigravity 2.0: The desktop application and CLI use the same underlying technology, ensuring seamless updates and feature parity.
  • Async subagents: Long-running tasks like refactoring or research can run in the background without blocking your workflow.
  • Extensible architecture: Supports Agent Skills, Hooks, Subagents, MCP servers, and Plugins—formerly known as Extensions in the older CLI.
  • Cross-platform sync: Preferences, permissions, and active sessions can be synchronized between the terminal and the desktop app.
  • SSH-friendly authentication: For remote sessions, the tool generates an auth URL and one-time code, allowing you to complete sign-in from a local browser.

Google has positioned Antigravity CLI as a replacement for Gemini CLI, which will officially sunset for individual Google AI Pro and Ultra users on June 18, 2026. Whether you’re a solo developer or part of a larger team, this tool aims to streamline coding workflows by integrating AI directly into your terminal.

Setting Up Antigravity CLI: A Step-by-Step Guide

Before installing Antigravity CLI, ensure your system meets the basic requirements. The tool supports macOS, Linux, and Windows (via PowerShell) and requires either curl or PowerShell 5+ for installation.

Step 1: Install the CLI

The installation process is straightforward and requires only a single command. Copy the appropriate command for your operating system and run it in your terminal:

# macOS / Linux
curl -fsSL  | bash

# Windows (PowerShell)
irm  | iex

The installer automatically detects your environment and places the binary—named agy—in the correct directory. On Unix-based systems, it installs to ~/.local/bin/, while Windows users will find it in %LOCALAPPDATA%\Antigravity\. If the directory isn’t already in your PATH, the installer will prompt you to add it to your shell profile.

After installation, restart your terminal and verify the setup by running:

agy --version

A version number should appear in the output. If the command isn’t recognized, double-check that the installation directory is included in your PATH.

Step 2: Authenticate with Your Google Account

The first time you run agy, it initiates Google’s OAuth sign-in flow. If you’re on a local machine, the process automatically opens your browser for authentication. Credentials are securely stored in your system’s keyring—Keychain on macOS, Credential Manager on Windows, or libsecret on Linux.

For remote or headless environments, Antigravity CLI adapts to the lack of a browser by printing an authorization URL and a one-time code. Simply open the URL on a local device, paste the code, and the CLI completes the authentication process. This eliminates the need to manually configure API keys for server environments.

If you prefer using an API key—such as for CI/CD pipelines—you can set it manually before running any commands:

export ANTIGRAVITY_API_KEY=your_api_key_here

To make this permanent, add the export line to your shell configuration file (e.g., ~/.bashrc, ~/.zshrc), then reload it:

source ~/.zshrc

Exploring Antigravity CLI’s Operating Modes

Antigravity CLI offers three distinct ways to interact with it, each tailored to different use cases.

1. Interactive Agent Mode: A Full Terminal Experience

Running agy without arguments launches the interactive agent mode. This mode provides a Terminal User Interface (TUI) with a conversation pane, a command prompt, and a status bar displaying active model, token usage, and running subagents.

Once inside the TUI, you can issue natural language prompts. Some useful starter commands include:

  • Explain this repo
  • What does @src/main.go do and where is it called from?

The @ syntax allows you to reference files or directories directly. For example, @src/ pulls all files in the src directory into context, while @**/*.ts selects all TypeScript files recursively. You can also switch models mid-session using the /model slash command. Supported models include:

  • gemini-3.5-flash
  • gemini-3.1-pro
  • claude-sonnet
  • claude-opus
  • gpt-oss-120b

Additional slash commands in the TUI include:

  • /help: Displays a list of all available commands and keyboard shortcuts.
  • /context: Shows token usage breakdown and allows checkpoint management.
  • /usage: Provides quota and rate-limit status across all linked models.
  • /export: Saves the current session to Antigravity 2.0 for continued work in the desktop app.

2. Command Mode: Quick Inline Assistance

Command mode is ideal for one-off tasks or quick terminal commands. You can trigger it from within the TUI using Cmd + I on macOS or Ctrl + I on Windows/Linux. This mode allows you to get immediate AI-generated code snippets or terminal commands without exiting your current workflow.

While details on command mode are still evolving, its purpose is clear: to provide instant, context-aware assistance directly in the terminal. Whether you need a quick code fix or a terminal command suggestion, this mode ensures minimal disruption to your coding flow.

Building Your First Projects with Antigravity CLI

Antigravity CLI shines when applied to real-world development tasks. Unlike simple chatbots, it can reason across your entire project, edit multiple files simultaneously, and even delegate sub-tasks to specialized agents. This makes it particularly useful for refactoring, debugging, and prototyping.

To get started, try prompting the agent with a natural language request like:

Refactor the authentication middleware in my Express app to use JWT tokens instead of sessions.

The agent will analyze your codebase, identify relevant files, and propose changes. You can review and apply these suggestions directly within the terminal or export the session to the desktop app for further refinement.

Another practical use case is dependency management. Ask the agent to:

Update all outdated packages in my Python project and explain the breaking changes.

Antigravity CLI can scan your project, identify outdated dependencies, and suggest updates—complete with explanations for major version changes.

The Future of Terminal-Based AI Coding

Antigravity CLI represents a significant step forward in integrating AI into the developer workflow. By combining a lightweight terminal interface with powerful multi-file editing and sub-agent capabilities, it bridges the gap between conversational AI and practical coding assistance.

As AI models continue to improve and terminal-based tools gain adoption, Antigravity CLI could become a standard part of many developers’ toolkits. Its seamless integration with existing workflows, cross-platform support, and extensible architecture position it well to evolve alongside the needs of the developer community. For teams and solo developers alike, mastering Antigravity CLI today could mean a smoother, more efficient coding experience tomorrow.

AI summary

Learn how to install Google’s Antigravity CLI and use it for multi-file editing, subagents, and terminal-based AI coding in 2025.

Comments

00
LEAVE A COMMENT
ID #6PZN8Q

0 / 1200 CHARACTERS

Human check

3 + 7 = ?

Will appear after editor review

Moderation · Spam protection active

No approved comments yet. Be first.