gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

incomplete or inconsistent names for matcher for hook documentation

Open simkimsia opened this issue 2 weeks ago • 1 comments

URL of the page with the issue

https://geminicli.com/docs/hooks/writing-hooks/

What is the problem?

The list of tool names is incorrect or incomplete.

Under https://geminicli.com/docs/hooks/writing-hooks/#configuration

you can see matcher that matches with startup and "matcher": "exit|logout" in a later example.

Whereas other examples are CamelCased like "WriteFile|Edit"

In my own testing I found that the json output is

"tool_name":"replace","tool_input":{"file_path":"/Users/kimsia/Projects/opus-gemini-orchestrator/.ogo/thoughts/shared/01_research/knowledge_base/gemini_cli/2025-12-15_how_to_add_hooks_to_gemini_cli.md",
"AfterTool","timestamp":"2025-12-15T07:08:13.867Z","tool_name":"write_file","tool_input":{"file_path":".ogo/thoughts/shared/01_research/knowledge_base/gemini_cli

using snake style like replace, write_file for tools

In https://geminicli.com/docs/hooks/#tool-name-mapping

it gives only a short list of four tool names and all in CamelCased. I find this hard to believe.

What did you expect to happen?

I expect documentation for matcher to show the exhaustive list of possible tool_names and I expect the names to be of consistent notation format. Either CamelCased or snake_style

Additional context

This is my build

  • CLI Version: 0.20.2
  • Git Commit: af894e468
  • Model: auto
  • Sandbox: no sandbox
  • OS: darwin
  • Auth Method: OAuth

simkimsia avatar Dec 15 '25 07:12 simkimsia