Skip to content

Antigravity CLI (agy): Getting Started

Beginner 15 min

Antigravity CLI (the command is agy) is Google’s new AI agent for the terminal and the official successor to Gemini CLI. It can read your project, edit multiple files at once, run commands, and remember your conversations — straight from the terminal.

agy shares its agent engine with Antigravity 2.0 (Google’s desktop app for AI development) but runs as a lightweight terminal app optimized for keyboard-driven work and SSH sessions.

TopicGemini CLIAntigravity CLI (agy)
TechnologyNode.js-based (requires Node 20+)A single self-contained Go binary — no Node.js
StartupSecondsMilliseconds, low RAM usage
StatusFree access shuts down June 18, 2026Google’s actively developed CLI
Agent engineIts ownShared with the Antigravity 2.0 desktop app
ConversationsSessionsPersistent history, exportable to the desktop app
  • macOS, Linux, or Windows
  • A Google account
  • Git (recommended — always start inside a Git repo)
  • No Node.js required — agy is a single binary
Terminal window
curl -fsSL https://antigravity.google/cli/install.sh | bash

The installer places the agy binary in ~/.local/bin/ and updates your PATH.

Verify the installation:

Terminal window
agy --version

Later updates are handled by the CLI itself:

Terminal window
agy update

If your shell cannot find agy after installation, repair the PATH setup:

Terminal window
agy install

Start agy in a project folder:

Terminal window
cd your-project
agy

Sign-in uses your Google account:

  • Locally: agy automatically opens your browser for Google Sign-In.
  • Over SSH: agy detects the SSH session and prints a login URL you open on your own machine.
  • Sign out: run /logout inside the CLI.

The access token is stored securely in your system keyring, so you don’t need to sign in every time.

  1. Enter a Git repo:

    Terminal window
    cd your-project
    git status
  2. Start agy:

    Terminal window
    agy
  3. Give it a read-only task first:

    Read this project and explain its structure.
    Don't make any changes and don't run any commands yet.
  4. agy asks for permission before editing files or running commands. Read what it wants to do before approving.

Speed and lightness

A single Go binary that starts in milliseconds. No Node.js, no npm dependencies, low RAM usage.

SSH and remote work

Designed for keyboard-first work over SSH — including a login flow that works on headless servers.

The Google ecosystem

Gemini models, Google sign-in, and a shared engine with Antigravity 2.0. Sessions can be exported to the desktop app.

MCP and plugins

Supports MCP servers (same format as Claude Code and Gemini CLI) and has a plugin system.

Verified with agy --help (version 1.0.3):

Flag/commandUse
agyStart an interactive session
agy -p "..."Run a single prompt non-interactively and print the answer (headless/script use)
agy -cContinue the most recent conversation
agy --conversation <id>Resume a specific conversation
agy -i "..."Start interactively with an initial prompt
agy --add-dir <path>Add an extra directory to the workspace (repeatable)
agy --sandboxRun in a sandbox with terminal restrictions
agy updateUpdate the CLI
agy changelogShow changes in recent versions
agy plugin listList installed plugins

Useful slash commands inside the CLI:

CommandUse
/creditsSee quota/credit status and purchase G1 credits
/diffReview changes the agent has made
/changelogShow version history
/statuslineCustomize the status line
/logoutSign out and clear saved credentials
/helpSee all commands and shortcuts

agy stores its configuration in ~/.gemini/antigravity-cli/:

~/.gemini/antigravity-cli/
├── settings.json # Model, color scheme, trusted workspaces, telemetry
├── mcp_config.json # MCP servers
├── conversations/ # Saved conversations
├── knowledge/ # The agent's knowledge about your projects
├── plugins/ # Installed plugins
└── keybindings.json # Keyboard shortcuts

Example settings.json:

{
"colorScheme": "dark",
"enableTelemetry": false,
"model": "Gemini 3.5 Flash (High)",
"trustedWorkspaces": [
"/home/you/projects"
]
}

agy uses the same MCP format as Claude Code and Gemini CLI. Add servers in ~/.gemini/antigravity-cli/mcp_config.json:

{
"mcpServers": {
"home-assistant": {
"command": "node",
"args": ["/path/to/ha-mcp/index.js"],
"env": {
"HA_URL": "http://homeassistant.local:8123"
}
}
}
}

This means you can give agy access to your Home Assistant, your own databases, or other tools via MCP.

agy has three access levels:

LevelWhat happens
Defaultagy asks for permission before file changes and commands
--sandboxCommands run in a sandbox with terminal restrictions; “proceed-in-sandbox” auto-approves only commands inside the sandbox
--dangerously-skip-permissionsEverything is auto-approved — only use in isolated environments

Good practice:

  1. Always start in a Git repo so changes can be rolled back
  2. Use the default level until you know the agent’s behavior
  3. Use --sandbox when analyzing code you don’t trust
  4. Never put API keys or passwords in prompts

Comments