Skip to content

InledGroup/gemini-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Gemini Notifier

Gemini CLI License: GNU GPLv3 Platform: Cross

Transform your Gemini CLI experience by adding voice notifications and real-time sound effects. This hooks system alerts you when a tool is executed, when your permission is required, or when the agent has finished its task.


⚡ Quick Installation

If you already have this repository locally, run this command to install it in your personal Gemini directory:

chmod +x install.sh && ./install.sh

The fast way: Once uploaded to GitHub, you will be able to install it directly with: curl -sSL https://raw.githubusercontent.com/InledGroup/gemini-notifier/main/install.sh | bash


✨ Main Features

  • 🎙️ Voice Notifications: Generated with ElevenLabs (Voice: Samara X) for a premium experience.
  • 🛠️ Native Gemini CLI Support: Specifically adapted for events like BeforeTool, Notification (ToolPermission), and SessionStart.
  • 🔄 Dual Compatibility: Fully compatible with the 19 original Claude Code hooks.
  • 💻 Cross-Platform:
    • macOS: Uses afplay (native).
    • Linux: Compatible with paplay, aplay, ffplay, and mpg123.
    • Windows: Native integration with winsound.
  • 🎯 Smart Filters: Detects specific commands (like git commit) to trigger special sounds.

📂 Project Structure

  • scripts/: The main Python engine (hooks.py).
  • sounds/: Complete library of effects and voices in WAV/MP3.
  • config/: Granular management of which sounds you want to hear.
  • logs/: Detailed event registry for debugging.

⚙️ Gemini CLI Configuration

After running the installer, add these hooks to your ~/.gemini/settings.json file:

{
  "hooks": {
    "BeforeTool": [
      { "matcher": "*", "hooks": [{ "name": "sound", "type": "command", "command": "python3 ~/.gemini/hooks/scripts/hooks.py" }] }
    ],
    "AfterTool": [
      { "matcher": "*", "hooks": [{ "name": "sound", "type": "command", "command": "python3 ~/.gemini/hooks/scripts/hooks.py" }] }
    ],
    "Notification": [
      { "matcher": "*", "hooks": [{ "name": "sound", "type": "command", "command": "python3 ~/.gemini/hooks/scripts/hooks.py" }] }
    ],
    "SessionStart": [
      { "matcher": "startup", "hooks": [{ "name": "sound", "type": "command", "command": "python3 ~/.gemini/hooks/scripts/hooks.py" }] }
    ],
    "SessionEnd": [
      { "matcher": "exit", "hooks": [{ "name": "sound", "type": "command", "command": "python3 ~/.gemini/hooks/scripts/hooks.py" }] }
    ]
  }
}

🛠️ Customization

You can enable or disable sounds individually by editing config/hooks-config.json:

Hook Description
disablePreToolUseHook Mutes the alert before using tools.
disablePermissionRequestHook Mutes permission requests (Recommended: false).
disableSessionStartHook Mutes the welcome greeting.
disableLogging Disables event logging in logs/.

🌟 Credits


📝 License

This project is licensed under the GNU GPLv3 License


Developed with ❤️ by JaimeGH 🚀

About

Give Gemini CLI the ability to notify you when it needs you

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors