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.

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

CommandTask
agyStart CLI
/Open slash commands
/help or ? on an empty promptHelp
/codesearch, /cs, /searchSearch code
/config, /settingsSettings
/permissionsPermissions
/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 modePlan before editing
/goal <task>Autonomous goal
/boost <task>Deep reasoning
/teamwork-preview <task>Agent team
/voice, /record, F5Voice dictation
/skills reloadReload skills and slash commands
--remote-control, /remote-controlConnect to the current session remotely
--remote-agentRun on a remote agent. Use --project <name-or-id> to choose a remote project, or omit it to use your default.
agy acpStart 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+RReview changes
/copy btwCopy the active /btw response
/resumeResume conversation
/compactFree conversation context
/rewind, /undoRewind conversation
/fork, /branchFork conversation
/add-dir <path>Add workspace folder
/projectsList, 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 jsonJSON output
--input-format stream-json --output-format stream-jsonStreaming input/output
agy acpStart an Agent Client Protocol server over stdio for an editor. Use agy acp --login to sign in from a terminal.
agy modelsList models
agy agentsList custom agents
agy remote-control ...Remote Control service
agy plugin ...Plugins
/mcp or agy mcp ...MCP servers
/logoutLog out
/exit, /quitExit

Command syntax

SyntaxMeaning
agy ...Shell command or subcommand.
--flagLaunch or headless command-line option.
/commandInteractive TUI slash command.
@Open file path suggestions; use @<subagent> <message> to message a subagent.
!commandRun a terminal command directly.
<value>Required argument.
[value]Optional argument.

Shell commands and subcommands

CommandUse
agyStart an interactive Antigravity CLI session.
agy "<prompt>"Start the CLI with an initial prompt.
agy acpStart an Agent Client Protocol server over stdio for an editor. Use agy acp --login to sign in from a terminal.
agy modelsList available model slugs.
agy agentsList available custom agents.
agy changelogShow the CLI changelog.
agy mic-serveForward 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 statusShow Remote Control service status.
agy remote-control stopStop and unregister the Remote Control background service.
agy plugin listList 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 geminiConvert Gemini CLI extensions to Antigravity plugins.
agy mcp listList 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-officialInstall 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 defaultUse
-p, --print, --promptRun one prompt non-interactively and print the response.
--output-format
Default: text
Return text, json, or stream-json.
--input-format
Default: text
Read text or stream-json prompts from stdin.
--json-schemaUse 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-controlStart a session-scoped Remote Control connection.
--remote-agentRun on a remote agent. Use --project <name-or-id> to choose a remote project.
--continue, -c
Default: 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.
--sandbox
Default: false
Enable terminal sandbox restrictions where supported; no effect if unavailable.
--dangerously-skip-permissions
Default: 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-commands
Default: false
Keep slash-prefixed print-mode input as literal prompt text.

Headless environment variables

VariableUse
AGY_CLI_CMD_OUTPUT_PERCENTAGELimit terminal command output shown in the TUI.
AGY_CLI_HIDE_LOGOHide the startup logo.
AGY_CLI_OSC7501Set off to disable terminal status reporting or on to force it for a supporting terminal.
AGY_CLI_OSC7501_MESSAGESSet brief to omit pending command and question details from terminal status reports.
AGY_CLI_HIDE_ACCOUNT_INFOHide account email and plan information in the header.
AGY_CLI_DISABLE_ESCAPE_SEQUENCE_OPTIMIZATIONSDisable 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 aliasUse
/add-dir <path>Add a directory to the active workspace.
/codesearch
Alias: /cs, /search
Search workspace code. Use -F for literal text.
/artifactOpen the Artifact Review Panel.
/diffOpen the diff viewer.
/open <path>Open a path in the configured editor.
/copy, /copy <n>, /copy btwCopy the latest response, an earlier response, or the full active /btw side-question response.
/clear
Alias: /new
Clear the active conversation context.
/resume
Alias: /switch, /conversation
Open the conversation picker. Pass an ID or a unique ID prefix to resume directly.
/rewind
Alias: /undo
Roll back conversation history.
/fork
Alias: /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.
/exit
Alias: /quit
Close the TUI session.

