Antigravity CLI Cheatsheet: Commands, Setup, Shortcuts, and Workflows

Find Antigravity CLI commands, default shortcuts, settings paths, permission presets, sandbox notes, and Gemini CLI migration steps in one place.

Antigravity CLI is the terminal interface for Google Antigravity. It lets you run coding agents, review changes, and manage parallel work from a local shell, SSH session, or headless environment.

It uses the same agent harness as Antigravity 2.0, with terminal controls for code search, execution modes, permissions, subagents, tasks, skills, and MCP servers.

Learn More About Antigravity CLI

This cheat sheet is for moments when you already know what you want to do and need the exact command.

Start with the quick reference table, then use the sections below for setup, slash commands, shortcuts, permissions, sandbox settings, subagents, MCP, and Gemini CLI migration.

Updated for Antigravity CLI 1.1.5 on July 20, 2026

Antigravity CLI Cheatsheet

Antigravity CLI quick reference

TaskCommand
Start CLIagy
Command menu/
Search code/codesearch, /cs, /search
Help?, /usage
Settings/config, /settings
Permissions/permissions
Model/model, --model <slug>
Reasoning effort/effort, /effort <level>, --effort <level>
Plan mode/plan
Cycle execution modeShift+Tab
File diff/diff
Resume session/resume
Rewind session/rewind, /undo
Fork session/fork, /branch
Add folder/add-dir <path>
Open file/open <path>
Run shell command!<command>
Print modeagy -p "<prompt>"
Custom agentagy --agent <name>
Subagents/agents
Task logs/tasks
Skills/skills
MCP servers/mcp
Hooks/hooks
Log out/logout
Exit/exit

What changed in Antigravity CLI 1.1.5

ChangeWhat it means
/effortView or change reasoning effort without restarting the CLI.
--effort <level>Choose a reasoning-effort variant when launching.
Model slugsUse the stable model names shown in /model with --model.
Custom-agent modelAdd model to agent frontmatter to select a subagent tier; omit it to inherit the parent model.
Command chainsCombine leading slash commands such as /plan /grill-me in one prompt.
/diffScrolling remains stable when lines wrap or comments expand.

Install Antigravity CLI

Antigravity CLI installs the agy binary. It runs on macOS, Linux, and Windows.

macOS and Linux

The native installer downloads the executable to ~/.local/bin/agy.

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

Windows PowerShell

The Windows installer registers agy in the local user directory at C:\Users\<Username>\AppData\Local\agy\bin.

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

Windows CMD

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

Install flags

FlagUse
--skip-aliasesKeep existing agy or antigravity aliases.
--skip-pathDo not edit shell profile PATH.

Launch flags and headless mode

Command or flagUse
agy -p "<prompt>"Run once and print the result.
--model <slug>Select a model with a stable model slug.
--effort <level>Select the model’s reasoning-effort variant at launch.
--mode <mode>Start in default, accept-edits, or plan mode.
--agent <name>Start with a custom agent.
agy agent, agy agentsList available custom agents.
--project <project>Open an existing project.
--new-project <name>Create a project.
--sandboxEnable terminal sandboxing for the session.
AGY_CLI_CMD_OUTPUT_PERCENTAGELimit terminal output shown in the TUI.

Print mode is designed for scripts and CI jobs. If a tool needs approval, Antigravity CLI denies it unless a matching allow rule exists and prints guidance to stderr. Invalid model names and other print-mode failures return a nonzero exit code instead of waiting for interactive input.

Authentication and SSH login

When you run agy locally, the CLI checks your operating system keyring first. On macOS it uses Apple Keychain. On Linux it uses Secret Service or dbus. On Windows it uses Windows Credential Manager. If a valid token exists, Antigravity CLI signs in silently.

If no saved session exists, the CLI opens your default browser. Sign in with your approved account, then return to the terminal.

SSH login uses a manual browser loop:

  1. Run agy in the remote terminal.
  2. Copy the authorization URL printed by the CLI.
  3. Open the URL in a local browser.
  4. Sign in and copy the authorization code.
  5. Paste the code back into the remote terminal.

