AI Coding CLI Reference: Codex, Gemini CLI, OpenCode
Updated by Alex Sorokoletov
Reference pages for 11 topics across 3 open-source coding agents: hook events and their payloads, plugin APIs, every configuration key with its default, and permission and sandbox modes. Tables are generated from each tool’s source at its latest release tag, so they match the shipped code, and each page links the exact files and the vendor’s official documentation.
Codex CLI
OpenAI · verified against v0.159.2 · official docs · release tracker
- Codex CLI Hooks Reference: All 12 Codex CLI hook events with stdin fields, stdout JSON, timeouts and matchers, plus hooks.json vs config.toml, exit code 2 blocking and the review prompt.
- Codex CLI Plugins Reference: Codex CLI plugin.json fields, what a plugin bundles (skills, MCP servers, apps, hooks), marketplace sources, codex plugin commands and Claude Code support.
- Codex CLI config.toml Reference: Codex CLI config.toml location and layer precedence, profiles, custom model providers and wire_api, MCP servers, every top-level key and every feature flag.
- Codex CLI Permissions and Sandbox Reference: Codex CLI sandbox modes, approval policies and permission profiles (:read-only, :workspace, :danger-full-access), which one wins, --yolo, requirements.toml.
Gemini CLI
Google · verified against v0.62.0 · official docs · release tracker
- 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.
OpenCode
Anomaly · verified against v1.18.33 · official docs · release tracker
- OpenCode Plugins Reference: All 21 OpenCode plugin hooks with input and output shapes, where plugins load from, load order, why a plugin does not load, and the Claude Code hook mapping.
- OpenCode Config Reference (opencode.json): Every opencode.json key with type and description, where OpenCode looks for config files, the merge order, env overrides, and which OpenCode 2 keys 1.x accepts.
- OpenCode Permissions Reference: OpenCode permission keys, defaults, per-agent rules, bash pattern matching, why the last matching rule wins, --auto mode and the OpenCode 2 permissions array.