Gemini CLI Hooks
April 23, 2026 · View on GitHub
Installation
Step 1. Start Gemini CLI:
gemini
Step 2. Send a prompt (e.g., Hi) — you'll hear a sound on session start, tool use, agent response, and more.
Common Errors
If prerequisites are missing, you'll see an error on Gemini CLI start:
SessionStart hook error
Verify Python 3 is installed (python3 --version) and that .gemini/hooks/scripts/hooks.py exists in your project.
Changelog
| Date | Hooks | Changes | Gemini CLI Version |
|---|---|---|---|
| Apr 22, 2026 | 11 | Initial release: all 11 Gemini CLI hooks (SessionStart, SessionEnd, BeforeAgent, AfterAgent, BeforeModel, AfterModel, BeforeToolSelection, BeforeTool, AfterTool, PreCompress, Notification) | v0.38.2 |
Other Repos
|
Claude Code Hooks |
Codex CLI Hooks |
Claude Code Best Practice |
Gemini CLI Best Practice |
Codex CLI Best Practice |
Sponsor My Work
If you like my work, buy me a doodh patti 🍵 on