Use /logout when you need to disconnect the current account and purge saved authentication profiles.

On Linux servers and containers without D-Bus, the CLI falls back cleanly when no Secret Service keyring is available. OAuth codes can also be pasted in print mode when a terminal is attached; a fully headless process fails instead of blocking on a hidden prompt.

Core slash commands

Slash commands are the fastest way to control Antigravity CLI. Type / in the prompt box to open the command menu.

Workspace and files

CommandPurpose
/codesearch (/cs, /search)Search workspace code interactively.
/add-dir <path>Add a directory to the workspace.
/diffShow diffs for modified files.
/open <path>Open a path in the default editor.
/clearClear the terminal and conversation context.

/codesearch treats the query as a regular expression by default. Use -F or --literal for an exact string. Add f: or file: globs to include or exclude paths.

Conversation control

CommandPurpose
/resume (/switch, /conversation)Load previous threads.
/rewind (/undo)Roll back conversation history.
/fork (/branch)Create a parallel session.
/rename <name>Rename the thread.
/exitClose the CLI.

Settings and agent behavior

CommandPurpose
/config or /settingsOpen the settings editor.
/permissionsSwitch permission presets.
/modelChoose a model and its available reasoning effort.
/effort or /effort <level>View or set reasoning effort for the current model.
/planEnter plan mode.
/keybindingsEdit keyboard shortcuts.
/statuslineCustomize the status bar.
/title [on/off]Control terminal title updates.

Tools, subagents, and accounts

CommandPurpose
/agentsOpen the Agent Manager Panel for background subagents.
/tasksOpen the Task Manager Panel for background shell logs.
/skillsBrowse loaded local and global Agent Skills.
/mcpOpen the MCP server manager.
/hooksBrowse active pre-flight and post-format hooks.
/btw <query>Ask a side question in the background without interrupting the main conversation.
/usageOpen the offline developer help manual.
/logoutDisconnect the account and remove saved tokens.

Keyboard shortcuts

Keybindings can change if you customize them. Use /keybindings to inspect or edit your current setup.

ShortcutAction
EnterSubmit the prompt or selection.
Shift+Enter, Ctrl+J, Alt+EnterInsert a newline.
Shift+TabCycle default, accept-edits, and plan modes.
EscClose a panel or stop a stream.
Ctrl+CCancel active work; press twice to exit.
Ctrl+DForward-delete text; exit on an empty prompt.
Ctrl+LClear the terminal buffer.
Ctrl+VPaste clipboard content.
Alt+VAlternative paste on Windows.
Ctrl+GOpen the prompt, diff, or confirmation in $EDITOR.
Ctrl+OToggle detailed tool output.
Ctrl+ROpen artifact review.
fOpen the full diff from file review.
/ in artifact detailsSearch the current artifact.
n, N during searchMove to the next or previous match.
Shift+N in diff viewMove to the previous diff.
Alt+JFocus the next subagent awaiting approval.
Ctrl+KApprove a pending subagent action.
Ctrl+A, Ctrl+EMove to the start or end of the line.
Ctrl+Z, Ctrl+Shift+ZUndo or redo text edits.
PgUp, PgDnScroll the active viewport.
TabAccept slash-command completion.
y, n at confirmationApprove or reject a proposal.
AApprove all artifacts in review.

Execution modes

Choose a mode under Agent Mode in /settings, pass it with --mode, or press Shift+Tab to cycle through the three options.

ModeBehavior
defaultReview file writes before they run.
accept-editsAccept file edits automatically.
planPlan without applying edits.

Settings, permissions, and sandbox

Antigravity CLI stores its main settings in:

~/.gemini/antigravity-cli/settings.json

It stores custom keybindings in:

~/.gemini/antigravity-cli/keybindings.json

