Antigravity CLI (agy)
Operator guide for the Antigravity CLI, invoked as agy. Run all agy
commands through the Sonic terminal tool; inspect its config and logs with
read_file. This skill is reference + procedure — it does not wrap a network
API, so there is nothing to authenticate from Sonic itself.
When to Use
- Installing, updating, or smoke-testing the
agy binary
- Driving non-interactive
agy --print / agy -p one-shots
- Debugging Antigravity auth, sandbox, permissions, or plugin state
- Reading Antigravity settings, keybindings, conversations, or logs
Mental model
Antigravity has two layers — keep them distinct or the guidance will be wrong:
- Shell wrapper commands —
agy help, agy install, agy plugin,
agy update, agy changelog. Run these through the terminal tool.
- Interactive in-session slash commands —
/config, /permissions,
/skills, /agents, etc. These only exist inside a running agy TUI
session, not on the shell wrapper.
agy help shows the shell wrapper surface, NOT the in-session slash commands.
Prerequisites
- The
agy binary on PATH. Verify through the terminal tool:
command -v agy && agy --version.
- No env vars or API keys required by this skill — Antigravity manages its own
auth via the OS keyring / browser sign-in (see Authentication below).
How to Run
Invoke every agy command through the terminal tool. Examples:
terminal(command="agy --version")
terminal(command="agy help")
terminal(command="agy plugin list")
terminal(command="agy --print 'Summarize the repo in 3 bullets'", workdir="/path/to/project")
For an interactive multi-turn TUI session, launch agy with pty=true (and
tmux for capture/monitoring), the same pattern the codex / claude-code
skills use. For one-shot smoke tests and scripted prompts, prefer
agy --print (non-interactive).
To inspect Antigravity's own files, use read_file on the paths under Core
paths below — do not cat them through the terminal.
Core paths
- Binary / entrypoint:
agy
- App data dir:
~/.gemini/antigravity-cli/
- Settings file:
~/.gemini/antigravity-cli/settings.json
- Keybindings file:
~/.gemini/antigravity-cli/keybindings.json
- Logs:
~/.gemini/antigravity-cli/log/cli-*.log
- Conversations:
~/.gemini/antigravity-cli/conversations/
- Brain artifacts:
~/.gemini/antigravity-cli/brain/
- History:
~/.gemini/antigravity-cli/history.jsonl
- Plugin staging:
~/.gemini/antigravity-cli/plugins/<plugin_name>/
Quick Reference
Wrapper commands
agy changelog
agy help
agy install
agy plugin / agy plugins
agy update
Useful flags
--add-dir
--continue / -c
--conversation
--dangerously-skip-permissions
--print / -p
--print-timeout
--prompt
--prompt-interactive / -i
--sandbox
--log-file
--version
Plugin subcommands (agy plugin --help)
list, import [source], install <target>, uninstall <name>,
enable <name>, disable <name>, validate [path], link <mp> <target>,
help
Install flags (agy install --help)
--dir, --skip-aliases, --skip-path
In-session slash commands
- Conversation control:
/resume (/switch), /rewind (/undo),
/rename <name>, /clear, /fork, /reset, /new
- Settings & tools:
/config, /settings, /permissions, /model,
/keybindings, /statusline, /tasks, /skills, /mcp, /open <path>,
/usage, /logout, /agents
- Prompt helpers:
@ path autocomplete, esc esc clears the prompt (when
not streaming), ! runs a terminal command directly, ? opens help
Settings and permissions
Common settings keys (settings.json)
allowNonWorkspaceAccess
colorScheme
permissions.allow
trustedWorkspaces
Permission modes
request-review, always-proceed, strict, proceed-in-sandbox.
Sandbox behavior
enableTerminalSandbox is a boolean in settings.json; default false.
- Launch-time overrides (
--sandbox, --dangerously-skip-permissions) can
supersede persistent settings for the current session.
Authentication behavior
- The CLI tries the OS secure keyring first.
- With no saved session, it falls back to browser-based Google sign-in.
- Locally it opens the default browser; over SSH it prints an authorization URL
and expects the auth code pasted back.
/logout removes saved credentials.
Plugins
- Plugins stage under
~/.gemini/antigravity-cli/plugins/<plugin_name>/.
- They can bundle skills, agents, rules, MCP servers, and hooks.
agy plugin list returning no imported plugins is a valid empty state.
Pitfalls
agy help shows wrapper commands, not interactive slash commands.
agy --version is the safe non-interactive version check; agy version is
interactive and can fail without a real TTY.
- First place to look for failures:
~/.gemini/antigravity-cli/log/cli-*.log
(read with read_file).
- Don't confuse persistent JSON settings with launch-time overrides.
~/.gemini/antigravity-cli/bin/agentapi is a thin wrapper to agy agentapi.
- On WSL, token storage is file-based, so auth issues are usually local-file /
session-state problems, not browser-only problems.
- Workspace identity can depend on launch directory and the
.antigravitycli
project marker.
Verification
Confirm the install is real and usable, all through the terminal tool (read
files with read_file):
terminal(command="command -v agy")
terminal(command="agy --version")
terminal(command="agy help")
terminal(command="agy plugin list")
read_file on ~/.gemini/antigravity-cli/settings.json
read_file on the latest ~/.gemini/antigravity-cli/log/cli-*.log
- If needed,
read_file on ~/.gemini/antigravity-cli/keybindings.json
Support files
references/cli-docs.md — condensed notes from the getting-started, usage,
and features docs.
1---2name: antigravity-cli3description: Operate the Antigravity CLI (agy): plugins, auth, sandbox.4license: MIT5---67# Antigravity CLI (`agy`)89Operator guide for the Antigravity CLI, invoked as `agy`. Run all `agy`10commands through the Sonic `terminal` tool; inspect its config and logs with11`read_file`. This skill is reference + procedure — it does not wrap a network12API, so there is nothing to authenticate from Sonic itself.1314## When to Use1516- Installing, updating, or smoke-testing the `agy` binary17- Driving non-interactive `agy --print` / `agy -p` one-shots18- Debugging Antigravity auth, sandbox, permissions, or plugin state19- Reading Antigravity settings, keybindings, conversations, or logs2021## Mental model2223Antigravity has two layers — keep them distinct or the guidance will be wrong:24251. **Shell wrapper commands** — `agy help`, `agy install`, `agy plugin`,26 `agy update`, `agy changelog`. Run these through the `terminal` tool.272. **Interactive in-session slash commands** — `/config`, `/permissions`,28 `/skills`, `/agents`, etc. These only exist inside a running `agy` TUI29 session, not on the shell wrapper.3031`agy help` shows the shell wrapper surface, NOT the in-session slash commands.3233## Prerequisites3435- The `agy` binary on PATH. Verify through the `terminal` tool:36 `command -v agy && agy --version`.37- No env vars or API keys required by this skill — Antigravity manages its own38 auth via the OS keyring / browser sign-in (see Authentication below).3940## How to Run4142Invoke every `agy` command through the `terminal` tool. Examples:4344```45terminal(command="agy --version")46terminal(command="agy help")47terminal(command="agy plugin list")48terminal(command="agy --print 'Summarize the repo in 3 bullets'", workdir="/path/to/project")49```5051For an interactive multi-turn TUI session, launch `agy` with `pty=true` (and52tmux for capture/monitoring), the same pattern the `codex` / `claude-code`53skills use. For one-shot smoke tests and scripted prompts, prefer54`agy --print` (non-interactive).5556To inspect Antigravity's own files, use `read_file` on the paths under Core57paths below — do not `cat` them through the terminal.5859## Core paths6061- Binary / entrypoint: `agy`62- App data dir: `~/.gemini/antigravity-cli/`63- Settings file: `~/.gemini/antigravity-cli/settings.json`64- Keybindings file: `~/.gemini/antigravity-cli/keybindings.json`65- Logs: `~/.gemini/antigravity-cli/log/cli-*.log`66- Conversations: `~/.gemini/antigravity-cli/conversations/`67- Brain artifacts: `~/.gemini/antigravity-cli/brain/`68- History: `~/.gemini/antigravity-cli/history.jsonl`69- Plugin staging: `~/.gemini/antigravity-cli/plugins/<plugin_name>/`7071## Quick Reference7273### Wrapper commands74- `agy changelog`75- `agy help`76- `agy install`77- `agy plugin` / `agy plugins`78- `agy update`7980### Useful flags81- `--add-dir`82- `--continue` / `-c`83- `--conversation`84- `--dangerously-skip-permissions`85- `--print` / `-p`86- `--print-timeout`87- `--prompt`88- `--prompt-interactive` / `-i`89- `--sandbox`90- `--log-file`91- `--version`9293### Plugin subcommands (`agy plugin --help`)94- `list`, `import [source]`, `install <target>`, `uninstall <name>`,95 `enable <name>`, `disable <name>`, `validate [path]`, `link <mp> <target>`,96 `help`9798### Install flags (`agy install --help`)99- `--dir`, `--skip-aliases`, `--skip-path`100101### In-session slash commands102- **Conversation control:** `/resume` (`/switch`), `/rewind` (`/undo`),103 `/rename <name>`, `/clear`, `/fork`, `/reset`, `/new`104- **Settings & tools:** `/config`, `/settings`, `/permissions`, `/model`,105 `/keybindings`, `/statusline`, `/tasks`, `/skills`, `/mcp`, `/open <path>`,106 `/usage`, `/logout`, `/agents`107- **Prompt helpers:** `@` path autocomplete, `esc esc` clears the prompt (when108 not streaming), `!` runs a terminal command directly, `?` opens help109110## Settings and permissions111112### Common settings keys (`settings.json`)113- `allowNonWorkspaceAccess`114- `colorScheme`115- `permissions.allow`116- `trustedWorkspaces`117118### Permission modes119`request-review`, `always-proceed`, `strict`, `proceed-in-sandbox`.120121### Sandbox behavior122- `enableTerminalSandbox` is a boolean in `settings.json`; default `false`.123- Launch-time overrides (`--sandbox`, `--dangerously-skip-permissions`) can124 supersede persistent settings for the current session.125126## Authentication behavior127128- The CLI tries the OS secure keyring first.129- With no saved session, it falls back to browser-based Google sign-in.130- Locally it opens the default browser; over SSH it prints an authorization URL131 and expects the auth code pasted back.132- `/logout` removes saved credentials.133134## Plugins135136- Plugins stage under `~/.gemini/antigravity-cli/plugins/<plugin_name>/`.137- They can bundle skills, agents, rules, MCP servers, and hooks.138- `agy plugin list` returning no imported plugins is a valid empty state.139140## Pitfalls141142- `agy help` shows wrapper commands, not interactive slash commands.143- `agy --version` is the safe non-interactive version check; `agy version` is144 interactive and can fail without a real TTY.145- First place to look for failures: `~/.gemini/antigravity-cli/log/cli-*.log`146 (read with `read_file`).147- Don't confuse persistent JSON settings with launch-time overrides.148- `~/.gemini/antigravity-cli/bin/agentapi` is a thin wrapper to `agy agentapi`.149- On WSL, token storage is file-based, so auth issues are usually local-file /150 session-state problems, not browser-only problems.151- Workspace identity can depend on launch directory and the `.antigravitycli`152 project marker.153154## Verification155156Confirm the install is real and usable, all through the `terminal` tool (read157files with `read_file`):1581591. `terminal(command="command -v agy")`1602. `terminal(command="agy --version")`1613. `terminal(command="agy help")`1624. `terminal(command="agy plugin list")`1635. `read_file` on `~/.gemini/antigravity-cli/settings.json`1646. `read_file` on the latest `~/.gemini/antigravity-cli/log/cli-*.log`1657. If needed, `read_file` on `~/.gemini/antigravity-cli/keybindings.json`166167## Support files168169- `references/cli-docs.md` — condensed notes from the getting-started, usage,170 and features docs.