Settings, models, tools, and accounts

Command and aliasUse
/config
Alias: /settings
Open the settings editor.
/permissionsOpen the fine-grained permissions manager.
/modelOpen 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.
/agentsOpen custom-agent and subagent management.
/tasksMonitor background commands, timers, recurring jobs, and other background tools.
/skillsBrowse loaded Agent Skills.
/skills reloadReload skills and slash commands without restarting.
/mcpOpen the MCP server manager.
/remote-controlStart Remote Control for this session; use /remote-control off to stop.
/hooksBrowse active hooks, including hooks from enabled plugins.
/contextView context usage.
/compact, /compact <message>Summarize the conversation to free context; add a message to continue after compaction.
/usage
Alias: /quota
View account model quota usage.
/creditsView Google One credits and purchase links.
/keybindingsOpen the shortcut editor.
/statuslineCustomize the status line.
/title [on/off]Control terminal window title updates.
/voice
Alias: /record
Start or stop voice dictation with a supported account. Recordings finalize after 3 minutes 30 seconds.
/helpOpen help.
/feedbackOpen feedback.
/logoutRemove the saved account session.
/plugin
Alias: /plugins
Browse the plugin marketplace; run inline install, uninstall, enable, disable, or list.

Workflow slash commands

Command and plan accessUse
/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 boardOpen 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, and 3dd.

Global and prompt shortcuts

ShortcutAction
EnterSubmit the prompt or active selection.
Shift+Enter, Ctrl+JInsert a newline.
Shift+TabCycle default → accept-edits → auto → plan; skip auto where unavailable.
EscClose a panel, halt an active stream, or clear an empty prompt.
Ctrl+CExit the CLI; active work triggers confirmation.
Ctrl+DForward-delete text or exit on an empty prompt.
Ctrl+LClear the terminal buffer.
Ctrl+VPaste clipboard content or media.
Alt+MSend immediately in Queue mode, or queue in Send Immediately mode.
Ctrl+OExpand or collapse detailed tool output.
Ctrl+ROpen Artifact Review.
Ctrl+GOpen the prompt or review text in $EDITOR.
Alt+JFocus the next subagent waiting for approval.
Ctrl+KApprove a pending subagent action or open its question picker.
Ctrl+A, Ctrl+EMove to the start or end of the prompt line.
Ctrl+_ / Ctrl+Shift+-, Ctrl+Shift+ZUndo or redo prompt edits; Ctrl+Z also undoes edits where supported.
F5Start or stop voice dictation.
? on an empty promptOpen the shortcuts panel.

Navigation and review shortcuts

ShortcutAction
↑, ↓Move through highlighted selections.
←, →Move between pages in multipage panels.
PgUp, PgDnScroll up or down one page block.
Shift+↑, Shift+↓Scroll up or down half a page.
TabAccept slash-command completion.
yApprove a proposed tool action or artifact.
nReject a proposed tool action or artifact.
A in Artifact ReviewApprove all artifacts.
f in file reviewOpen the full diff.
Ctrl+D, Ctrl+U in scrollable viewsScroll half a page down or up.
Ctrl+F in /resumeToggle flat and workspace-grouped conversations.
F2, F4 in conversation pickerRename or delete the selected item when those bindings are active.
/ in artifact detailsSearch the current artifact.
n, N during artifact searchMove to the next or previous match.
Shift+N in diff viewMove to the previous diff.
← / → in /configChange and immediately save the highlighted setting.
j / k in diff file viewMove the line cursor down or up; use ← / → to switch files.
n / N in diff file viewMove to the next or previous change across files; during search, step through matches.
Shift+Tab in /diffSwitch to the previous view.
/ in /diffSearch 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 viewToggle the nearest fold / whole-file view in All Changes, Per Turn, and Commit Tree.
[ / ] in Per TurnJump 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 announcementDismiss the current announcement permanently.

