Git AI
Agents

Gemini CLI

Track Gemini generated AI-code all the way to production.

Supported since: 2025-12-05

Gemini CLI logo
Install Git AI
No special setup required. One command, no per-repo config.
curl -sSL https://usegitai.com/install.sh | bash
Prompt Gemini CLI & Commit
No workflow changes. AI attribution is added automatically on commit.
AI Blame & Ask
See who wrote every line — human or AI. Use git-ai ask to query the original prompts and context behind any AI-generated code.

Capabilities

The Google Gemini CLI fully supports the Git AI standard.

FeatureSupported
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.

~/.gemini/settings.json
{
  "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.