anotifier / antigravity-cli
Antigravity CLI logo

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.

$ npx anotifier@latest setup

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.

[ HOW IT HOOKS IN ]

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.
[ WHAT SETUP WRITES ]

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.

[ GOOD TO KNOW ]

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, PostInvocation and Stop, so anotifier sends no needs-input alert for it.
  • For permission and question alerts, use Antigravity's own setting. notifications in ~/.gemini/antigravity-cli/settings.json (default false, 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, or fullyIdle, so every Stop alerts.
  • 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 AfterAgent or Notification event. 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.
[ CHANNELS ]

Every channel you'd actually use.

[+] Desktop toasts macOS, Windows, Linux + WSL routing.
[+] Phone push Android & iOS via ntfy — no account.
[+] Webhooks Slack, Discord, Telegram, any HTTP endpoint.
[+] Terminal bell A ding in the terminal the agent runs in.
[+] Click-to-focus On Windows, a click on the toast brings the project's window forward.
[+] Zero npm dependencies Plain Node.js 18+, one shared config.
[ CHECK IT, UNDO IT ]

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 added

test 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/.

[ FAQ ]

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.

[ GUIDES ]

Every option, explained.

[ ALSO WORKS WITH ]

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.