installsource
guide / coding agents

Gemini CLI notifications on Mac, from the notch.

Add a hook snippet to ~/.gemini/settings.json and Gemini CLI shows a card from your Mac's notch whenever a tool needs your permission. Install drip with brew install jrnxf/tap/drip, then merge the snippet into the file.

brew install jrnxf/tap/drip

Add this to ~/.gemini/settings.json. If the file has a hooks entry already, merge the events and keep your own hooks. This is the permission-cards recipe: a card when Gemini needs you, and nothing else.

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "name": "drip",
            "type": "command",
            "command": "drip hook gemini"
          }
        ]
      }
    ],
    "AfterTool": [
      {
        "hooks": [
          {
            "name": "drip",
            "type": "command",
            "command": "drip hook gemini"
          }
        ]
      }
    ],
    "BeforeAgent": [
      {
        "hooks": [
          {
            "name": "drip",
            "type": "command",
            "command": "drip hook gemini"
          }
        ]
      }
    ]
  }
}

drip is a free, open-source macOS CLI that shows scriptable notification cards from the MacBook notch, for builds, deploys and coding agents like Claude Code, Codex and Gemini CLI.

A card when a turn is done

The everything recipe adds an AfterAgent hook. The done card shows Gemini's last response and replaces the waiting card of that session in place. Use this file instead of the one above.

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "name": "drip",
            "type": "command",
            "command": "drip hook gemini"
          }
        ]
      }
    ],
    "AfterAgent": [
      {
        "hooks": [
          {
            "name": "drip",
            "type": "command",
            "command": "drip hook gemini"
          }
        ]
      }
    ],
    "AfterTool": [
      {
        "hooks": [
          {
            "name": "drip",
            "type": "command",
            "command": "drip hook gemini"
          }
        ]
      }
    ],
    "BeforeAgent": [
      {
        "hooks": [
          {
            "name": "drip",
            "type": "command",
            "command": "drip hook gemini"
          }
        ]
      }
    ]
  }
}

How it works

  1. Hooks, not polling. The snippet hooks Gemini CLI's Notification event, which is a tool permission. AfterTool and BeforeAgent are in it only to take the card away.
  2. One card per request. Each hook runs drip hook gemini, which reads the hook's JSON and shows my-app needs you with Gemini's message.
  3. Gone once you answer. Once the tool has run, or you send Gemini a prompt, the card that said it needs you goes. Otherwise it stays until you click it, the session's next card replaces it, or 10 minutes pass.
  4. Named by project. The title is the project, from the session's working directory, so several sessions at once stay apart.
  5. Gemini's mark. The card shows the Gemini mark that drip bundles. A click brings forward the terminal Gemini runs in.

FAQ

Can I allow or deny from the card?

No. Gemini CLI has no hook that takes an answer, so its card only tells you and you answer in the terminal. The --approve flag is for Claude Code and Codex.

Why do I get no card when Gemini finishes?

The permission-cards recipe has no hook on the end of a turn. Add an AfterAgent hook that runs drip hook gemini, as the everything recipe above does.

Can a failing hook make Gemini CLI run a turn again?

drip is built so it cannot. Gemini CLI reads any exit code but 0 and 1 as a block, which after a turn makes it run the turn again. drip hook exits 0, or 1 for any failure, never 2 or more.

What happens over ssh, or when nobody is logged in to the screen?

There is nothing to show, so drip prints nothing and exits 0. Gemini CLI then shows no hook error after every turn.

Related