You can edit settings through /config or /settings. Some settings can also be overridden at launch with flags such as --sandbox or --dangerously-skip-permissions. A launch flag applies to the current session until restart, even if you edit the persistent setting on disk.

Settings worth knowing

SettingDefault and use
colorScheme"terminal"; color theme.
altScreenMode"default"; screen buffer.
toolPermission"request-review"; tool approvals.
artifactReviewPolicy"asks-for-review"; code review flow.
notificationsfalse; completion alerts.
showTipstrue; prompt tips.
showFeedbackSurveytrue; feedback prompts.
editor"auto"; external editor.
allowNonWorkspaceAccessfalse; outside-root file access.
enableTerminalSandboxfalse; command sandboxing.
enableTelemetrytrue; metrics and crash logs.
verbosity"high"; output detail.
runningLightSpeed"medium"; progress animation.

Permission presets

PresetUse
request-reviewDefault for most coding work.
proceed-in-sandboxAuto-proceed inside sandbox.
always-proceedNo prompts; controlled workspaces only.
strictPrompt for all non-read tools.

Use permission.allow for file writes and commands that should run without another prompt. Command rules use strict matching by default. Prefix a rule with regex: only when you intend to use a regular expression.

Terminal sandbox

Set enableTerminalSandbox to true if you want local agent commands to run inside OS containment boundaries.

{
  "enableTerminalSandbox": true
}

When sandbox mode is enabled, Antigravity CLI can still ask whether a trusted command should run without sandbox restrictions. When sandbox mode is disabled, a confirmation prompt can offer to run a specific risky command inside the sandbox.

For regular project work, start with request-review, keep allowNonWorkspaceAccess set to false, and inspect /diff before accepting code changes.

Subagents, tasks, skills, plugins, and MCP

Antigravity CLI can run background subagents, and those subagents can delegate work to nested subagents. The primary conversation stays active while delegated tasks run.

Use /agents to open the Agent Manager Panel. It shows active and completed subagents, their status, and the step each subagent is running. Select a subagent to inspect its full conversation, tool logs, and pending approvals.

Use /tasks when you need shell execution logs. Use /skills to browse loaded Agent Skills. Use /mcp to manage Model Context Protocol servers. Use /hooks to inspect active pre-flight and post-format hooks.

Use --agent <name> to select a custom agent at launch. The agent and agents subcommands list available agents. Add model to custom-agent frontmatter when a subagent should use a selected model tier; otherwise it inherits the parent model. Global agent configuration lives under ~/.gemini/config/.

Plugins are staged under:

~/.gemini/antigravity-cli/plugins/<plugin_name>/

A plugin can include a required plugin.json file plus optional mcp_config.json, hooks.json, skills/, agents/, and rules/ directories.

Gemini CLI migration

Antigravity CLI supports migration from Gemini CLI. On first launch, agy can detect legacy Gemini CLI profiles and prompt you to choose which assets to migrate.

The migration flow can import extensions, global configuration, active session tokens, visual settings, workspace rules, skills, and MCP server definitions. Some customized terminal themes or experimental visual overlays may not have full parity.

Convert Gemini extensions to Antigravity plugins

Run:

agy plugin import gemini

The importer searches legacy local directories, reads extension manifests, and converts compatible files into Antigravity plugin layout blocks.

Context files

Antigravity CLI continues to read workspace context from:

GEMINI.md
AGENTS.md

It also consults global developer context at:

~/.gemini/GEMINI.md

Skills path changes

ScopePath change
Global skills~/.gemini/skills/ to ~/.gemini/antigravity-cli/skills/
Workspace skills.gemini/skills/ to .agents/skills/

If a project has custom workspace skills in .gemini/skills/, move or rename that folder to .agents/skills/ so Antigravity can recognize those skills as active slash commands.

MCP config changes

Gemini CLI declared MCP servers inside:

~/.gemini/settings.json

Antigravity CLI uses standalone MCP profiles:

~/.gemini/config/mcp_config.json
.agents/mcp_config.json

For remote websocket or SSE server definitions, update legacy url or httpUrl fields to serverUrl.

