Skip to content

Antigravity CLI (agy): Install, Commands and Workflows

AINewss Editorial Team

Antigravity CLI, the agy binary, is Google's terminal-first client for Antigravity agents. This guide covers installation on macOS, Linux and Windows, first-session setup, the execution modes, every common slash command and keyboard shortcut, and where the CLI fits. Includes copyable install commands.

View 2 references
0 views 0 likes

Allow the functional cookie to save your likes. Privacy details

Terminal window showing an AI coding agent CLI with slash commands and a diff review panel

What is Antigravity CLI?

Antigravity CLI, invoked as the agy binary, is the lightweight, fast, terminal-first surface for working with Antigravity agents. It runs autonomous coding agents, executes shell commands directly and manages background subagents without leaving the keyboard. Source

The documentation lists it at v1.2+, alongside the Antigravity App at v2.5+, seven IDE extensions and the Python SDK.

How do you install agy?

On macOS, Linux and Googlebook, install the binary with the automated installer and verify it with agy --version; the default location is ~/.local/bin/agy. On Windows, use the PowerShell or CMD installer, which places the binary under the user's AppData Local agy bin folder. Source

curl -fsSL https://antigravity.google/cli/install.sh | bash
agy --version

On first launch, the CLI asks for three choices: a color scheme (Dark, Solarized Dark, Solarized Light or terminal default), a rendering mode (Alt-Screen full-screen buffer or Inline sequential output), and workspace trust, which must be confirmed before the agent begins indexing files.

How do you start your first Antigravity CLI session?

Navigate to a project directory, run agy, type a task and press Enter; the agent indexes the workspace, creates files, and asks you to approve changes unless it is in auto mode. You can then inspect diffs, review artifacts and run a verification command in the same session. Source

mkdir agy-demo && cd agy-demo
agy

A typical first prompt is "Write a simple python script to fetch web page text". The agent creates main.py; press Y to approve, or let auto mode apply workspace edits and sandboxed commands. Follow up with "Run the python script and show me the output" to verify the result.

Which commands and shortcuts matter most?

The CLI's commands cover launching sessions, switching subagents, checking usage and exiting. The most useful are the two launch modes, the diff and artifact review controls, and the shortcuts that interrupt generation or close a session without leaving the keyboard. Source

Command What it does
agy Launches the interactive TUI in the current directory
agy -i "prompt" Starts an interactive session with an initial prompt
agy -p "prompt" Runs one prompt non-interactively and prints the response
/agents Switches between active background subagents
/statusline Toggles or configures the terminal status line
/usage Shows model credit consumption and quota limits
/exit Closes the TUI and restores the original shell
Shortcut Action
Ctrl + R Opens Artifact Review for plans and diffs
Tab Inspects file diffs and tool execution details
Ctrl + C Interrupts generation
Ctrl + O Expands or collapses the tool execution pill
Ctrl + D Exits the session
Esc Closes the diff inspector or overlay

What execution modes does agy support?

Inside the prompt box, Shift + Tab cycles through auto, plan, default and accept-edits execution modes. The distinction controls whether the agent asks before editing files and running commands, which is the main safety lever in terminal-first agent work. Source

Start in default or plan mode to see what the agent intends to do. Move to auto once you trust a workflow, remembering that sandboxed commands still run on your machine.

Can you script Antigravity CLI?

Yes. agy -p "prompt" runs a single prompt non-interactively and prints the answer, which makes it usable from a shell script or CI job. The official CLI reference documents the full command catalog, keybindings and JSON schemas for teams that need machine-readable output. Source

Because there is no interactive prompt in print mode, permissions should be pre-approved with scoped rules rather than left to chance. Check the CLI reference for the current flags before wiring it into automation.

How does agy compare with the App and IDE?

Use the CLI when speed and keyboard control matter: shell commands, background subagents and quick single-shot prompts. Use the App when you are coordinating several local agents across workspaces, and the IDE when you want an editor with artifacts and a visual agent manager. Source

All four surfaces share the Antigravity harness, so moving between them is a workflow choice rather than a migration.

What are the limits of Antigravity CLI?

The CLI requires an initial interactive setup and a trusted workspace, and it is still versioned at v1.2+, so behavior may change. The getting-started page is a tutorial, not a full reference, and the 40-plus slash commands documented elsewhere are not all covered there.

The practical limit is attention: an agent that can run shell commands and edit files is powerful, and the auto mode removes confirmations. Review diffs with /diff and Artifact Review even when the agent is allowed to act on its own.

Frequently asked questions about Antigravity CLI

Antigravity CLI users usually ask about automation, safety and how it differs from Gemini CLI. These answers use the official getting-started guide and CLI reference, and note where a setting is still changing between versions. Verify flags against the reference before scripting.

Can I use Antigravity CLI in scripts?

Yes. The agy -p "prompt" form runs one prompt non-interactively and prints the response, and the CLI reference documents JSON schemas for structured output. Pre-approve the permissions a job needs, because there is no interactive prompt to confirm each action.

Is Antigravity CLI a replacement for Gemini CLI?

It is a separate terminal client for the Antigravity harness, listed at v1.2+ in the docs. Whether it replaces another CLI depends on which models, rules and workflows your team already uses, so evaluate both on a small task before migrating.

References

  1. Get started — Google Antigravity Docs (CLI tab)antigravity.google
  2. Google Antigravity — official siteantigravity.google