Runs Antigravity CLI headlessly for repository analysis and coding tasks. Use when the user asks to delegate work to Antigravity CLI or compare its result with
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-code-mate-antigravity-b63f5135c3cd ,按照其中的说明把「code-mate-antigravity」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
command -v agy. If it is missing, stop and ask the user to install Antigravity CLI in Code Mate.agy -p "<prompt>" --output-format json
Pass the prompt as one quoted argument. Print mode waits up to --print-timeout (5m by default); pass a shorter value when the caller's own timeout is tighter.
Parse the JSON result and read its status field: anything other than a success status is a failure, and error carries the reason. Treat unparseable output as failure too. Never start interactive Antigravity or an authentication flow.
Antigravity refuses to run headlessly until it is signed in — it returns status: "ERROR" with authentication failed or timed out and tells you to run agy to log in. Do not do that: stop and ask the user to finish Antigravity setup in Code Mate. Never request, read, print, or copy credentials.
Headless mode inherits the permission mode persisted in user settings, and reading and writing files inside the active workspace are auto-approved by default — the default is not a read-only boundary, and a prompt cannot make it one. Do not run it against a writable project for a read-only task. Use a disposable or read-only copy instead. Run against the real project only when the user explicitly requests workspace changes, constrain the directory, and inspect the diff afterward. Never pass --dangerously-skip-permissions, which auto-approves every tool request including outside the workspace.
Example: for an approved edit, ask Antigravity to touch only named files, run it in that project, parse the response and any reported error, and inspect the resulting diff before reporting success.