Execution modes

Mode and launchBehavior
default
Start: agy --mode=default
Pause for review before file edits and creations.
accept-edits
Start: 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.
plan
Start: 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 valuesUse
colorScheme
Default / values: "terminal"
Terminal color theme.
altScreenMode
Default / values: "default"; always, never
Screen buffer mode.
copyOnSelect
Default / values: true
Copy selected TUI text on mouse release.
toolPermission
Default / values: "request-review"
Global tool-approval preset.
artifactReviewPolicy
Default / values: "asks-for-review"
Artifact review behavior.
agentMode
Values: "" (Default), "accept-edits", "auto", "plan"
Startup mode. An unset value selects Auto where available.
notifications
Default / values: false
Completion notifications.
showTips
Default / values: true
Prompt tips.
showFeedbackSurvey
Default / values: true
Feedback prompts.
editor
Default / values: "auto"
External editor.
editorMode
Default / values: "default" or "vim"
Prompt editing mode.
vimInsertFirst
Default / values: false
Start Vim prompts in Insert mode.
pickerGrouping
Default / values: "none" or "grouped"
Default /resume grouping.
allowNonWorkspaceAccess
Default / values: false
Permit file access outside recognized workspace roots.
enableTerminalSandbox
Default / values: false
Sandbox agent-initiated terminal commands where supported; no effect if unavailable.
useG1Credits
Default / values: false
Use personal G1 credits in eligible external builds.
Enable Telemetry in /configAccount preference; no settings.json key. Business accounts show off (disabled).
verbosity
Default / values: "medium" (default), "high", or "low"
medium groups related tool calls and thoughts while keeping commands and responses visible.
runningLightSpeed
Default / values: "medium"
Progress animation speed.
modelProvider
Default / values: "gemini" for API-key mode
Use direct Gemini API authentication.
permissions
Default / values: allow, ask, deny
Fine-grained permission rules.
queuedMessagesFollow-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

PresetBehavior
request-reviewDefault. Prompt before write, shell, and web tools that require review.
proceed-in-sandboxAuto-run sandboxed terminal commands; fall back to request-review when the sandbox is unavailable.
always-proceedRun tools without prompts unless an ask or deny rule matches.
strictPrompt before every tool action, including file reads; allow rules do not bypass this preset.

Fine-grained permission rules

