This Antigravity CLI cheatsheet is a quick reference for agy shell commands, launch and headless flags, slash commands, keyboard shortcuts, settings, permissions, MCP configuration, and Gemini CLI migration.
Use the quick reference for common actions, then use the grouped tables below when you need an exact command, argument, shortcut, config key, or file path.
Updated on November 19, 2026.
Antigravity CLI Cheatsheet
Quick reference
| Command | Task |
|---|---|
agy | Start CLI |
/ | Open slash commands |
/help or ? on an empty prompt | Help |
/codesearch, /cs, /search | Search code |
/config, /settings | Settings |
/permissions | Permissions |
/model or /model <name> | Choose model |
/model <name> <prompt> | Ask another model once |
/effort, /effort <level>, --effort <level> | Reasoning effort |
/plan <task> or Shift+Tab to plan mode | Plan before editing |
/goal <task> | Autonomous goal |
/boost <task> | Deep reasoning |
/teamwork-preview <task> | Agent team |
/voice, /record, F5 | Voice dictation |
/skills reload | Reload skills and slash commands |
--remote-control, /remote-control | Connect to the current session remotely |
--remote-agent | Run on a remote agent. Use --project <name-or-id> to choose a remote project, or omit it to use your default. |
agy acp | Start an Agent Client Protocol server over stdio for an editor. Use agy acp --login to sign in from a terminal. |
@<subagent> <message> | Message a subagent directly |
/diff or Ctrl+R | Review changes |
/copy btw | Copy the active /btw response |
/resume | Resume conversation |
/compact | Free conversation context |
/rewind, /undo | Rewind conversation |
/fork, /branch | Fork conversation |
/add-dir <path> | Add workspace folder |
/projects | List, create, edit, or switch projects. Switching local projects adds their folders and starts a new conversation. |
!<command> | Run shell command |
agy -p "<prompt>" | Run one headless prompt |
--output-format json | JSON output |
--input-format stream-json --output-format stream-json | Streaming input/output |
agy acp | Start an Agent Client Protocol server over stdio for an editor. Use agy acp --login to sign in from a terminal. |
agy models | List models |
agy agents | List custom agents |
agy remote-control ... | Remote Control service |
agy plugin ... | Plugins |
/mcp or agy mcp ... | MCP servers |
/logout | Log out |
/exit, /quit | Exit |
Command syntax
| Syntax | Meaning |
|---|---|
agy ... | Shell command or subcommand. |
--flag | Launch or headless command-line option. |
/command | Interactive TUI slash command. |
@ | Open file path suggestions; use @<subagent> <message> to message a subagent. |
!command | Run a terminal command directly. |
<value> | Required argument. |
[value] | Optional argument. |
Shell commands and subcommands
| Command | Use |
|---|---|
agy | Start an interactive Antigravity CLI session. |
agy "<prompt>" | Start the CLI with an initial prompt. |
agy acp | Start an Agent Client Protocol server over stdio for an editor. Use agy acp --login to sign in from a terminal. |
agy models | List available model slugs. |
agy agents | List available custom agents. |
agy changelog | Show the CLI changelog. |
agy mic-serve | Forward a local microphone to a remote CLI voice session. |
agy remote-control start [--name <label>] [--session] | Register and start the Remote Control background service. Use --name for a machine label or --session to limit it to the active login session. |
agy remote-control status | Show Remote Control service status. |
agy remote-control stop | Stop and unregister the Remote Control background service. |
agy plugin list | List all installed plugins with version and enabled state; add --json for machine-readable output. |
agy plugin install <path> | Install a local or remote plugin package. |
agy plugin disable <name> | Disable a plugin. |
agy plugin enable <name> | Enable a plugin. |
agy plugin uninstall <name> | Remove a plugin. |
agy plugin import gemini | Convert Gemini CLI extensions to Antigravity plugins. |
agy mcp list | List user-level MCP servers. |
agy mcp enable <name> | Enable an MCP server. |
agy mcp disable <name> | Disable an MCP server. |
agy mcp remove <name> | Remove an MCP server. |
agy plugin install <plugin-name>@antigravity-plugins-official | Install a plugin from the official marketplace. |
Add MCP servers
agy mcp add <name> --type stdio --env KEY=value -- <command> [args]
agy mcp add <name> --type http --header "Header: value" <url>Launch and headless flags
| Flag and default | Use |
|---|---|
-p, --print, --prompt | Run one prompt non-interactively and print the response. |
--output-formatDefault: text | Return text, json, or stream-json. |
--input-formatDefault: text | Read text or stream-json prompts from stdin. |
--json-schema | Use an inline JSON schema or schema file with an object root. Bare type names and non-object roots fail at startup with exit code 1. |
--model <slug> | Use a model returned by agy models. Base model names use the default thinking level when --effort is omitted. |
--effort <level> | Set a reasoning effort supported by the selected model. |
--agent <name> | Run with a custom agent returned by agy agents. |
--remote-control | Start a session-scoped Remote Control connection. |
--remote-agent | Run on a remote agent. Use --project <name-or-id> to choose a remote project. |
--continue, -cDefault: false | Continue the most recent conversation. |
--conversation <id> | Resume a conversation by ID. |
--print-timeout <duration>Default: unlimited | Set a maximum headless wait. A timed-out turn returns available partial output and exits with code 3. |
--sandboxDefault: false | Enable terminal sandbox restrictions where supported; no effect if unavailable. |
--dangerously-skip-permissionsDefault: false | Skip routine tool prompts. Explicit denies, the system command denylist, enterprise policy, and artifact review still apply. |
--mode <mode>Default: Configured mode | Start in default, accept-edits, auto (where available), or plan. |
--project <project> | Open an existing project by name or ID. |
--new-project <name> | Create a project. |
--disable-slash-commandsDefault: false | Keep slash-prefixed print-mode input as literal prompt text. |
Headless environment variables
| Variable | Use |
|---|---|
AGY_CLI_CMD_OUTPUT_PERCENTAGE | Limit terminal command output shown in the TUI. |
AGY_CLI_HIDE_LOGO | Hide the startup logo. |
AGY_CLI_OSC7501 | Set off to disable terminal status reporting or on to force it for a supporting terminal. |
AGY_CLI_OSC7501_MESSAGES | Set brief to omit pending command and question details from terminal status reports. |
AGY_CLI_HIDE_ACCOUNT_INFO | Hide account email and plan information in the header. |
AGY_CLI_DISABLE_ESCAPE_SEQUENCE_OPTIMIZATIONS | Disable terminal escape-sequence rendering optimizations. |
Streaming input rule
agy --input-format stream-json --output-format stream-json--input-format stream-json requires --output-format stream-json. CLI-handled commands such as /model should run as separate print-mode commands rather than inside the streaming input session.
Without --print-timeout, a headless run waits for background tasks. JSON and stream-JSON results include finished_reason on early exit. Check for print_timeout, interrupted, or error before treating a result as complete.
Core slash commands
Workspace and conversation
| Command and alias | Use |
|---|---|
/add-dir <path> | Add a directory to the active workspace. |
/codesearchAlias: /cs, /search | Search workspace code. Use -F for literal text. |
/artifact | Open the Artifact Review Panel. |
/diff | Open the diff viewer. |
/open <path> | Open a path in the configured editor. |
/copy, /copy <n>, /copy btw | Copy the latest response, an earlier response, or the full active /btw side-question response. |
/clearAlias: /new | Clear the active conversation context. |
/resumeAlias: /switch, /conversation | Open the conversation picker. Pass an ID or a unique ID prefix to resume directly. |
/rewindAlias: /undo | Roll back conversation history. |
/forkAlias: /branch | Fork the conversation. For large artifact folders, the fork references files in the original conversation. Deleting the original also deletes those files. |
/rename <name> | Rename the current conversation. |
/exitAlias: /quit | Close the TUI session. |
Settings, models, tools, and accounts
| Command and alias | Use |
|---|---|
/configAlias: /settings | Open the settings editor. |
/permissions | Open the fine-grained permissions manager. |
/model | Open the model picker; search by model name or ID. |
/model <name> | Switch model by name, slug, or label. Base model names use the default thinking level when effort is omitted. |
/model <name> <prompt> | Run one prompt on another model, then return to the current model. |
/effort, /effort <level> | View or set an effort supported by the selected model. |
/agents | Open custom-agent and subagent management. |
/tasks | Monitor background commands, timers, recurring jobs, and other background tools. |
/skills | Browse loaded Agent Skills. |
/skills reload | Reload skills and slash commands without restarting. |
/mcp | Open the MCP server manager. |
/remote-control | Start Remote Control for this session; use /remote-control off to stop. |
/hooks | Browse active hooks, including hooks from enabled plugins. |
/context | View context usage. |
/compact, /compact <message> | Summarize the conversation to free context; add a message to continue after compaction. |
/usageAlias: /quota | View account model quota usage. |
/credits | View Google One credits and purchase links. |
/keybindings | Open the shortcut editor. |
/statusline | Customize the status line. |
/title [on/off] | Control terminal window title updates. |
/voiceAlias: /record | Start or stop voice dictation with a supported account. Recordings finalize after 3 minutes 30 seconds. |
/help | Open help. |
/feedback | Open feedback. |
/logout | Remove the saved account session. |
/pluginAlias: /plugins | Browse the plugin marketplace; run inline install, uninstall, enable, disable, or list. |
Workflow slash commands
| Command and plan access | Use |
|---|---|
/boost <task>Access: Paid plans | Run multi-agent deep reasoning. |
/teamwork-preview <task>Access: Paid plans | Start a collaborative agent-team task. |
/run-workflow <task> | Run parallel or staged subagents with bundled Python. Google lists the slash command for AI Pro and AI Ultra. |
/swarm <task> | Start a preview swarm with parallel workers and a shared message board. Each worker uses your quota. |
/swarm board | Open the live roster and posts. Alt+S opens the board and Esc goes back. |
/goal <task>Access: All plans | Work autonomously until the stated objective is completed. |
/plan <task>Access: All plans | Research the codebase and create a reviewable implementation plan. |
/grill-me <request>Access: All plans | Ask focused questions before implementation. |
/learn <instruction>Access: All plans | Save session patterns as persistent Rules or Skills. |
/schedule ...Access: All plans | Schedule one-time or recurring work. |
/browser <task>Access: All plans | Launch a sandboxed browser subagent. Recordings use MP4. |
/btw <query>Access: All plans | Ask a side question. Read and search tools can run, and calls that require approval stop the side question. |
Keyboard shortcuts
In Vim Normal and Visual modes, numeric prefixes repeat motions and actions, such as
3dw,2d3w, and3dd.
Global and prompt shortcuts
| Shortcut | Action |
|---|---|
Enter | Submit the prompt or active selection. |
Shift+Enter, Ctrl+J | Insert a newline. |
Shift+Tab | Cycle default → accept-edits → auto → plan; skip auto where unavailable. |
Esc | Close a panel, halt an active stream, or clear an empty prompt. |
Ctrl+C | Exit the CLI; active work triggers confirmation. |
Ctrl+D | Forward-delete text or exit on an empty prompt. |
Ctrl+L | Clear the terminal buffer. |
Ctrl+V | Paste clipboard content or media. |
Alt+M | Send immediately in Queue mode, or queue in Send Immediately mode. |
Ctrl+O | Expand or collapse detailed tool output. |
Ctrl+R | Open Artifact Review. |
Ctrl+G | Open the prompt or review text in $EDITOR. |
Alt+J | Focus the next subagent waiting for approval. |
Ctrl+K | Approve a pending subagent action or open its question picker. |
Ctrl+A, Ctrl+E | Move to the start or end of the prompt line. |
Ctrl+_ / Ctrl+Shift+-, Ctrl+Shift+Z | Undo or redo prompt edits; Ctrl+Z also undoes edits where supported. |
F5 | Start or stop voice dictation. |
? on an empty prompt | Open the shortcuts panel. |
Navigation and review shortcuts
| Shortcut | Action |
|---|---|
↑, ↓ | Move through highlighted selections. |
←, → | Move between pages in multipage panels. |
PgUp, PgDn | Scroll up or down one page block. |
Shift+↑, Shift+↓ | Scroll up or down half a page. |
Tab | Accept slash-command completion. |
y | Approve a proposed tool action or artifact. |
n | Reject a proposed tool action or artifact. |
A in Artifact Review | Approve all artifacts. |
f in file review | Open the full diff. |
Ctrl+D, Ctrl+U in scrollable views | Scroll half a page down or up. |
Ctrl+F in /resume | Toggle flat and workspace-grouped conversations. |
F2, F4 in conversation picker | Rename or delete the selected item when those bindings are active. |
/ in artifact details | Search the current artifact. |
n, N during artifact search | Move to the next or previous match. |
Shift+N in diff view | Move to the previous diff. |
← / → in /config | Change and immediately save the highlighted setting. |
j / k in diff file view | Move the line cursor down or up; use ← / → to switch files. |
n / N in diff file view | Move to the next or previous change across files; during search, step through matches. |
Shift+Tab in /diff | Switch to the previous view. |
/ in /diff | Search the file list or file view; press Enter for the first match and n / N for the next or previous match. |
Ctrl+O / f in diff file view | Toggle the nearest fold / whole-file view in All Changes, Per Turn, and Commit Tree. |
[ / ] in Per Turn | Jump to the first file of the previous or next turn in the list or file view; wrap at either end. |
Esc on an empty prompt with an announcement | Dismiss the current announcement permanently. |
Execution modes
| Mode and launch | Behavior |
|---|---|
defaultStart: agy --mode=default | Pause for review before file edits and creations. |
accept-editsStart: agy --mode=accept-edits | Automatically approve standard file edits and creations. |
auto (Preview)Start: agy --mode=auto | Approve workspace edits and sandboxed commands automatically. A separate agent reviews commands outside the sandbox; risky actions still prompt. |
planStart: agy --mode=plan | Analyze and produce a plan before writing code. |
Settings reference
Persistent settings use ~/.gemini/antigravity-cli/settings.json. Custom shortcuts use ~/.gemini/antigravity-cli/keybindings.json.
| Setting and values | Use |
|---|---|
colorSchemeDefault / values: "terminal" | Terminal color theme. |
altScreenModeDefault / values: "default"; always, never | Screen buffer mode. |
copyOnSelectDefault / values: true | Copy selected TUI text on mouse release. |
toolPermissionDefault / values: "request-review" | Global tool-approval preset. |
artifactReviewPolicyDefault / values: "asks-for-review" | Artifact review behavior. |
agentModeValues: "" (Default), "accept-edits", "auto", "plan" | Startup mode. An unset value selects Auto where available. |
notificationsDefault / values: false | Completion notifications. |
showTipsDefault / values: true | Prompt tips. |
showFeedbackSurveyDefault / values: true | Feedback prompts. |
editorDefault / values: "auto" | External editor. |
editorModeDefault / values: "default" or "vim" | Prompt editing mode. |
vimInsertFirstDefault / values: false | Start Vim prompts in Insert mode. |
pickerGroupingDefault / values: "none" or "grouped" | Default /resume grouping. |
allowNonWorkspaceAccessDefault / values: false | Permit file access outside recognized workspace roots. |
enableTerminalSandboxDefault / values: false | Sandbox agent-initiated terminal commands where supported; no effect if unavailable. |
useG1CreditsDefault / values: false | Use personal G1 credits in eligible external builds. |
Enable Telemetry in /config | Account preference; no settings.json key. Business accounts show off (disabled). |
verbosityDefault / values: "medium" (default), "high", or "low" | medium groups related tool calls and thoughts while keeping commands and responses visible. |
runningLightSpeedDefault / values: "medium" | Progress animation speed. |
modelProviderDefault / values: "gemini" for API-key mode | Use direct Gemini API authentication. |
permissionsDefault / values: allow, ask, deny | Fine-grained permission rules. |
queuedMessages | Follow-ups wait for the turn to end by default. Set "send-immediately" to interrupt with new and queued messages in order. |
Permissions and sandbox
Permission presets
| Preset | Behavior |
|---|---|
request-review | Default. Prompt before write, shell, and web tools that require review. |
proceed-in-sandbox | Auto-run sandboxed terminal commands; fall back to request-review when the sandbox is unavailable. |
always-proceed | Run tools without prompts unless an ask or deny rule matches. |
strict | Prompt before every tool action, including file reads; allow rules do not bypass this preset. |
Fine-grained permission rules
| Rule and behavior | Examples |
|---|---|
denyBlock the matching action. | command(rm -rf), write_file(.git/) |
askRequire approval. | command(*), mcp(sql/execute_mutation) |
allowAuto-approve the matching action. | command(git), write_file(src/), mcp(linter/*) |
Terminal sandbox
| Method | Setting |
|---|---|
| Persistent | "enableTerminalSandbox": true |
| One session | agy --sandbox |
| Skip routine tool prompts | --dangerously-skip-permissions |
Config and customization paths
| Item | Path |
|---|---|
| CLI settings | ~/.gemini/antigravity-cli/settings.json |
| Custom keybindings | ~/.gemini/antigravity-cli/keybindings.json |
| Global custom agents | ~/.gemini/config/agents/ |
| Workspace custom agents | .agents/agents/ |
| Global Agent Skills | ~/.gemini/antigravity-cli/skills/ |
| Workspace Agent Skills | .agents/skills/ |
| Installed plugins | ~/.gemini/antigravity-cli/plugins/<plugin_name>/ |
| Global MCP config | ~/.gemini/config/mcp_config.json |
| Workspace MCP config | .agents/mcp_config.json |
| Global developer context | ~/.gemini/GEMINI.md |
| Workspace context | GEMINI.md, AGENTS.md |
Plugins, skills, agents, and hooks
| Command or location | Task |
|---|---|
/agents | Open Agent Manager |
agy agents | List custom agents |
agy --agent <name> | Run a custom agent |
@<subagent> <message> | Message a running or completed subagent |
/skills | Browse Agent Skills |
.agents/skills/ | Create workspace skill |
~/.gemini/antigravity-cli/skills/ | Create global skill |
/hooks | Inspect hooks |
agy plugin list | List plugins |
agy plugin install <path> | Install plugin |
agy plugin enable <name> / agy plugin disable <name> | Enable / disable plugin |
agy plugin uninstall <name> | Remove plugin |
agy plugin import gemini | Import Gemini extension |
/plugin, /plugins | Browse, install, and manage marketplace plugins. |
agy plugin list --json | List every installed plugin as JSON. |
agy plugin validate <path> [--strict] [--json] | Validate a local plugin directory, manifest, ZIP file, HTTPS ZIP URL, or GitHub repository URL. --strict fails on warnings and --json returns a machine-readable report. |
agy plugin install <plugin-name>@antigravity-plugins-official | Install from the official marketplace. |
Custom agent frontmatter
| Field | Use |
|---|---|
agents: | Declare subagents that a custom agent can invoke. |
enable_mcp_tools: true | Enable MCP tools for a custom subagent. The subagent inherits the parent agent’s configured MCP servers. |
excludeDefaultComponents: true | Exclude default prompt sections and built-in tools. Post-invocation hooks continue to run. |
MCP commands and config
| Command | Task |
|---|---|
/mcp | Open MCP manager |
agy mcp add <name> --type stdio -- <command> [args] | Add stdio server |
agy mcp add <name> --type http <url> | Add HTTP server |
agy mcp list | List servers |
agy mcp enable <name> | Enable server |
agy mcp disable <name> | Disable server |
agy mcp remove <name> | Remove server |
MCP config fields
| Field | Use |
|---|---|
command | Executable for a local stdio server. |
args | Arguments passed to the local server. |
env | Environment variables. |
cwd | Working directory. |
serverUrl | Remote SSE, Streamable HTTP, or websocket server URL. |
headers | Custom HTTP headers. |
disabled | Disable a server configuration. |
disabledTools | Hide selected server tools. |
Install and authentication
| Install command | Platform |
|---|---|
curl -fsSL https://antigravity.google/cli/install.sh | bash | macOS / Linux |
irm https://antigravity.google/cli/install.ps1 | iex | Windows PowerShell |
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd | Windows CMD |
Installer flags
| Flag | Use |
|---|---|
--skip-aliases | Do not purge or update legacy agy or antigravity aliases. |
--skip-path | Do not modify shell profile PATH. |
Authentication reference
| Method | Requirement |
|---|---|
| Google account | Run agy. The CLI reuses a saved OS-keyring session or opens browser sign-in. |
| Remote / SSH | Open the printed authorization URL locally, then paste the returned code into the remote terminal. |
| Gemini API key | Set "modelProvider": "gemini" and export GEMINI_API_KEY. |
| Custom Gemini endpoint | Set GOOGLE_GEMINI_BASE_URL. |
| Sign out | /logout. API-key mode has no stored account session to clear. |
| Google Cloud sign-in | Choose a Gemini subscription or Pay As You Go. |
Gemini CLI migration
| Gemini CLI | Antigravity CLI |
|---|---|
| Gemini extensions | agy plugin import gemini |
~/.gemini/skills/ | ~/.gemini/antigravity-cli/skills/ |
.gemini/skills/ | .agents/skills/ |
MCP entries in ~/.gemini/settings.json | ~/.gemini/config/mcp_config.json |
| Workspace MCP entries | .agents/mcp_config.json |
url / httpUrl for remote MCP | serverUrl |
GEMINI.md / AGENTS.md | Continue to work as workspace context files. |
Troubleshooting
| Problem | Fix |
|---|---|
agy not found | Check PATH and the platform-specific install directory. |
| SSH sign-in stalls | Open the printed authorization URL locally and paste the returned code into the remote terminal. |
| Headless run reports denied actions | Add scoped permissions.allow rules or use the appropriate permission policy. |
Headless run reaches an explicit --print-timeout | Increase the timeout and check stderr for AGY_ERROR. A timed-out turn exits with code 3. |
| Headless run ends on a model or API error | Check the structured AGY_ERROR line on stderr; the run exits with code 3. |
| Streaming input is rejected | Pair --input-format stream-json with --output-format stream-json. |
| Gemini API key is ignored | Set "modelProvider": "gemini" and export GEMINI_API_KEY. |
| Gemini API-key quota is exhausted | The CLI retries temporary model rate or capacity limits when the server requests a delay of up to four minutes. Exhausted daily or weekly quotas, spending caps, and depleted prepaid balances stop the turn immediately. |
| Invalid headless model | Run agy models and use a listed slug. |
| Agent cannot see a folder | Use /add-dir <path> or start from the project root. |
Remote Control exits with code 2 | If you use a Gemini API key, switch to a supported account sign-in method. |
| Remote Control service is unavailable | Run agy remote-control status. Restart it with agy remote-control start if needed. |
| Literal code search needed | Use /codesearch -F <text>. |
| Workspace skill stopped working after migration | Move .gemini/skills/ to .agents/skills/. |
| MCP config fails after migration | Use the dedicated mcp_config.json files and replace legacy url / httpUrl with serverUrl. |
| Reset custom shortcuts | Delete ~/.gemini/antigravity-cli/keybindings.json. |
| Invalid headless schema | Use a valid JSON schema with "type": "object" at its root. Bare type names, missing files, and non-object roots exit with code 1. |
| Windows plugin update or removal is blocked | Close other agy sessions, Antigravity Hub, or the Remote Control daemon if they hold the plugin open, then retry. |
| Auto mode is missing | Check account eligibility and terminal sandbox support. Windows needs Windows 11 24H2 or later with the August 2026 update or later. |
| Plugin or plugin MCP server needs sign-in | Open /plugin and connect the plugin from the Installed tab. |
| Endpoint security blocks bundled ripgrep | Set ANTIGRAVITY_DISABLE_EMBEDDED_RIPGREP=true to use ripgrep on your PATH or the built-in search. |
| Docker or Kubernetes credentials are blocked | Grant sandbox access explicitly to the required ~/.docker or ~/.kube path. |
| Image paste finds no image | Copy only an image, then use the terminal paste shortcut or drag the image file into the prompt. Install the clipboard utility named in the error. |
| Authentication expired | Sign in again when the CLI reports Authentication expired. Please log back in.. |
Related Resources
- Antigravity CLI: Gemini CLI Alternative for Agent-first Development
- Claude Code Commands Cheat Sheet
- OpenAI Codex Commands Cheat Sheet
- GitHub Copilot Cheat Sheet
- Grok Build CLI Cheatsheet
- Most Popular Agent Skills on GitHub for Coding Agents
- Gemini & Google AI Timeline










