Guide

Google Antigravity CLI: commands, settings and permissions

Updated

Also in: Deutsch, Français, Español, Português

On this page

The Google Antigravity CLI (agy) runs Antigravity's coding agent in your terminal on macOS, Linux, Googlebook and Windows. You configure it with slash commands such as /config and /permissions or in ~/.gemini/antigravity-cli/settings.json. To allow all permissions without prompts, launch agy --dangerously-skip-permissions, set "toolPermission": "always-proceed", or add wildcard allow rules such as command(*).

Logitech MX Creative Keypad running Orbtile with a Google Antigravity conversation on the keys

Install and launch the Antigravity CLI (agy)

Install the Antigravity CLI (agy, v1.2+) with the installer for your operating system.

On macOS, Linux and Googlebook, run:

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

The installer places the binary at ~/.local/bin/agy by default.

On Windows in PowerShell, run:

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

On Windows in Command Prompt (CMD), run:

curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd

Both Windows installers place the binary at C:\Users\<username>\AppData\Local\agy\bin by default. Open a terminal and check the installation:

agy --version

The first launch asks you to set up three things:

  • Colour scheme: choose Dark, Solarized Dark, Solarized Light or your terminal default.
  • Rendering mode: choose Alt-Screen mode for a full-screen buffer or Inline mode for output in terminal history.
  • Workspace trust: confirm that you trust the repository directory before the agent begins file indexing.

Common CLI commands, startup flags and slash commands

Run agy in a project directory to start an interactive session. Flags change how it starts:

Command or flagDefaultWhat it does
agyNoneLaunches the interactive TUI in the current directory
agy -i "prompt", --prompt-interactiveNoneRuns an initial prompt interactively and continues the session
agy -p "prompt", --print, --promptNoneRuns a single prompt non-interactively in headless mode and prints the response
-c, --continuefalseContinues the most recent conversation
--conversationNoneResumes a previous conversation by ID
--mode""Sets the session execution mode: accept-edits, auto or plan
--modelNoneSelects the model for the current CLI session
--effortNoneSets the reasoning effort for the session, from low through max depending on the model
--sandboxfalseRuns in a terminal sandbox with OS containment restrictions enabled
--dangerously-skip-permissionsfalseAuto-approves all tool permission requests without prompting
--remote-controlfalseCreates a Remote Control connection for the CLI session on startup
/goal <objective>NoneRuns the task autonomously until verified complete, without intermediate pauses
/grill-me [task]NonePrompts the agent to interview you one question at a time before starting work
/plan [task]NoneExplores the codebase, clarifies requirements and drafts a reviewable Implementation Plan
/diffNoneOpens the interactive diff viewer to inspect changes, turns and commits
/exit, /quitNoneCloses the TUI session and restores your host shell

Configure the Antigravity CLI with /config and settings.json

The CLI keeps persistent preferences in ~/.gemini/antigravity-cli/settings.json, and any key you leave out uses its default.

{
  "agentMode": "accept-edits",
  "toolPermission": "strict",
  "notifications": true
}

How the settings file works:

  • Schema validation: add "$schema": "https://antigravity.google/schemas/v1/settings.json" at the top of the file for autocomplete and validation in editors such as VS Code.
  • Settings panel: run /config or its alias /settings to open the Settings Editor, change options with the arrow keys, and press Esc to close.
  • Account telemetry: Enable Telemetry in /config has no settings.json key because the CLI saves that choice with your account.

Other settings live in their own files:

  • Keyboard shortcuts: run /keybindings to open the Keyboard Shortcut Editor and customise shortcuts in ~/.gemini/antigravity-cli/keybindings.json.
  • Permissions manager: run /permissions to view, add, edit and delete action(target) rules across Project, Shared and Global scopes.
  • MCP and plugins: run /mcp to open the Model Context Protocol server manager, or /plugin to manage plugins.
  • Script hooks: run /hooks in the prompt box to browse active pre-flight and post-format script hooks.

Key settings.json options

Option keyTypeSystem defaultOptions and behaviour
agentModestring"" (default mode)Startup execution mode: "", "accept-edits", "auto" or "plan"
toolPermissionstring"request-review"Global safety preset: "request-review", "proceed-in-sandbox", "always-proceed" or "strict"
artifactReviewPolicystring"asks-for-review"Whether the agent waits for review on an artifact: "asks-for-review", "agent-decides" or "always-proceed"
enableTerminalSandboxbooleanfalseRestricts local execution commands launched by agents to OS containment rings
allowNonWorkspaceAccessbooleanfalseLets the agent read and edit files outside workspace folders, subject to your mode and permission rules
notificationsbooleanfalseRings the terminal bell and shows a desktop notification for approvals, answers or finished turns
altScreenModestring"default"Screen buffer usage: "default", "always" or "never" ("never" is available only in settings.json)
editorModestring"default"Prompt editing model: "default" for flat text editing or "vim" for modal editing
permissionsobjectNoneHolds allow, ask and deny rule lists for the agent's tools

