Antigravity CLI (agy) is Google's lightweight, Go-based terminal-native coding agent in the Antigravity 2.0 platform. Built for parallel subagent execution, Git worktree isolation, Agent Skills, plugins, and MCP integrations, agy replaces the consumer Gemini CLI.
This cheat sheet covers agy CLI flags and subcommands, interactive slash commands, keybindings, .agents/ and mcp_config.json configuration, and Gemini CLI migration steps.
🔗 Related Cheat Sheets: Terminal AI Coding CLIs Comparison Cheat Sheet · Claude Code CLI Cheat Sheet · OpenAI Codex CLI Cheat Sheet · AI Agent Skill Architecture Cheat Sheet
1. Installation, Subcommands & Startup Flags
1.1 Installation & Launch
# Install Antigravity CLI
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Launch interactive TUI (follow on-screen auth prompts on first run)
agy
1.2 Core Subcommands & Startup Flags
| Command / Flag | Description | Example Usage |
|---|---|---|
agy |
Launch interactive TUI in the active workspace | agy |
agy -p "<prompt>" |
Non-interactive (headless) run, prints output to stdout and exits | agy -p "Summarize the last 5 commits" |
agy -i "<prompt>" |
Launch interactive session pre-seeded with an initial prompt | agy -i "Refactor auth middleware under src/auth" |
agy -c, --continue |
Resume the most recent conversation session | agy -c |
agy --conversation <id> |
Load a specific historical conversation by ID | agy --conversation 42a506e6-... |
--mode <mode> |
Set execution permission mode:default · accept-edits · auto (sandboxed auto-approve) · plan |
agy --mode accept-edits |
--model <model> |
Override the active model for this session | agy --model gemini-3.8-flash |
--effort <level> |
Set reasoning effort (low through max, model-dependent) |
agy --effort high |
--agent <agent> |
Attach a custom agent profile at startup | agy --agent reviewer |
--add-dir <path> |
Grant workspace context access to an extra directory (repeatable) | agy --add-dir ../shared-types |
agy models / agy agents |
List available models or configured custom agents | agy models |
agy plugin <subcmd> |
Manage plugins: install · list · validate --strict · import gemini |
agy plugin validate --strict ./my-plugin |
2. Interactive TUI Slash Commands
Type / inside agy to invoke and autocomplete built-in commands:
2.1 General, Session & History Control
| Command | Function | Notes & Usage |
|---|---|---|
? / /help |
List all available slash commands and keybindings | Quick in-session reference |
/config / /settings |
Open full-screen interactive settings overlay | Edit preferences, themes, and permissions (settings.json) |
/clear |
Clear active prompt buffer and start a fresh session | Switch cleanly to an unrelated task |
/compact |
Compress and summarize conversation history | Reclaim context headroom on long runs |
/resume |
Open conversation picker to restore prior sessions | Continue interrupted workflows |
/rewind / /undo |
Step backward through conversation turns | Revert incorrect turns or direction |
/fork |
Branch the conversation at the current checkpoint | Explore parallel workspace branches safely |
/exit / /quit |
Exit agy CLI session |
Or press Ctrl + D Ctrl + D |
2.2 Models, Workflows, Agents & Extensions
| Command | Function | Notes & Usage |
|---|---|---|
/model |
Switch the active AI model mid-session | Balance speed/cost vs. reasoning power |
/effort |
Inspect or set reasoning effort (low to max) |
Note: agy -p "/effort" is read-only JSON output |
/plan |
Generate a step-by-step plan before modifying files | Safety gate before large architectural changes |
/goal |
Run autonomously until completion without mid-task pauses | Suited for long-horizon tasks |
/grill-me |
Run an interactive requirements interview before coding | Clarify edge cases and acceptance criteria upfront |
/agent |
Switch or invoke custom subagent/agent profiles | Loads definitions from .agents/agents/ |
/worktree |
Create or manage isolated Git worktree directories | Work across parallel branches without polluting main tree |
/mcp |
Inspect live MCP connection status, logs, and reload config | Troubleshoot local or remote MCP servers |
/plugin |
Browse, enable, disable, or inspect Marketplace plugins | Manage bundled skills, rules, hooks, and MCP servers |
/voice |
Toggle voice dictation input mode | Shortcut equivalent: F5 |
3. Terminal Keybindings & Input Syntax
| Shortcut / Syntax | Action | Effect & Scenario |
|---|---|---|
@<path> |
File path autocomplete | Inject specific file or directory paths into context |
!<command> |
Inline terminal execution | Prefix with ! to run shell commands directly (e.g., !npm run build) |
Ctrl + G |
Open external editor | Write long or multiline prompts in your default editor (Vim, VS Code) |
Esc Esc |
Clear active prompt box | Clear pending input when no stream is active |
F5 |
Toggle voice dictation | Equivalent to /voice |
Ctrl + D Ctrl + D |
Exit session | Double-press Ctrl + D to exit cleanly |
4. Configuration Hierarchy & mcp_config.json
4.1 Global vs. Workspace Directory Map
| Layer | Global Scope (All Workspaces) | Workspace Scope (Project-Local) | Purpose |
|---|---|---|---|
| CLI Settings | ~/.gemini/antigravity-cli/settings.json |
— | CLI preferences, theme, editor, and permission defaults |
| Keybindings | ~/.gemini/antigravity-cli/keybindings.json |
— | Custom terminal keyboard mappings |
| Project Instructions | ~/.gemini/AGENTS.md or GEMINI.md |
./AGENTS.md or ./GEMINI.md |
Persistent repo conventions, build/test commands, persona |
| Always-on Rules | ~/.gemini/config/rules/*.md |
.agents/rules/*.md |
Background constraints automatically injected into context |
| Agent Skills | ~/.gemini/config/skills/<name>/SKILL.md |
.agents/skills/<name>/SKILL.md |
Modular Agent Skills packages with scripts and resources |
| MCP Configuration | ~/.gemini/config/mcp_config.json |
.agents/mcp_config.json |
Local stdio and remote HTTP MCP server definitions |
⚠️ Remote MCP Breaking Schema (
serverUrl): Inmcp_config.json, remote HTTP MCP servers must useserverUrlrather than legacyurlorhttpUrlkeys—usingurlcauses silent connection failures.
{
"mcpServers": {
"remote-docs": {
"serverUrl": "https://docsmcp.googleapis.com/mcp/v1",
"oauth": {
"clientId": "OAUTH_CLIENT_ID",
"clientSecret": "OAUTH_CLIENT_SECRET"
}
},
"local-tool": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.example.com/mcp"]
}
}
}
5. Migrating from Legacy Gemini CLI to agy
Consumer free tier and Google AI Pro/Ultra requests on Gemini CLI ended on June 18, 2026 (leaving only enterprise Gemini Code Assist and metered API key workflows). Key migration mappings to agy:
| Component | Legacy Gemini CLI | Antigravity CLI (agy) |
Migration Action |
|---|---|---|---|
| Runtime & Binary | Open-source TypeScript (gemini) |
Go-based multi-agent CLI (agy) |
Switch invocations to agy; auto-onboarding runs on launch |
| Extensions | Gemini CLI extensions | Native Antigravity plugins | Run agy plugin import gemini to convert and import |
| Instruction Files | GEMINI.md |
GEMINI.md and AGENTS.md |
Fully compatible—existing GEMINI.md works as-is |
| Local Skills Path | .gemini/skills/ |
.agents/skills/ |
Move skill folders to .agents/skills/<name>/SKILL.md |
| Legacy Workflows | .agents/workflows/ |
Migrated to Agent Skills | Convert single-file workflows into .agents/skills/ (/migrate-workflows) |
| MCP Config & Keys | Inline in settings.json using url |
Dedicated mcp_config.json using serverUrl |
Split MCP blocks into mcp_config.json and rename url to serverUrl |