Antigravity CLI (agy)
Operator guide for the Antigravity CLI, invoked as agy. Run all agy
commands through the Hermes 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 Hermes 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.
Delegation patterns
agy is a coding-agent backend in the same family as codex / claude-code,
so the same delegation shapes apply. Use these when handing real work (features,
fixes, reviews, second opinions) to Antigravity rather than just smoke-testing.
One-shot (preferred for scripted prompts and second opinions)
terminal(command="agy -p 'Review this diff for bugs and security issues' --model 'Gemini 3.1 Pro (High)'", workdir="/path/to/repo", timeout=300)
-p is non-interactive: it runs the prompt and exits. Pick the engine with
--model (run agy models for the exact display strings, e.g.
'Gemini 3.1 Pro (High)', 'Claude Opus 4.6 (Thinking)'). Add extra context
roots with repeatable --add-dir.
Long / bounded runs (tests, builds, multi-file changes)
Background it and get notified on completion, the same as the codex skill:
terminal(command="agy -p 'Implement the change described in TASK.md and run the tests' --dangerously-skip-permissions", workdir="/path/to/repo", background=true, notify_on_complete=true)
# then: process(action="poll"/"log"/"wait", session_id=<id>)
Interactive multi-turn (PTY + tmux)
For a conversational session, launch agy -i (or bare agy) under pty=true
with tmux for capture-pane / send-keys, exactly the pattern documented in
the codex / claude-code skills. Resume later with --continue / -c or a
specific --conversation <id>.
Parallel instances (batch sub-issue / worktree fan-out)
Create one git worktree per task and launch an independent agy -p in each
(background), then collect results — same worktree fan-out the codex skill
uses for batch issue fixing. Bound concurrency to what the machine and your
review capacity can absorb.
Output + bounding caveat (differs from Claude Code)
agy -p returns plain text — there is no --output-format json and
no result envelope with session_id / cost / turn count. Parse stdout
directly; don't expect a JSON object.
- There is no
--max-turns. A print run is bounded by --print-timeout
(default 5m). Raise it for long tasks: --print-timeout 20m. Pair with the
terminal timeout= so the outer call doesn't cut the run short.
Orchestration boundary
Antigravity is a worker execution backend or third-opinion reviewer — an
execution detail owned by the agent/profile running a task, NOT a first-class
orchestration primitive. Do not put agy on a kanban board as its own card or
treat it as a coordination layer; route work through the normal task graph and
let the assigned worker choose agy (vs. codex/claude-code/direct tools) as its
method. Reach for it explicitly only when the user asks, when a worker is
configured to wrap it, or when you want a Gemini-family cross-check against
another agent's plan or diff.
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.
agy -p prints plain text only — no --output-format json, no result
envelope. Don't try to parse a JSON object out of it (unlike claude-code).
- Bound print runs with
--print-timeout (default 5m), not --max-turns
(which does not exist on agy).
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.
Source: NousResearch/hermes-agent → optional-skills/autonomous-ai-agents/antigravity-cli/SKILL.md
1---2name: antigravity-cli3description: "Operate the Antigravity CLI (agy): plugins, auth, sandbox."4category: ai-agents-and-harness5source_repo: NousResearch/hermes-agent6source_path: "optional-skills/autonomous-ai-agents/antigravity-cli/SKILL.md"7source_url: https://github.com/NousResearch/hermes-agent/blob/HEAD/optional-skills/autonomous-ai-agents/antigravity-cli/SKILL.md8---91011# Antigravity CLI (`agy`)1213Operator guide for the Antigravity CLI, invoked as `agy`. Run all `agy`14commands through the Hermes `terminal` tool; inspect its config and logs with15`read_file`. This skill is reference + procedure — it does not wrap a network16API, so there is nothing to authenticate from Hermes itself.1718## When to Use1920- Installing, updating, or smoke-testing the `agy` binary21- Driving non-interactive `agy --print` / `agy -p` one-shots22- Debugging Antigravity auth, sandbox, permissions, or plugin state23- Reading Antigravity settings, keybindings, conversations, or logs2425## Mental model2627Antigravity has two layers — keep them distinct or the guidance will be wrong:28291. **Shell wrapper commands** — `agy help`, `agy install`, `agy plugin`,30 `agy update`, `agy changelog`. Run these through the `terminal` tool.312. **Interactive in-session slash commands** — `/config`, `/permissions`,32 `/skills`, `/agents`, etc. These only exist inside a running `agy` TUI33 session, not on the shell wrapper.3435`agy help` shows the shell wrapper surface, NOT the in-session slash commands.3637## Prerequisites3839- The `agy` binary on PATH. Verify through the `terminal` tool:40 `command -v agy && agy --version`.41- No env vars or API keys required by this skill — Antigravity manages its own42 auth via the OS keyring / browser sign-in (see Authentication below).4344## How to Run4546Invoke every `agy` command through the `terminal` tool. Examples:4748```49terminal(command="agy --version")50terminal(command="agy help")51terminal(command="agy plugin list")52terminal(command="agy --print 'Summarize the repo in 3 bullets'", workdir="/path/to/project")53```5455For an interactive multi-turn TUI session, launch `agy` with `pty=true` (and56tmux for capture/monitoring), the same pattern the `codex` / `claude-code`57skills use. For one-shot smoke tests and scripted prompts, prefer58`agy --print` (non-interactive).5960To inspect Antigravity's own files, use `read_file` on the paths under Core61paths below — do not `cat` them through the terminal.6263## Delegation patterns6465`agy` is a coding-agent backend in the same family as `codex` / `claude-code`,66so the same delegation shapes apply. Use these when handing real work (features,67fixes, reviews, second opinions) to Antigravity rather than just smoke-testing.6869### One-shot (preferred for scripted prompts and second opinions)7071```72terminal(command="agy -p 'Review this diff for bugs and security issues' --model 'Gemini 3.1 Pro (High)'", workdir="/path/to/repo", timeout=300)73```7475`-p` is non-interactive: it runs the prompt and exits. Pick the engine with76`--model` (run `agy models` for the exact display strings, e.g.77`'Gemini 3.1 Pro (High)'`, `'Claude Opus 4.6 (Thinking)'`). Add extra context78roots with repeatable `--add-dir`.7980### Long / bounded runs (tests, builds, multi-file changes)8182Background it and get notified on completion, the same as the `codex` skill:8384```85terminal(command="agy -p 'Implement the change described in TASK.md and run the tests' --dangerously-skip-permissions", workdir="/path/to/repo", background=true, notify_on_complete=true)86# then: process(action="poll"/"log"/"wait", session_id=<id>)87```8889### Interactive multi-turn (PTY + tmux)9091For a conversational session, launch `agy -i` (or bare `agy`) under `pty=true`92with tmux for `capture-pane` / `send-keys`, exactly the pattern documented in93the `codex` / `claude-code` skills. Resume later with `--continue` / `-c` or a94specific `--conversation <id>`.9596### Parallel instances (batch sub-issue / worktree fan-out)9798Create one git worktree per task and launch an independent `agy -p` in each99(background), then collect results — same worktree fan-out the `codex` skill100uses for batch issue fixing. Bound concurrency to what the machine and your101review capacity can absorb.102103### Output + bounding caveat (differs from Claude Code)104105- `agy -p` returns **plain text** — there is **no `--output-format json`** and106 no result envelope with `session_id` / cost / turn count. Parse stdout107 directly; don't expect a JSON object.108- There is **no `--max-turns`**. A print run is bounded by **`--print-timeout`**109 (default `5m`). Raise it for long tasks: `--print-timeout 20m`. Pair with the110 `terminal` `timeout=` so the outer call doesn't cut the run short.111112### Orchestration boundary113114Antigravity is a **worker execution backend or third-opinion reviewer** — an115execution detail owned by the agent/profile running a task, NOT a first-class116orchestration primitive. Do not put `agy` on a kanban board as its own card or117treat it as a coordination layer; route work through the normal task graph and118let the assigned worker choose `agy` (vs. codex/claude-code/direct tools) as its119method. Reach for it explicitly only when the user asks, when a worker is120configured to wrap it, or when you want a Gemini-family cross-check against121another agent's plan or diff.122123## Core paths124125- Binary / entrypoint: `agy`126- App data dir: `~/.gemini/antigravity-cli/`127- Settings file: `~/.gemini/antigravity-cli/settings.json`128- Keybindings file: `~/.gemini/antigravity-cli/keybindings.json`129- Logs: `~/.gemini/antigravity-cli/log/cli-*.log`130- Conversations: `~/.gemini/antigravity-cli/conversations/`131- Brain artifacts: `~/.gemini/antigravity-cli/brain/`132- History: `~/.gemini/antigravity-cli/history.jsonl`133- Plugin staging: `~/.gemini/antigravity-cli/plugins/<plugin_name>/`134135## Quick Reference136137### Wrapper commands138- `agy changelog`139- `agy help`140- `agy install`141- `agy plugin` / `agy plugins`142- `agy update`143144### Useful flags145- `--add-dir`146- `--continue` / `-c`147- `--conversation`148- `--dangerously-skip-permissions`149- `--print` / `-p`150- `--print-timeout`151- `--prompt`152- `--prompt-interactive` / `-i`153- `--sandbox`154- `--log-file`155- `--version`156157### Plugin subcommands (`agy plugin --help`)158- `list`, `import [source]`, `install <target>`, `uninstall <name>`,159 `enable <name>`, `disable <name>`, `validate [path]`, `link <mp> <target>`,160 `help`161162### Install flags (`agy install --help`)163- `--dir`, `--skip-aliases`, `--skip-path`164165### In-session slash commands166- **Conversation control:** `/resume` (`/switch`), `/rewind` (`/undo`),167 `/rename <name>`, `/clear`, `/fork`, `/reset`, `/new`168- **Settings & tools:** `/config`, `/settings`, `/permissions`, `/model`,169 `/keybindings`, `/statusline`, `/tasks`, `/skills`, `/mcp`, `/open <path>`,170 `/usage`, `/logout`, `/agents`171- **Prompt helpers:** `@` path autocomplete, `esc esc` clears the prompt (when172 not streaming), `!` runs a terminal command directly, `?` opens help173174## Settings and permissions175176### Common settings keys (`settings.json`)177- `allowNonWorkspaceAccess`178- `colorScheme`179- `permissions.allow`180- `trustedWorkspaces`181182### Permission modes183`request-review`, `always-proceed`, `strict`, `proceed-in-sandbox`.184185### Sandbox behavior186- `enableTerminalSandbox` is a boolean in `settings.json`; default `false`.187- Launch-time overrides (`--sandbox`, `--dangerously-skip-permissions`) can188 supersede persistent settings for the current session.189190## Authentication behavior191192- The CLI tries the OS secure keyring first.193- With no saved session, it falls back to browser-based Google sign-in.194- Locally it opens the default browser; over SSH it prints an authorization URL195 and expects the auth code pasted back.196- `/logout` removes saved credentials.197198## Plugins199200- Plugins stage under `~/.gemini/antigravity-cli/plugins/<plugin_name>/`.201- They can bundle skills, agents, rules, MCP servers, and hooks.202- `agy plugin list` returning no imported plugins is a valid empty state.203204## Pitfalls205206- `agy help` shows wrapper commands, not interactive slash commands.207- `agy --version` is the safe non-interactive version check; `agy version` is208 interactive and can fail without a real TTY.209- First place to look for failures: `~/.gemini/antigravity-cli/log/cli-*.log`210 (read with `read_file`).211- Don't confuse persistent JSON settings with launch-time overrides.212- `~/.gemini/antigravity-cli/bin/agentapi` is a thin wrapper to `agy agentapi`.213- On WSL, token storage is file-based, so auth issues are usually local-file /214 session-state problems, not browser-only problems.215- Workspace identity can depend on launch directory and the `.antigravitycli`216 project marker.217- `agy -p` prints plain text only — no `--output-format json`, no result218 envelope. Don't try to parse a JSON object out of it (unlike `claude-code`).219- Bound print runs with `--print-timeout` (default `5m`), not `--max-turns`220 (which does not exist on `agy`).221222## Verification223224Confirm the install is real and usable, all through the `terminal` tool (read225files with `read_file`):2262271. `terminal(command="command -v agy")`2282. `terminal(command="agy --version")`2293. `terminal(command="agy help")`2304. `terminal(command="agy plugin list")`2315. `read_file` on `~/.gemini/antigravity-cli/settings.json`2326. `read_file` on the latest `~/.gemini/antigravity-cli/log/cli-*.log`2337. If needed, `read_file` on `~/.gemini/antigravity-cli/keybindings.json`234235## Support files236237- `references/cli-docs.md` — condensed notes from the getting-started, usage,238 and features docs.239240---241242**Source:** [`NousResearch/hermes-agent`](https://github.com/NousResearch/hermes-agent) → `optional-skills/autonomous-ai-agents/antigravity-cli/SKILL.md`