Antigravity CLI setup
Set up phone approvals for Antigravity CLI (agy) through its native hooks. Review supported shell commands, edits and MCP calls from your phone.
Updated
Antigravity CLI (agy) is the agent Google moved Google AI Pro, Ultra and free accounts to from Gemini CLI on 18 June 2026. Pushary gates it through agy's native hooks. Before agy runs a shell command, writes or edits a file, or calls an MCP tool, the call goes through your Pushary policy, and the risky ones wait for your answer on your phone.
See Antigravity CLI notifications and phone approvals for a comparison with local notifications and Google Remote Control.
Set it up
Install agy with Google's installer and start it once to sign in. Then run:
npx pushary@latest setupOn Windows PowerShell, run npx.cmd pushary@latest setup. The CLI needs Node.js 20.17+, 22.13+ or 23.5+.
Scan the QR code with your phone
Setup shows a QR code first. Scan it with your phone's camera or the Pushary app. Sign in or create an account, check that the code on your phone matches the one in your terminal, then tap Approve on Connect this computer? and allow notifications.
New accounts start a 3-day free trial, then pay $9.99 a month. A card is needed to start the trial. If this computer already has a Pushary key, setup reuses it and skips this step.
Pick Antigravity CLI
Setup asks Which agents do you use? with the agents it found already selected. Keep Antigravity CLI selected. To skip the question, run npx pushary@latest setup --agents antigravity_cli.
Answer the test question
Setup sends a test push, then a test question. Answer it on your phone. The terminal says You're set once your answer arrives.
Start a new agy session
agy loads hooks when a session starts. Run /hooks inside agy and check that pushary is listed.
On a Mac you can use Pushary Isle instead. Connecting your agents there wires agy the same way.
What setup changes on your computer
| File | What changes |
|---|---|
~/.gemini/config/hooks.json | Adds a hook named pushary for PreToolUse, PostToolUse and Stop. |
~/.gemini/config/mcp_config.json | Adds the Pushary MCP server (serverUrl, your key in an Authorization header). |
~/.gemini/antigravity-cli/settings.json | Sets "toolPermission": "always-proceed", only if you never chose a mode there. |
~/.pushary/setup/antigravity-tool-permission.json | A record of that change, so disconnecting can put your setting back. |
~/.pushary/config.json and ~/.pushary/env | Your API key. Your shell profile gets one line that loads ~/.pushary/env, so new terminals have PUSHARY_API_KEY and the profile itself holds no key. |
What each hook does
| Event | What happens |
|---|---|
PreToolUse | The approval gate. The kill switch and always-deny rules block here. Other gated calls go to your phone and run only if you approve. |
PostToolUse | Records tool_complete or tool_error for the session. |
Stop | Marks the session's turn finished in your session list. |
Which tool calls Pushary can approve
In the request-review Tool Permission preset, agy can still require its own review after a hook allows a call. If you have no saved Tool Permission preset, setup sets "toolPermission": "always-proceed" so Pushary can decide the calls it gates. Start a new session with plain agy.
agy 1.5.7 uses Auto as the default Agent Mode for eligible accounts, including headless runs. Agent Mode and Tool Permission are separate settings. The strict preset still wins over Auto and accept-edits. Organization-required review cannot be waived by a hook or a broad allow rule.
The CLI hook asks your phone for each call gated by Pushary policy, even while you sit at your computer. With the Mac app, the question can also show in the notch.
If you already chose a mode, such as strict, Pushary leaves it alone and tells you so. A native review may still be required. If you want Pushary to handle supported approvals, verify the hook first and choose always-proceed where your organization allows it.
| Your answer | What agy does |
|---|---|
| Approve | Pushary lets the call through its gate. agy can still apply protected-command or administrator checks. |
| Deny | Blocks the call. The model sees the reason. |
| No answer before your rule's wait ends | Blocks the call with a reason, unless your rule is set to Always and approves on timeout. |
Pushary answers agy only with allow or deny. In always-proceed mode agy runs a hook's "ask" without prompting, so a call that would go back to the terminal with another agent is blocked here instead. For the same reason, the pushary hook (1.9.14 or later) treats When away like Always for agy: your phone is asked about every gated call, even while you are at the keyboard, and it waits for your policy's timeout, not the short push window. With phone calls on for you, the wait on your own approvals is raised so a call can ring and finish before agy stops waiting.
Check that it works
npx pushary@latest doctorDoctor checks your key and plan, then agy's hooks and MCP server. It sends a real test push. Add --roundtrip to send a test question too.
Then ask agy: Create a file called pushary-test.txt that says hello. Your phone buzzes with the write request. Tap Approve and the file appears.
What Pushary can and cannot enforce on agy
agy's tools have their own names, so Pushary maps them onto your existing rules:
| agy tool | Pushary rule |
|---|---|
run_command | Bash |
run_workflow | Bash, judged as python3 -c with the whole workflow script |
write_file, write_to_file | Write |
edit_file, replace_file_content, multi_replace_file_content | Edit |
manage_task sending input | Bash, judged on the text it sends |
call_mcp_tool | mcp__<server>__<tool> |
A rule you set for Bash also gates run_command and the text agy sends to a command it left running. Safe read-only commands such as ls run without a question. Sending blank input, such as pressing Enter, asks your phone under the name TaskInput. Listing, checking and stopping agy's own background tasks run without a question.
A workflow script from run_workflow runs in agy's own Python and can run commands and write files itself, where no other hook sees it. So Pushary judges the whole script before it starts, as the same code run with python3 -c, and your phone shows it as that command. Under the default rules it asks. A Bash rule that covers python3 -c, such as Bash(python3:*), or a preset that lets shell commands run, lets it run, as it would for run_command. Activity does not record when a workflow finishes. The subagents a workflow starts call agy's tools, and those calls go through the same hook.
- Blocks rather than guesses. A call Pushary cannot decide, because Pushary is offline, signed out or your subscription has ended, is blocked with a reason. While Pushary is offline, agy's shell commands, edits and MCP calls stop. Reading files still works.
- Leftover hook. If Pushary is removed without disconnecting agy first, its approval hook still runs and blocks each call with a message that says how to undo it.
- Not gated: file reads (
read_file,view_file), reading a web page (read_url_content) and web search. The Antigravity desktop app's browser and deploy tools are left to its own prompt. - Kill switch: blocks every gated call, but cannot end the agy session itself.
- Shared file:
~/.gemini/config/hooks.jsonis shared with the Antigravity desktop app. Pushary is tested with the CLI.
Turn it off
npx pushary@latest disconnect antigravityThis removes the pushary hook and the Pushary MCP server, and puts toolPermission back if Pushary set it. Your other hooks, servers and settings stay as they are. Turning agy off in the Mac app does the same.
Troubleshooting
agy still asks in its own prompt
Check Tool Permission in /config and confirm the pushary hook is loaded. Pushary preserves a preset you chose. For a supported call, choose always-proceed if your organization allows it. Protected commands and administrator-required review can still prompt. Use /permissions to see your allow, ask and deny rules.
Every call is blocked
Pushary cannot decide the call. Run npx pushary@latest doctor to check your key and plan. If you removed Pushary, run npx pushary@latest disconnect antigravity to remove the leftover hook.
A file write or a workflow runs without reaching your phone
Update the Pushary hook and start a new AGY session. AGY builds that send
write_file, edit_file or run_workflow need the updated matcher. If you installed through
the CLI, rerun npx pushary@latest setup --agents antigravity_cli. If you connected
through Pushary Isle, update the Mac app and repair the Antigravity connection.
Check that your Pushary rule asks for Write and Edit, then retry in a scratch workspace.
pushary is missing from /hooks
Start a new agy session. If it is still missing, run npx pushary@latest setup --agents antigravity_cli again.
Next steps
Set your approval rules
Choose which actions run on their own and which wait for you.
Antigravity CLI dangerously skip permissions
agy's flag, its toolPermission presets, and Gemini CLI's yolo mode.
agy auto mode
What Auto mode still asks, how to make it the default, and why agy can say it is not available.
Supported agents
Every agent Pushary gates, and how.