Use Google Antigravity's terminal coding agent (agy) from inside Claude Code. Delegate tasks, ask one-shot questions, and review code — all without leaving your Claude Code session.
Unofficial. This is a community wrapper. It is not affiliated with, endorsed by, or supported by Google or Anthropic. "Antigravity", "Gemini", and "Claude" are trademarks of their respective owners.
This project mirrors the structure of openai/codex-plugin-cc, but wraps the Antigravity CLI instead of Codex.
| Command | What it does |
|---|---|
/antigravity:rescue [task] |
Delegate a coding task to Antigravity (read + edit files in the repo) via a forwarding subagent. |
/antigravity:ask [question] |
One-shot, read-only question to Antigravity. |
/antigravity:review [--base <ref>] |
Have Antigravity review your current git diff (read-only). |
/antigravity:setup |
Check that agy is installed and authenticated. |
There's also an antigravity:antigravity-rescue subagent that Claude can invoke proactively to hand off substantial work.
-
Node.js (the companion script is plain ESM, no dependencies).
-
The Antigravity CLI (
agy), installed and authenticated:# macOS / Linux curl -fsSL https://antigravity.google/cli/install.sh | bash # Windows PowerShell irm https://antigravity.google/cli/install.ps1 | iex
Then run
agyonce and complete Google Sign-In, or setGEMINI_API_KEY/ANTIGRAVITY_API_KEY.
Run /antigravity:setup from Claude Code to verify both.
Add this repo as a plugin marketplace, then install the antigravity plugin:
/plugin marketplace add TolyK/antigravity-plugin-cc
/plugin install antigravity@antigravity-cc
(Or clone the repo and add it as a local marketplace with /plugin marketplace add ./antigravity-plugin-cc.)
/antigravity:setup
/antigravity:ask how does the auth middleware in this repo work?
/antigravity:rescue add input validation to the signup handler and a test for it
/antigravity:review --base main
/antigravity:rescue is write-capable by default — Antigravity may edit files. Pass --read-only for a no-edit pass. /antigravity:ask and /antigravity:review are always read-only.
Antigravity's headless print mode — agy -p "<prompt>" — is built for a TTY. When it runs under a non-TTY stdout, which is exactly how Claude Code's Bash tool invokes commands, the response can silently vanish even though the process exits 0.
To work around this, the companion script (plugins/antigravity/scripts/agy-companion.mjs) runs agy under a pseudo-TTY via the system script utility, then strips ANSI/carriage-return noise so Claude Code receives clean text:
- macOS/BSD:
script -q /dev/null agy -p …(exec form, no shell — injection-safe). - Linux (util-linux):
script -qec "agy -p …" /dev/nullwith shell-quoted args. - Windows / no
script: falls back to invokingagydirectly.
Everything is a thin pass-through: the commands and subagent return Antigravity's output verbatim.
Free-form prompts are never interpolated into a shell command. The slash commands and subagent pass your text to the companion on stdin via a single-quoted heredoc (<<'EOF'), so $(…), backticks, ;, and other metacharacters stay inert. Only a small, fixed set of flags (--model, --add-dir, --base, …) is ever passed as argv, and the companion validates that each value flag is followed by an actual value. On timeout, the companion kills the whole script+agy process group, not just the wrapper.
The companion (agy-companion.mjs <ask|task|review|setup>) accepts:
| Flag | Meaning |
|---|---|
--stdin |
Read the prompt/focus text from stdin instead of argv (how the commands pass free-form text safely — see below). |
--model, -m <name> |
Pass a specific model to agy (best effort). |
--add-dir <path> |
Add an extra directory to the Antigravity workspace. |
--cwd <path> |
Working directory for the run. |
--resume, -c |
Continue the most recent Antigravity conversation. |
--conversation <id> |
Resume a specific conversation. |
--read-only |
Forbid file edits (default for ask/review). |
--timeout <seconds> |
Hard-kill the run after N seconds (default 600). |
--base <ref> |
(review only) diff against <ref> instead of the working tree. |
Note on
agyflags: Antigravity's CLI is young and its flags have shifted between releases (e.g.--output-formathas come and gone). The companion only relies on the stable-pprint mode and passes optional flags through best-effort. If a flag is rejected by youragyversion, drop it. PRs welcome to track changes.
antigravity-plugin-cc/
├── .claude-plugin/marketplace.json # marketplace manifest
└── plugins/antigravity/
├── .claude-plugin/plugin.json # plugin manifest
├── commands/ # /antigravity:rescue|ask|review|setup
├── agents/antigravity-rescue.md # forwarding subagent
└── scripts/agy-companion.mjs # the bridge to `agy`