A Gemini CLI extension that provides desktop system notifications when the agent requires attention (e.g., waiting for tool permissions).
- Native Terminal Notifications: Supports modern terminals (Ghostty, iTerm2, Kitty, VSCode) via OSC escape codes.
- OS Fallback: Falls back to system-level notifications (
osascripton macOS,notify-sendon Linux) if the terminal is not supported. - Zero Config: Works out of the box with the Gemini CLI
Notificationhook.
The extension attempts to send native terminal notifications (OSC 9) for the following:
- Ghostty
- iTerm2
- Kitty
- VS Code Terminal
- Apple Terminal
If the terminal is not detected or supported, the extension attempts to use OS utilities:
- macOS: Uses
osascript(built-in). - Linux: Uses
notify-send.- Requirement: Ensure
libnotify-bin(Debian/Ubuntu) orlibnotify(Arch/Fedora) is installed. - Test with:
notify-send "Test" "Message"
- Requirement: Ensure
This extension is typically installed via the Gemini CLI extensions manager.
gemini extensions install https://github.com/thoreinstein/gemini-notifier
# OR linked locally
gemini extensions link .- The extension registers a Notification hook with the Gemini CLI.
- When the CLI emits a
ToolPermissionevent (Agent waiting for user), the hook triggers. - The script (
src/notify.js) checks yourTERM_PROGRAMenvironment variable. - If a supported terminal is found, it sends an escape code to stdout.
- If not, it attempts to spawn a system notification process (
osascriptornotify-send).