Answer: Hooks are defined in `settings.json` within the `hooks` object, where each event (for example, `BeforeTool`) contains an array of hook definitions. Each hook definition can include an optional `matcher`, an optional `sequential` boolean, and a required `hooks` array of hook configurations, each requiring a `type` (currently only `"command"` is supported) and a `command`. Status: Confirmed Entry: tool/gemini-cli/settings/configure-hooks-settings-json Revision: 1 Digest: sha256:ae6fd32f09ab32d2 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:18:34Z Last changed: 2026-11-13T03:18:34Z Last verified: 2026-11-20T12:53:04Z Next check: 2026-11-21T12:53:04Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of location | settings.json | | [1] | 2026-11-20 event structure | array of **hook definitions** | | [1] | 2026-11-20 matcher | string | | [1] | 2026-11-20 sequential | boolean | | [1] | 2026-11-20 hooks | array | | [1] | 2026-11-20 type | string | | [1] | 2026-11-20 command | string | | [1] | 2026-11-20 timeout default | 60000 | milliseconds | [1] | 2026-11-20 Sources: [1] Google. "Hooks reference". https://geminicli.com/docs/hooks/reference.md Role: primary. Accessed: 2026-11-20T12:53:04Z Quote: "Hooks are defined in `settings.json` within the `hooks` object." (Supports: location) Quote: "contains an array of **hook definitions**." (Supports: event structure) Quote: "| `matcher` | `string` | No | A regex (for tools) or exact string (for lifecycle) to filter when the hook runs." (Supports: matcher) Quote: "| `sequential` | `boolean` | No | If `true`, hooks in this group run one after another. If `false`, they run in parallel." (Supports: sequential) Quote: "| `hooks` | `array` | **Yes** | An array of **hook configurations**." (Supports: hooks) Quote: "| `type` | `string` | **Yes** | The execution engine. Currently only `"command"` is supported." (Supports: type) Quote: "| `command` | `string` | **Yes\*** | The shell command to execute. (Required when `type` is `"command"`)." (Supports: command) Quote: "| `timeout` | `number` | No | Execution timeout in milliseconds (default: 60000)." (Supports: timeout default) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 06d37f2f66812ee78bb46c37a112203376f0bae4d3b8b44ac79d0bda4b86a118 (captured 2026-11-13T03:18:34Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:18:34Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:53:04Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:53:04Z Last attempt: 2026-11-20T12:53:04Z Notes and limitations: Extracted automatically from a single official source (section "Configuration schema"). Related: https://latestn.com/tool/gemini-cli/settings/configure-mcp-server-settings How do I configure an MCP server in Gemini CLI's settings.json? https://latestn.com/tool/gemini-cli/settings/configure-settings-json How do I configure Gemini CLI settings using settings.json files? https://latestn.com/tool/gemini-cli/settings/configure-telemetry-settings How do I configure Gemini CLI telemetry settings in settings.json? https://latestn.com/tool/gemini-cli/settings/config-file-location Where are Gemini CLI configuration and settings files stored? https://latestn.com/tool/gemini-cli/settings/configuration-precedence What is the precedence order of Gemini CLI configuration layers? https://latestn.com/tool/gemini-cli/settings/configure-hooks How do I configure hooks in Gemini CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:18:34Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/settings/configure-hooks-settings-json/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/settings/configure-hooks-settings-json POST: https://latestn.com/dispute/tool/gemini-cli/settings/configure-hooks-settings-json with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/settings/configure-hooks-settings-json?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure hooks in Gemini CLI's settings.json? Revision 1, last verified 2026-11-20T12:53:04Z. https://latestn.com/tool/gemini-cli/settings/configure-hooks-settings-json (accessed 2026-11-21T10:00:17Z). @misc{LatestN_tool_gemini_cli_settings_configure_hooks_settings_json_r1, title = {How do I configure hooks in Gemini CLI's settings.json?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/settings/configure-hooks-settings-json}}, note = {Revision 1; digest sha256:ae6fd32f09ab32d2; last verified 2026-11-20T12:53:04Z; accessed 2026-11-21T10:00:17Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/settings/configure-hooks-settings-json