README
Plannotator for Gemini CLI
Interactive plan review, code review, and markdown annotation for Google Gemini CLI.
Install
Install the plannotator command:
macOS / Linux / WSL:
curl -fsSL https://plannotator.ai/install.sh | bash
Windows PowerShell:
irm https://plannotator.ai/install.ps1 | iex
The installer auto-detects Gemini CLI (checks for ~/.gemini) and configures:
- Policy file at
~/.gemini/policies/plannotator.toml— allowsexit_plan_modewithout the TUI confirmation dialog - Hook in
~/.gemini/settings.json— interceptsexit_plan_modeand opens the browser review UI - Slash commands at
~/.gemini/commands/—/plannotator-reviewand/plannotator-annotate
How It Works
Plan Mode Integration
When you use /plan in Gemini CLI:
- The agent creates a plan and calls
exit_plan_mode - The user policy auto-allows
exit_plan_mode(skipping the TUI dialog) - The
BeforeToolhook intercepts the call, reads the plan from disk, and opens the Plannotator review UI in your browser - You review the plan, optionally add annotations
- Approve → the plan is accepted and the agent proceeds
- Deny → the agent receives your feedback and revises the plan
Available Commands
| Command | Description |
|---|---|
/plannotator-review | Open interactive code review for current changes or a PR URL |
/plannotator-review <pr-url> | Review a GitHub pull request |
/plannotator-annotate <file> | Open interactive annotation UI for a markdown file |
Manual Setup
If the installer didn't auto-configure your settings (e.g. ~/.gemini/settings.json already existed), add the hook manually:
{
"hooks": {
"BeforeTool": [
{
"matcher": "exit_plan_mode",
"hooks": [
{
"type": "command",
"command": "plannotator",
"timeout": 345600
}
]
}
]
}
}
Environment Variables
| Variable | Description |
|---|---|
PLANNOTATOR_REMOTE | Set to 1 for remote mode (devcontainer, SSH). Uses fixed port and skips browser open. |
PLANNOTATOR_PORT | Fixed port to use. Default: random locally, 19432 for remote sessions. |
PLANNOTATOR_BROWSER | Custom browser to open. macOS: app name or path. Linux/Windows: executable path. |
PLANNOTATOR_SHARE | Set to disabled to turn off URL sharing. |
Requirements
- Gemini CLI 0.36.0 or later
plannotatorbinary on PATH