Execution modes and tool permissions

Two settings decide how often the agent stops to ask you: the execution mode and toolPermission. Deny rules still block an action in every mode.

Set the mode with agentMode in settings.json, for one session with --mode, or cycle modes with Shift + Tab:

  • default (leave agentMode unset): asks you to review diffs before files change.
  • accept-edits: approves workspace file edits and creations automatically.
  • auto: approves workspace edits, runs commands in the terminal sandbox by default, and runs safe, reversible commands without prompting.
  • auto requirements: requires CLI v1.3.5+ on macOS and Linux or v1.4.4+ on Windows, the terminal sandbox, and a personal account.
  • plan: adds /plan so the agent analyses the codebase and outlines a plan before editing.

toolPermission sets when the agent asks before running a tool:

  • request-review (default): asks before running write, bash, web or MCP tools.
  • proceed-in-sandbox: runs terminal commands without asking when Sandbox Mode is on and the command runs inside the terminal sandbox.
  • strict: asks before every tool action, including file reads, even if an allow rule matches, and takes precedence over auto mode.
  • always-proceed: runs commands, web requests and MCP tools without prompting unless an ask or deny rule matches, overriding auto mode.

How to allow all permissions and commands in agy

There are several ways to skip manual confirmation:

  • Skip all permission prompts for one session: launch agy --dangerously-skip-permissions to auto-approve all tool permission requests.
  • Set always-proceed: set "toolPermission": "always-proceed" in settings.json, so commands, web requests and MCP tools run unless an ask or deny rule matches.
  • Also skip edit and artifact reviews: add "agentMode": "accept-edits" and "artifactReviewPolicy": "always-proceed" to settings.json:
{
  "agentMode": "accept-edits",
  "toolPermission": "always-proceed",
  "artifactReviewPolicy": "always-proceed"
}
  • Allow all commands with a wildcard rule: add command(*) to the allow list in settings.json or with /permissions, and keep it out of ask and deny.
  • Use auto mode: launch agy --mode=auto or set "agentMode": "auto", so workspace edits and safe, reversible commands run without prompting.
  • Use Turbo in the Antigravity App: in the desktop app, choose Turbo under Settings > General > Global Permissions > Permission Preset to disable the sandbox and allow all actions.

Permission rules: allow, ask and deny

Rules use the form action(target) in allow, ask and deny lists under permissions in settings.json. These lists live in your global settings file. Conflicts follow a strict order: Deny, then Ask, then Allow. So with command(*) in ask and command(git) in allow, every command still prompts.

