Gemini CLI chews through long agentic runs in your terminal. anotifier hooks its agent events so the finish line — or a prompt that blocks it — reaches you wherever you are.
Gemini CLI or Antigravity CLI? On June 18, 2026 Google stopped serving Gemini CLI to Google AI Pro and Ultra subscribers and free Gemini Code Assist users, and moved them to Antigravity CLI. Gemini CLI still runs with a Gemini API key or a Code Assist Standard or Enterprise license, and that is what anotifier hooks. anotifier 1.4.0 and later also support Antigravity CLI.
Comparing options first? How to get notified when Gemini CLI finishes covers every method, built-in and DIY.
Setup registers two hooks in Gemini CLI's settings file, ~/.gemini/settings.json, so the alerts come from Gemini itself, not from polling.
AfterAgentThe agent loop finishedTitled frontend · Gemini, with the body frontend: Task complete. anotifier doesn't read Gemini's reply, so the text is the same every time.NotificationGemini CLI raised a notificationfrontend: Needs your input, sent urgent. Every notification Gemini CLI sends, such as a tool approval prompt, becomes this alert; anotifier doesn't filter by type.Setup wires Gemini CLI when a ~/.gemini folder exists. It backs up settings.json to ~/.anotifier/backups/ and adds one entry per event. Gemini CLI takes the timeout in milliseconds:
{
"hooks": {
"AfterAgent": [
{
"hooks": [
{
"type": "command",
"command": "node \"/path/to/anotifier/src/notify.mjs\" --source gemini",
"timeout": 30000
}
],
"_managed_by": "anotifier"
}
]
}
}Notification gets an identical entry. Older anotifier versions wrote a separate ~/.gemini/hooks.json; setup removes those stale entries, because Gemini CLI reads hooks from settings.json.
Antigravity CLI keeps hooks, in a new format. It reads them from its own files, such as ~/.gemini/config/hooks.json or a workspace's .agents/hooks.json, and its events are SessionStart, PreToolUse, PostToolUse, PreInvocation, PostInvocation and Stop. There is no AfterAgent or Notification event, so the hooks anotifier writes for Gemini CLI don't fire there. anotifier 1.4.0 and later wire Antigravity CLI separately: run npx anotifier setup and, when ~/.gemini/antigravity-cli exists, it adds one group named anotifier with a Stop handler to ~/.gemini/config/hooks.json, beside any groups of your own, after backing up an existing file. A finished run sends "Task complete", titled <project> · Antigravity. Google's Antigravity hooks docs describe the format.
Limits: Antigravity's hooks have no notification or permission event, so anotifier sends no needs-input alert for it, and a Stop caused by an error or a cancel also says "Task complete". For permission and question alerts, turn on Antigravity's own notifications setting, covered in the Antigravity CLI notifications guide. 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. Hook wiring and payload parsing are unit-tested against Google's hooks docs; anotifier has not yet been tested against a live Antigravity CLI.
The full Antigravity CLI setup, limits and FAQ are on the Antigravity CLI page, and the Antigravity CLI notifications guide covers the built-in setting and writing the hook yourself. The Gemini CLI entries stay in ~/.gemini/settings.json until you remove them with npx anotifier@latest uninstall, which removes only the handlers anotifier added to the Antigravity file.
AfterAgent hook delivers a real ntfy push.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 Gemini 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/.
Gemini CLI supports lifecycle hooks in ~/.gemini/settings.json. anotifier setup registers AfterAgent (the run finished) and Notification (Gemini needs attention) there, after backing the file up, and routes both to your channels.
Yes, from anotifier 1.4.0. Antigravity CLI has no AfterAgent or Notification event, so the Gemini CLI hooks don't fire there; instead npx anotifier setup adds an anotifier group with a Stop handler to ~/.gemini/config/hooks.json when ~/.gemini/antigravity-cli exists. You get a "Task complete" alert. anotifier sends no needs-input alert, because Antigravity hooks have no such event; Antigravity's own notifications setting covers permission prompts and questions. A stop caused by an error or cancel also says "Task complete", and it has not yet been tested against a live Antigravity CLI.
With a Gemini API key or a Gemini Code Assist Standard or Enterprise license, yes; anotifier's CI still runs Gemini CLI with an API key. Google stopped serving it to Google AI Pro and Ultra subscribers and free Code Assist users on June 18, 2026, and points them to Antigravity CLI.
No. The body is my-app: Task complete or my-app: Needs your input, with the project in the title. Only Claude Code alerts carry the agent's own words.
macOS, Windows, and Linux/WSL desktop toasts, Android and iOS push via ntfy, plus webhooks for Slack, Discord, Telegram, or any HTTP endpoint.
Every command and config key is in the docs.
Full feature tour, demo video, and install options on the anotifier home page.