Gemini CLI
Track Gemini CLI-generated code with Git AI so AI-authored lines, prompts, models, and tool activity stay connected through every Git operation.
Supported since: 2025-12-05

Capabilities
The Google Gemini CLI fully supports the Git AI standard.
| Feature | Supported |
|---|---|
| Agent Mode | ✓ |
| Prompt Saving | ✓ |
How this integration works
Gemini CLI has native support for Hooks. When you install Git AI it will automatically installs the neccesary hooks on write_file|replace.
{
"hooks": {
"AfterTool": [
{
"hooks": [
{
"command": "git ai checkpoint gemini --hook-input stdin",
"type": "command"
}
],
"matcher": "write_file|replace"
}
],
"BeforeTool": [
{
"hooks": [
{
"command": "git ai checkpoint gemini --hook-input stdin",
"type": "command"
}
],
"matcher": "write_file|replace"
}
]
},
"tools": {
"enableHooks": true
}
}Troubleshooting
Make sure there are no Hook Errors during execution
Gemini will show you which Hooks it runs and error if there are any issues invoking each hook.
If you see anything, please open an issue on the GitHub repository.
Windsurf
Track Windsurf-generated code with Git AI line-level attribution, prompt history, token usage, and tool activity from edit to production.
OpenCode
Track OpenCode-generated code with Git AI, including line-level attribution, prompt history, token usage, and tool activity from prompt to production.