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 October 13, 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
@<subagent> <message>Message a subagent directly
/diff or Ctrl+RReview changes
/copy btwCopy the active /btw response
/resumeResume conversation
/rewind, /undoRewind conversation
/fork, /branchFork conversation
/add-dir <path>Add workspace folder
!<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 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 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.
--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. If it expires mid-turn, the CLI returns available partial output and writes a warning to stderr.
--sandbox
Default: false
Enable terminal sandbox restrictions for the run.
--dangerously-skip-permissions
Default: false
Skip tool permission prompts. Plans and other artifacts still follow artifactReviewPolicy.
--mode <mode>
Default: Configured mode
Start in default, accept-edits, 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.

An unknown --agent name exits with code 1 in headless mode; interactive sessions show Agent Not Found before using the default agent. Combining --print with --prompt-interactive is a usage error with exit code 2. Remote Control is unavailable with Application Default Credentials (AGY_ADC_AUTH). Browser Settings exposes the CLI session settings, and agy remote-control serve loads and saves settings.json.

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_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 and /usage should run as separate print-mode commands rather than inside the streaming input session.

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.
/rewind
Alias: /undo
Roll back conversation history.
/fork
Alias: /branch
Clone the current conversation into a parallel session.
/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.
/usage
Alias: /quota
View current model quota usage.
/creditsView G1 credit balance 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; 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.
/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.
/btw <query>
Access: All plans
Ask a background side question without running user or workspace hooks.

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 → plan.
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.
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 the pending subagent action.
Ctrl+A, Ctrl+EMove to the start or end of the prompt line.
Ctrl+Z, Ctrl+Shift+ZUndo or redo prompt edits.
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, including across files.
Shift+Tab in /diffSwitch to the previous view.
Esc on an empty prompt with an announcementDismiss the current announcement permanently.

Execution modes

Mode and launchBehavior
default
Start: agy or --mode=default
Pause for review before file edits and creations.
accept-edits
Start: agy --mode=accept-edits
Automatically approve standard file edits and creations.
plan
Start: agy --mode=plan
Analyze and produce a plan before writing code.

Press Shift+Tab to cycle modes during a session. Tool permission rules continue to control shell commands in every execution mode.

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
Default / values: default, accept-edits, plan
Default execution mode.
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: "flat" 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.
useG1Credits
Default / values: false
Use personal G1 credits in eligible external builds.
enableTelemetry
Default / values: true
Usage metrics and crash reporting.
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 terminal commands when sandboxed.
always-proceedRun tools without approval prompts.
strictPrompt for all non-read tools.

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/*)

Permission precedence is Deny > Ask > Allow. Common resource forms include command(...), read_file(...), write_file(...), read_url(...), execute_url(...), and mcp(server/tool). Sandboxed commands can read and write the CLI artifact and scratch directories.

Terminal sandbox

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

Windows sandboxed commands run without administrator rights. On macOS, sandboxed commands cannot read ~/Library/Application Support by default; permit access explicitly in sandbox rules when required. Implementation plans still require review unless the Artifact Review setting in /config allows automatic approval.

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 install <plugin-name>@antigravity-plugins-officialInstall from the official marketplace.

In /plugin, choose + Install from local directory... to install a local folder and fill in required settings before enabling the plugin. In the Installed tab, type to search, press Enter to finish searching, then use Space to toggle a plugin or Enter to open its details. Plugins can declare subagents in a root-level agents.json, store persistent data through PLUGIN_DATA, and provide executable tools in bin/.

Directory entries in skills.json, rules.json, agents.json, and plugins.json load direct children only; use include_only to select nested items. User and workspace rules share a 20,000-token budget. Sessions started in a subdirectory load customization manifests from each parent .agents/ directory up to the project root. Plugins under ~/.gemini/config/plugins/ that need MCP variables start disabled until enabled.

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.

Paths in skills:, plugins:, rules:, agents:, and hooks: resolve relative to the custom agent file. In a multi-repository workspace, subagents with branch or share workspaces receive an isolated copy of each repository.

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

MCP servers bundled inside plugins use namespaced server names such as <plugin>_<server> when needed to prevent collisions with other plugin or user-configured servers.

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.

MCP servers can keep a tool loaded by including _meta: {"antigravity/alwaysLoad": true} in its tools/list entry. Temporary network failures do not clear saved OAuth sign-ins.

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

Native Android binaries support direct use in Termux without proot-distro.

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.

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 when a complete response is required. The CLI returns available partial output and writes a warning to stderr when the timeout expires mid-turn.
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 exhaustedDaily quota, project spend caps, and depleted prepaid credits stop retries immediately; short per-minute rate limits still retry.
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 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.
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!