anotifier for Antigravity CLI.
Antigravity CLI runs long agent sessions in your terminal. anotifier adds a Stop hook to its hooks file, so a desktop toast, phone push or webhook tells you the moment a run ends.
Supported from anotifier 1.4.0. Hook wiring and payload parsing are unit-tested against Google's hooks docs. anotifier has not yet been tested against a live Antigravity CLI.
Comparing options first? How to get notified when Antigravity CLI finishes covers every method, built-in and DIY.
Wired into Antigravity CLI itself.
Setup adds one group named anotifier to Antigravity's global hooks file, ~/.gemini/config/hooks.json. Antigravity runs the handler itself when the event fires, so there is no extension and no wrapper process.
StopA run endedTitled my-app · Antigravity, with the body my-app: Task complete. The project name is the name of the first folder listed in workspacePaths. The hook always answers {"decision":"stop"}, so it can never keep the agent running.One group in ~/.gemini/config/hooks.json.
Setup wires Antigravity CLI only when a ~/.gemini/antigravity-cli folder exists. If hooks.json already exists, setup copies it to ~/.anotifier/backups/, then adds a top-level group named anotifier beside any groups of your own. The Stop handler takes its timeout in seconds, and the payload names no event, so setup passes --event Stop:
{
"anotifier": {
"Stop": [
{
"type": "command",
"command": "node \"/path/to/anotifier/src/notify.mjs\" --source antigravity --event Stop",
"timeout": 30
}
]
}
}Run setup again after an update and it keeps a group you muted with "enabled": false and a timeout you changed on the handler. Google's docs say the Antigravity 2.0 app and the Antigravity IDE read the same global ~/.gemini/config/hooks.json, so a handler setup wrote should fire there too. But setup only wires Antigravity when ~/.gemini/antigravity-cli exists, and neither app has been tested.
What it does, and what it doesn't.
- One alert type: finished. Antigravity's hooks have no notification or permission event. Its events are
SessionStart,PreToolUse,PostToolUse,PreInvocation,PostInvocationandStop, so anotifier sends no needs-input alert for it. - For permission and question alerts, use Antigravity's own setting.
notificationsin~/.gemini/antigravity-cli/settings.json(defaultfalse, or toggle it in/config) gives a desktop notification and a terminal bell when a task completes or needs your attention, and for questions since CLI 1.3.1. Setup does not touch it. See the Antigravity CLI notifications guide. - A failed or cancelled run also says "Task complete". anotifier does not read
terminationReason, whose values are not fully documented, orfullyIdle, so everyStopalerts. - The text is generic. anotifier does not read the transcript for Antigravity, so the alert never quotes what the agent said.
- Gemini CLI hooks don't apply. Antigravity has no
AfterAgentorNotificationevent. If you also use Gemini CLI, see the Gemini CLI page. - Not tested against a live Antigravity CLI yet. The unit tests follow Google's hooks docs; there is no live Antigravity lane in CI.
Every channel you'd actually use.
Test it, then keep it or remove it.
npx anotifier@latest test # fire a test alert on every channel
npx anotifier@latest status # show which agents and channels are set up
npx anotifier@latest doctor # diagnose a channel that stays quiet
npx anotifier@latest uninstall # remove the hooks setup addedtest sends straight to your channels without going through Antigravity CLI, so it proves the channels work. uninstall removes only the entries anotifier added and restores your statusline (1.5.0 and later), and setup keeps a copy of every file it changes in ~/.anotifier/backups/.
Antigravity CLI questions, answered.
Does anotifier work with Antigravity CLI?
Yes, from anotifier 1.4.0. npx anotifier setup adds a Stop handler to ~/.gemini/config/hooks.json and you get a “Task complete” alert on your desktop, phone or webhook when a run ends. The hook wiring and payload parsing are unit-tested against Google's hooks docs; anotifier has not yet been tested against a live Antigravity CLI.
When does setup wire Antigravity CLI?
When a ~/.gemini/antigravity-cli folder exists. Gemini CLI is detected separately, so a machine with both gets both sets of hooks.
Will I be told when Antigravity CLI is waiting for permission?
Not from anotifier. Antigravity's hooks have no notification or permission event, so there is nothing for anotifier to hook and it reports finished runs only. Antigravity's own notifications setting does alert for permission prompts, and for questions since CLI 1.3.1: set it to true in ~/.gemini/antigravity-cli/settings.json or toggle it in /config. See the Antigravity CLI notifications guide.
Why does a failed or cancelled run say "Task complete"?
anotifier does not read terminationReason or fullyIdle from the Stop payload, so every stop alerts and the text is the same. A missed alert costs more than an early one.
Does it work in the Antigravity 2.0 app and the IDE?
Google's docs say both read the same global ~/.gemini/config/hooks.json, so the handler should fire when they finish too. But setup only wires Antigravity when ~/.gemini/antigravity-cli exists, and neither app has been tested.
Can the hook keep Antigravity from stopping?
No. A Stop hook that answers continue sends the agent back into its loop. anotifier always answers {"decision":"stop"}, even when a channel fails or the run is silenced, so it can never keep a run going.
How do I remove it?
Run npx anotifier@latest uninstall. It removes only the handlers anotifier added to hooks.json; your own groups stay.
Every option, explained.
- How to get notified when Antigravity CLI finishesGet Antigravity notifications for the CLI, app and IDE: the CLI's built-in notifications setting, or a Stop hook with toast, sound and ntfy phone push.
- How agent hooks power your notificationsWhich hook events Claude Code, Codex CLI, Cursor and Gemini CLI fire when they finish or need you, where each is configured, and what anotifier writes.
- Notifications not arriving? Work through this listNot getting alerts from Claude Code, Codex, Cursor or Gemini CLI? Check hooks, restarts, snooze, quiet hours, toast backends and ntfy, in that order.
- Claude Code ntfy: push to your phone when the agent finishesClaude Code ntfy setup: install the ntfy app, run npx anotifier setup, or add a Stop hook with curl. Private topics, self-hosting, priority and fixes.
One config, every agent.
Every command and config key is in the docs.
Full feature tour, demo video, and install options on the anotifier home page.