Advertise hereReach developers building with AI coding agents. →

Based on Google’s official docs, checked

Antigravity CLI (agy): install, sign in, modes and commands

Antigravity CLI is Google Antigravity in your terminal, started with the agy command. It shares sign-in with the Antigravity app and IDE extensions, and adds execution modes, headless runs and a long list of slash commands. This guide covers a fresh setup, from install to your first scripted run, following Google’s official docs as checked on October 29, 2026. If you are coming from Gemini CLI, read the migration guide after this one.

  1. 1. Install agy on macOS or Linux

    Run the official installer. It puts the binary at ~/.local/bin/agy.

    curl -fsSL https://antigravity.google/cli/install.sh | bash
  2. 2. Install agy on Windows

    In PowerShell, run the official script. The default binary folder is C:\Users\<username>\AppData\Local\agy\bin. From CMD, use: curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd

    irm https://antigravity.google/cli/install.ps1 | iex
  3. 3. Check the install

    Open a new terminal and print the version. If you get agy: command not found, the binary folder is not on your PATH (see the troubleshooting section below).

    agy --version
  4. 4. Start a session and sign in

    Run agy inside a project folder. On first launch you pick a color scheme, a rendering mode (Alt-Screen or Inline) and confirm you trust the folder. If no saved session is found in your OS keyring, agy opens your browser to sign in with a Google account or a business account. Over SSH it prints a URL instead, and you paste back the code the browser shows.

    cd my-project
    agy
  5. 5. Pick an execution mode

    Press Shift+Tab to cycle default, accept-edits, auto and plan, or set one at launch. default asks before every file edit and command. accept-edits applies workspace edits but still asks before commands. auto (Preview) also runs safe commands in the terminal sandbox. plan outlines steps before writing code.

    agy --mode=accept-edits
  6. 6. Run a prompt headless

    Use -p (alias --print or --prompt) to run once and exit. The answer goes to stdout and diagnostics to stderr, so you can capture it in scripts. Add --output-format json for a JSON envelope. Sign in once interactively first, because an unauthenticated run in CI exits with an authentication required error.

    agy -p "Summarize the open TODOs in this repo" --output-format json

Flags worth knowing

--mode sets accept-edits, auto or plan for the session. --model and --effort pick the model and reasoning effort.

-c or --continue resumes the latest conversation, and --conversation <id> resumes a specific one.

-i runs a first prompt and keeps the session open. -p runs headless; --output-format takes text, json or stream-json, and --json-schema enforces structured output.

--sandbox turns on the terminal sandbox. --dangerously-skip-permissions auto-approves every tool request, which is what people mean by yolo mode. Use it only in a throwaway environment.

Slash commands you will use first

/config (alias /settings) opens settings, saved to ~/.gemini/antigravity-cli/settings.json.

/permissions manages allow, ask and deny rules. These rules win over every execution mode.

/mcp opens the MCP server manager, /skills lists loaded skills and /plugin manages plugins.

/resume, /fork and /rewind manage conversations. /usage shows model quota and /credits shows remaining credits.

Type ? or /help for the full list. Start a prompt with ! to run a shell command directly, and use @ to complete file paths.

Use a Gemini API key instead of a Google sign-in

For CI or machines without a browser, set modelProvider to gemini in settings.json and export GEMINI_API_KEY. Setting the environment variable alone has no effect.

{
  "modelProvider": "gemini"
}

Fix agy: command not found

The installer writes to ~/.local/bin on macOS and Linux. Add it to your PATH in ~/.bashrc or ~/.zshrc, then reload the file or open a new terminal. On Windows, add the agy bin folder to your user Path and restart the terminal.

export PATH="$HOME/.local/bin:$PATH"

Tips

Next steps

Verified MCP servers for Antigravity

→

Generate an MCP config for Antigravity

→

Google Antigravity hub

→

Google Antigravity vs Claude Code: documented features compared

→

How to add an MCP server to Codex

→

How to add an MCP server to Cursor

→

How to add an MCP server to GitHub Copilot in VS Code

→

How to add an MCP server to Google Antigravity

→

How to migrate from Gemini CLI to Antigravity CLI

→

Portable agent skills: one SKILL.md for every coding agent

→

Safe “always allow” rules for Claude Code and Codex CLI

→

GitHub Copilot CLI yolo mode: --allow-all and safer tool rules

→

Codex sandbox modes and approval policies explained

→

How to install Claude Code on macOS, Linux and Windows

→

How to install the OpenAI Codex CLI

→

Claude Code auto mode: what runs, what gets blocked, how to turn it off

→

Agent Skills moves to the Agentic AI Foundation: what changes

→

MCP security: the risks in MCP servers and how to lock them down

→

Claude Code in VS Code: install, shortcuts and CLI differences

→

What is AGENTS.md? The open instruction file for coding agents

→

Claude Code on Windows: native, WSL and common errors

→

Codex skills: create, install and use SKILL.md skills in Codex

→

GitHub Copilot CLI: install, sign in and start using it

→

Cursor Agent SDK: build, test and deploy agents as code

→

GPT-6.1 Terra in Codex and the API: setup, pricing and limits

→

MCP OAuth: connect a remote MCP server in Claude Code, Codex and Cursor

→

Codex config.toml: location, precedence and the settings to change

→

Codex on Windows: native sandbox setup, WSL and fixes

→

Google Antigravity on Windows: install, WSL, sandbox and fixes

→

GitHub Copilot coding agent (now cloud agent): how to use it

→

GitHub Copilot agent mode: how to use it in your IDE

→

Frequently asked questions

On macOS or Linux run curl -fsSL https://antigravity.google/cli/install.sh | bash. On Windows PowerShell run irm https://antigravity.google/cli/install.ps1 | iex. Then check it with agy --version.

Sources