ActionExample targetsDefault
read_fileread_file(/path) or read_file(*)Ask, but workspace files are allowed
write_filewrite_file(/path) or write_file(*)Ask, but workspace files are allowed
read_urlread_url(domain) or read_url(*)Ask
execute_urlexecute_url(domain) or execute_url(*)Ask
commandcommand(prefix) or command(regex:pattern)Ask
unsandboxedunsandboxed(prefix) or unsandboxed(*)Ask (business and enterprise accounts only)
mcpmcp(server/tool) or mcp(server/*)Ask

How rules match:

  • Global wildcards: * matches every target for an action, such as read_file(*), command(*) or mcp(*).
  • Command prefixes and regex: command rules match word-by-word prefixes literally by default, or match regular expressions when the target starts with regex:.
  • Implied rules: allowing write_file on a path also allows read_file there, and denying read_file on a path also blocks write_file.
  • Windows paths: drive letters such as C: are removed and backslashes become forward slashes before rules are checked.
  • Windows command matching: in PowerShell or Command Prompt, commands that cannot be split cleanly into words need an exact match or a regex: rule, such as command(regex:git .*).
  • Editing at the prompt: before confirming Allow on a file, URL or MCP prompt card, you can edit the target string to widen its scope for the turn.
{
  "permissions": {
    "allow": [
      "command(git)",
      "command(regex:npm run (build|lint|test))",
      "read_file(/var/log/app)",
      "write_file(src/)",
      "read_url(google.com)",
      "mcp(linter/*)"
    ],
    "deny": [
      "command(rm -rf)",
      "command(regex:curl .*)",
      "command(sudo)",
      "write_file(.git/)",
      "write_file(/home/user/.ssh)"
    ],
    "ask": ["command(*)", "execute_url(aws.amazon.com)", "mcp(sql/execute_mutation)"]
  }
}

Manage rules interactively with /permissions

Type /permissions in the prompt box and press Enter to open the Permissions Manager panel:

  • Scope picker: use the arrow keys or J and K to choose Project, Shared or Global, then press Enter.
  • Rule viewer: switch between the allowlist, denylist and asklist tabs with the left and right arrow keys or Tab.
  • Add a rule: press A, type a rule in action(target) format such as command(git), and press Enter to validate and save it.
  • Edit or delete a rule: highlight a rule and press E or Ctrl + G to edit it, or press D or Backspace to delete it.

Notifications, tool confirmations and keybindings

The notifications setting is off by default. Turn it on and the CLI rings the terminal bell and shows a desktop notification when the agent needs approval or an answer, or finishes its turn.

In default mode, the CLI pauses before it changes files or runs commands. These keys answer its prompts:

Key or shortcutTUI commandWhat it does
y / nconfirm.yes / confirm.noAuthorises (y) or rejects (n) the proposed tool, command or active artifact
1 / 2Not listedAccepts (1) or rejects (2) a pending file edit or new file creation in default mode
fNot listedOpens a full-screen, scrollable diff review with three context lines
Ctrl+R, then Aview.review_artifactOpens the Artifact Review panel (Ctrl+R), where A approves all generated artifacts in one action
Shift+Tabcli.cycle_modeCycles execution modes and auto-approves pending workspace edits when switching to accept-edits or auto

For managing background subagents with /agents, jumping to and approving waiting subagents with Alt+J and Ctrl+K, and running multi-agent teams with /teamwork, see Google Antigravity multi-agent: run parallel coding agents.

If you also use the standalone editor, see Google Antigravity IDE: editor, agents and permissions for how it shares global hooks and sets up Strict mode, terminal sandboxing and artifact reviews.

To connect databases, documentation and external APIs with /mcp or mcp_config.json, see Google Antigravity MCP servers: set up and manage tools.

To install the CLI in PowerShell or Command Prompt, set your Windows PATH and enable the AppContainer sandbox, see Google Antigravity on Windows: install, CLI and setup.

Watch Antigravity sessions on a keypad or phone with Orbtile

Orbtile shows your coding agents on a Logitech MX Creative Keypad, or on an iPhone (iOS 17+) or Android phone (Android 8.0+) running Orbtile Mobile. It runs on a computer with macOS 14.0 Sonoma or later on Apple silicon, or Windows 11 (x64).

  • Antigravity desktop app: Orbtile follows conversations in the Antigravity desktop app and gives each one a key with its title, state and live reply text.
  • Waiting questions first: a conversation waiting on a question moves to the front and, from Orbtile 0.3.4, uses the shared terracotta alarm colour.
  • Answer on the keys: you can answer up to four numbered-option questions, with two to four choices each, from the keypad.
  • Kept on your computer: permission prompts and written answers stay on your computer.
  • Antigravity CLI and IDE: CLI and IDE sessions do not appear automatically, but a CLI hook script can report each session to Orbtile's local Adapter API.
  • Enable the Adapter API: in Orbtile, open Settings > Agents, choose Build your own, turn on Let your own tools show sessions, and allow your adapter.
  • Every agent on one pad: the same keypad or phone also shows Claude Code, Codex, ZCode and Kimi Code sessions, plus remote sessions over SSH.

See Know when Google Antigravity is waiting for you and Show any script or agent on a keypad with the Orbtile Adapter API.

FAQ

How do I allow all permissions or commands in the Antigravity CLI?

Launch agy with the --dangerously-skip-permissions flag to auto-approve all tool permission requests for a session. Or set toolPermission to always-proceed in settings.json. You can also add a wildcard command rule to your allow list with /permissions, if no ask or deny rule matches.

How does the Antigravity CLI handle conflicting permission rules?

Rules use the action(target) format in deny, ask and allow lists. When rules conflict, Deny wins over Ask, and Ask wins over Allow.

How do I turn on notifications in the Antigravity CLI?

Open /config and turn on Notifications, or set notifications to true in settings.json. The CLI then rings the terminal bell and shows a desktop notification when the agent needs approval or an answer, or finishes its turn.

Does Orbtile show Google Antigravity CLI sessions?

Not automatically. Orbtile follows the Antigravity desktop app, and CLI and IDE sessions don't appear. A hook script can send CLI session updates to Orbtile's local Adapter API, so each session shows on a Logitech MX Creative Keypad, an iPhone or an Android phone.