{
  "mcpServers": {
    "remote-indexer": {
      "serverUrl": "https://mcp.internal.enterprise.com/sse",
      "env": {
        "AUTH_TOKEN": "secure_alpha_token"
      }
    }
  }
}

Example Workflows

Start work in a repository

cd path/to/project
agy

In the prompt, describe the task and scope. Keep the first request narrow. For example:

Review this repository and identify the files involved in the login flow. Do not edit files yet.

Add another folder to the workspace

/add-dir ../shared-package

Use this when the agent needs access to a sibling package, shared library, or local dependency.

Run a terminal command

!npm test

Use ! for commands you would normally run yourself. Keep review prompts enabled when a command can modify files, install dependencies, or reach the network.

Review changes before accepting them

/diff

Read the diff before accepting a change. If the change is too broad, ask the agent to narrow the edit or explain the affected files.

Rewind a bad turn

/rewind

Use /rewind or /undo when the conversation goes in the wrong direction. This rolls back conversation history to a previous message.

Fork an approach

/fork

Use /fork when you want to explore a different solution without losing the current thread.

Resume earlier work

/resume

Use /resume to reopen previous conversation logs. Antigravity CLI also prints the command needed to resume a specific session when you close the CLI.

Use subagents without losing focus

/agents

Open /agents when background work needs your approval or when you want to inspect what a subagent did. Use Ctrl+K for fast approval when a pending subagent action appears above the prompt.

Keep output quieter

/config

Set verbosity to low if many tool calls make the terminal hard to scan.

Troubleshooting tips

ProblemFix
agy not foundCheck PATH and the install directory.
SSH sign-in stallsOpen the printed URL locally and paste the code.
Headless job waits or failsPass the prompt with -p and add required allow rules.
Invalid print-mode modelChoose one of the models listed in stderr.
Agent cannot see a folderUse /add-dir <path> or start in project root.
Cannot find codeUse /codesearch; add -F for literal text.
Output is noisyLower verbosity or set AGY_CLI_CMD_OUTPUT_PERCENTAGE.
Command needs tighter safetyUse strict or enable sandboxing.
Workspace skill stopped workingMove .gemini/skills/ to .agents/skills/.
MCP config failsUse mcp_config.json and serverUrl.
Need to inspect changesUse /diff, then Ctrl+R.
Reset custom shortcutsDelete keybindings.json.

Related Resources

FAQs

What command starts Antigravity CLI?

Run agy from your terminal.

What is the fastest way to see available commands?

Type / in the prompt box to open the slash command menu. Type ? for help or /usage for the offline developer manual.

How do I search the workspace from Antigravity CLI?

Run /codesearch, /cs, or /search. Searches use regular expressions by default. Add -F or --literal for an exact match.

How do I switch between default, accept-edits, and plan mode?

Press Shift+Tab, choose Agent Mode in /settings, or pass the mode with --mode when you start agy.

Where does Antigravity CLI store settings?

It stores main settings at ~/.gemini/antigravity-cli/settings.json and custom keybindings at ~/.gemini/antigravity-cli/keybindings.json.

How do I review code changes?

Use /diff to inspect modified files. Use Ctrl+R to open the Artifact Review Panel.

How do I undo a bad conversation turn?

Use /rewind or /undo to roll conversation history back to an earlier message.

How do I migrate from Gemini CLI?

Start agy in an environment that contains legacy Gemini CLI profiles and follow the first-launch checklist. To convert Gemini extensions manually, run agy plugin import gemini.

Does Antigravity CLI support MCP?

Yes. Use /mcp to open the MCP server manager. Global MCP servers use ~/.gemini/config/mcp_config.json, and workspace servers use .agents/mcp_config.json.

Should I use always-proceed?

Use always-proceed only in controlled workspaces where you are comfortable with the agent acting without prompts. For most coding work, request-review is safer.

How do I make Antigravity CLI quieter?

Open /config and set verbosity to low.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!