Command reference ยท Antigravity CLI
agy -p / --print
Runs a prompt non-interactively and exits afterward (print/headless mode).
agy -p or --print "<prompt>" runs a single prompt without the TUI, suited for git hooks, scripts, and shell pipelines. Since 1.1.1 the mode writes server errors to stderr and returns a non-zero exit code instead of silently exiting empty; since 1.1.2 it hard-fails with a non-zero exit code and a list of available models when --model can't be resolved, instead of silently falling back to the default model. It can be combined with -c or --conversation <id> to continue an existing conversation.
๐ฌ AS A SHORT VIDEO
Runs a prompt non-interactively and exits afterward (print/headless mode).
โ WHEN TO USE IT?
Wire Antigravity into a script or git hook
agy -p "Review this git diff and draft a conventional commit message" --cwd $(pwd)
Continue a previous conversation non-interactively
agy -c -p "summarize where things stand"
โ WHEN NOT TO?
You want to steer the run interactively or answer follow-up questions live
Print mode runs straight through with no TUI and no interactive follow-up questions.
Better: Start agy without -p for the normal interactive TUI
SOURCES
- Antigravity CLI Doku: Best Practices โ antigravity.google
- Antigravity CLI CHANGELOG (GitHub) โ raw.githubusercontent.com