DEV Community

Cover image for How to use Google Antigravity CLI inside Claude Code (without leaving your editor)
Chris
Chris

Posted on

How to use Google Antigravity CLI inside Claude Code (without leaving your editor)

I work in Claude Code most days. It's where my git, tests, edits, and
agent-assisted work happen, and the cost of leaving it for another tool
is real, context-switching breaks flow.

When Google shipped the Antigravity CLI (agy) a few weeks ago, I
wanted access to its capabilities: Gemini 3.1 Pro reasoning, the native Imagen tool, the built-in research and review flows. But I didn't want to abandon Claude Code to get them.

Antigravity plugin in Claude Code

What it does

The plugin adds six slash commands to Claude Code:

Command What it does
/agy:setup Verify install + auth, can install agy for you
/agy:ask "<prompt>" One-shot prompt; returns the raw response
/agy:delegate <task> Hand to a runner subagent (supports --background)
/agy:research <topic> Structured deep research
/agy:review [focus] Second-opinion review of current git diff
/agy:image <description> Generate an image via agy's built-in Imagen tool
/agy:help Index of every command, model alias, and canonical name

Most commands accept a --model <alias> flag, more on that in a
moment.

The model-flag problem

While building this I noticed something. The Antigravity CLI v1.0.2
doesn't have a --model flag.

$ agy -m claude-opus -p "hi"
flags provided but not defined: -m

$ agy --model "Claude Opus 4.6 (Thinking)" -p "hi"
flags provided but not defined: -model
Enter fullscreen mode Exit fullscreen mode

Model selection is TUI-only, you launch agy interactively and pick
your model with /model. That's fine when you're in the TUI, but it
means anything calling agy non-interactively is stuck with whatever
model was last picked.

I wanted per-call model selection from inside Claude Code. So I added
it in the plugin.

The mechanism, briefly: the wrapper takes a portable lockfile, swaps
the "model" field in agy's settings file for the duration of one
call, runs agy -p, then restores the original on exit, including
on SIGINT/SIGTERM. If a previous run got SIGKILLed, the next call
detects the orphaned backup and recovers automatically. Not magic,
just careful glue. The full implementation is in the repo for anyone
curious.

The user-facing surface is just:

/agy:delegate --model opus    refactor the auth module
/agy:ask      --model pro     "explain Go escape analysis"
/agy:research --model sonnet  --background  survey post-quantum TLS
Enter fullscreen mode Exit fullscreen mode

Eight models supported, 18 short aliases (opus, sonnet, pro, flash,
gpt-oss, etc.) plus the canonical TUI strings if you prefer.

Stack

Pure Bash. One wrapper script (~400 lines), one subagent definition,
six command markdown files. No Node runtime, no broker, no review
hooks. Bash 3.2 compatible (macOS native). Tested on macOS and Linux;
WSL2 should work the same way.

The whole repo is intentionally small. The Claude Code plugin
specification gives you most of what you need, slash commands,
subagents, skills, and the rest is just plumbing.

Install

In Claude Code:

/plugin marketplace add simplybychris/antigravity-plugin-cc
/plugin install agy@antigravity-cc
/reload-plugins
/agy:setup
Enter fullscreen mode Exit fullscreen mode

Then try /agy:help for the full index.

What's next

v0.4.1 is the first release with --model and /agy:help. Core works.
A short demo video is coming. I have ideas for further extensions but this surface is what I needed for my current use.

If you like this idea leaving a GitHub
star
would mean a lot. Issues and PRs welcome.

Top comments (0)