Rule and behaviorExamples
deny
Block the matching action.
command(rm -rf), write_file(.git/)
ask
Require approval.
command(*), mcp(sql/execute_mutation)
allow
Auto-approve the matching action.
command(git), write_file(src/), mcp(linter/*)

Terminal sandbox

MethodSetting
Persistent"enableTerminalSandbox": true
One sessionagy --sandbox
Skip routine tool prompts--dangerously-skip-permissions

Config and customization paths

ItemPath
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 contextGEMINI.md, AGENTS.md

Plugins, skills, agents, and hooks

Command or locationTask
/agentsOpen Agent Manager
agy agentsList custom agents
agy --agent <name>Run a custom agent
@<subagent> <message>Message a running or completed subagent
/skillsBrowse Agent Skills
.agents/skills/Create workspace skill
~/.gemini/antigravity-cli/skills/Create global skill
/hooksInspect hooks
agy plugin listList 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 geminiImport Gemini extension
/plugin, /pluginsBrowse, install, and manage marketplace plugins.
agy plugin list --jsonList 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-officialInstall from the official marketplace.

Custom agent frontmatter

FieldUse
agents:Declare subagents that a custom agent can invoke.
enable_mcp_tools: trueEnable MCP tools for a custom subagent. The subagent inherits the parent agent’s configured MCP servers.
excludeDefaultComponents: trueExclude default prompt sections and built-in tools. Post-invocation hooks continue to run.

MCP commands and config

CommandTask
/mcpOpen 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 listList servers
agy mcp enable <name>Enable server
agy mcp disable <name>Disable server
agy mcp remove <name>Remove server

MCP config fields

FieldUse
commandExecutable for a local stdio server.
argsArguments passed to the local server.
envEnvironment variables.
cwdWorking directory.
serverUrlRemote SSE, Streamable HTTP, or websocket server URL.
headersCustom HTTP headers.
disabledDisable a server configuration.
disabledToolsHide selected server tools.

Install and authentication

Install commandPlatform
curl -fsSL https://antigravity.google/cli/install.sh | bashmacOS / Linux
irm https://antigravity.google/cli/install.ps1 | iexWindows PowerShell
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmdWindows CMD

Installer flags

FlagUse
--skip-aliasesDo not purge or update legacy agy or antigravity aliases.
--skip-pathDo not modify shell profile PATH.

Authentication reference

MethodRequirement
Google accountRun agy. The CLI reuses a saved OS-keyring session or opens browser sign-in.
Remote / SSHOpen the printed authorization URL locally, then paste the returned code into the remote terminal.
Gemini API keySet "modelProvider": "gemini" and export GEMINI_API_KEY.
Custom Gemini endpointSet GOOGLE_GEMINI_BASE_URL.
Sign out/logout. API-key mode has no stored account session to clear.
Google Cloud sign-inChoose a Gemini subscription or Pay As You Go.

Gemini CLI migration

Gemini CLIAntigravity CLI
Gemini extensionsagy 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 MCPserverUrl
GEMINI.md / AGENTS.mdContinue to work as workspace context files.

Troubleshooting

ProblemFix
agy not foundCheck PATH and the platform-specific install directory.
SSH sign-in stallsOpen the printed authorization URL locally and paste the returned code into the remote terminal.
Headless run reports denied actionsAdd scoped permissions.allow rules or use the appropriate permission policy.
Headless run reaches an explicit --print-timeoutIncrease the timeout and check stderr for AGY_ERROR. A timed-out turn exits with code 3.
Headless run ends on a model or API errorCheck the structured AGY_ERROR line on stderr; the run exits with code 3.
Streaming input is rejectedPair --input-format stream-json with --output-format stream-json.
Gemini API key is ignoredSet "modelProvider": "gemini" and export GEMINI_API_KEY.
Gemini API-key quota is exhaustedThe 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 modelRun agy models and use a listed slug.
Agent cannot see a folderUse /add-dir <path> or start from the project root.
Remote Control exits with code 2If you use a Gemini API key, switch to a supported account sign-in method.
Remote Control service is unavailableRun agy remote-control status. Restart it with agy remote-control start if needed.
Literal code search neededUse /codesearch -F <text>.
Workspace skill stopped working after migrationMove .gemini/skills/ to .agents/skills/.
MCP config fails after migrationUse the dedicated mcp_config.json files and replace legacy url / httpUrl with serverUrl.
Reset custom shortcutsDelete ~/.gemini/antigravity-cli/keybindings.json.
Invalid headless schemaUse 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 blockedClose other agy sessions, Antigravity Hub, or the Remote Control daemon if they hold the plugin open, then retry.
Auto mode is missingCheck 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-inOpen /plugin and connect the plugin from the Installed tab.
Endpoint security blocks bundled ripgrepSet ANTIGRAVITY_DISABLE_EMBEDDED_RIPGREP=true to use ripgrep on your PATH or the built-in search.
Docker or Kubernetes credentials are blockedGrant sandbox access explicitly to the required ~/.docker or ~/.kube path.
Image paste finds no imageCopy 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 expiredSign in again when the CLI reports Authentication expired. Please log back in..

Related Resources

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!