Gemini CLI Reference: Hooks, Config, Permissions

Updated by

An independent reference for Gemini CLI (Google), with every table generated from the open-source repository at the v0.62.0 release tag and refreshed with each release. Each page answers the questions the official documentation leaves open: exact event order, payload fields, defaults, and what each setting blocks.

Pages

  • Gemini CLI Hooks Reference: All 11 Gemini CLI hook events with stdin fields, stdout JSON, matchers, millisecond timeouts and exit codes, plus settings.json config and Claude Code mapping.
  • Gemini CLI Extensions Reference: gemini-extension.json fields, what an extension bundles (MCP servers, commands, hooks, skills, policies), install, link and update commands, and install paths.
  • Gemini CLI settings.json Reference: Where Gemini CLI reads settings.json (system, user, project), merge order, $VAR expansion, MCP server fields, and every settings key with type and default.
  • Gemini CLI Permissions and Policy Engine: Gemini CLI approval modes and YOLO, policy engine TOML rules and priority tiers, bundled default rules, sandbox profiles, trusted folders and denial errors.

Common Gemini CLI questions

How these pages stay current

Tables on every page are regenerated from the Gemini CLI source with each release: hook events and payload schemas, configuration keys with their types and defaults, and permission modes. The version and date under each title are the release the tables were read from. Prose explains behaviour the tables cannot show, such as the order events fire in and which exit codes block, and cites the exact source files it relies on. Where the Google documentation and the code disagree, these pages follow the code and link both. Each page ends with a Sources list that links every file its tables were read from, pinned to the release tag, so any row can be checked against the exact code that shipped.

Release history

What changed in each Gemini CLI release, including new hooks, settings and permission modes, is tracked in the Gemini CLI version tracker.