# run-gemini-cli

> A GitHub Action that runs the Gemini CLI in workflows for pull request reviews, issue triage, and on-demand AI assistance.

run-gemini-cli is a GitHub Action published under the google-github-actions organization that invokes the Gemini CLI inside GitHub workflows. It works both as an autonomous agent for routine coding tasks and as an on-demand collaborator that can be triggered by mentioning `@gemini-cli` in issues and pull requests. The repository is released under the Apache License 2.0.

## What It Is

The action installs and runs the Gemini CLI within a GitHub Actions job, so Gemini models can review pull requests, triage issues, analyze and modify code, and answer requests conversationally (for example `@gemini-cli fix this issue`). Workflows can fire on repository events such as an issue being opened, on schedules such as nightly runs, or from comment commands like `/review` and `/triage`. Outputs include a summary and an error output from the CLI execution.

## Workflows and Setup Path

Setup starts with a Gemini API key from Google AI Studio stored as the `GEMINI_API_KEY` repository secret, plus `.gitignore` entries for `.gemini/` and GitHub App credential files. Workflows can then be generated with the `/setup-github` command in the Gemini CLI or copied manually from the examples directory. Pre-built workflows cover a central Gemini Dispatch router, Issue Triage, Pull Request Review, and a general-purpose Gemini CLI Assistant.

## Configuration and Authentication

Inputs allow selecting the Gemini CLI version (latest, preview, nightly, or a specific version), the model, a prompt, project settings written to `.gemini/settings.json`, extensions to install, and the choice of pnpm over npm. Google authentication can use a Gemini API key, Workload Identity Federation, Vertex AI, or Gemini Code Assist. GitHub authentication can use the default `GITHUB_TOKEN` or a custom GitHub App, which the README recommends.

## Customization and Observability

A `GEMINI.md` file in the repository supplies project-specific instructions such as coding conventions. Gemini models' tool-calling can interact with other CLIs such as the GitHub CLI. The action can also send traces, metrics, and logs to your own Google Cloud project, and the README documents best practices for repository security and pinning action versions.

## Features
- Pull request review automation
- Issue triage on events or schedules
- On-demand collaboration via @gemini-cli comments
- Gemini Dispatch workflow routing
- General-purpose conversational assistant in issues and PRs
- Tool calling with other CLIs such as GitHub CLI
- Project context via GEMINI.md
- Gemini CLI extensions installation
- OpenTelemetry observability to Google Cloud
- Authentication via API key, Workload Identity Federation, Vertex AI, or Gemini Code Assist
- Selectable Gemini CLI version and model

## Integrations
GitHub Actions, Gemini CLI, Google AI Studio, Google Cloud, Vertex AI, Gemini Code Assist, GitHub CLI, Workload Identity Federation

## Platforms
API, CLI

## Pricing
Open Source

## Version
v0.1.22

## Links
- Website: https://github.com/google-github-actions/run-gemini-cli
- Documentation: https://github.com/google-github-actions/run-gemini-cli/blob/main/docs/authentication.md
- Repository: https://github.com/google-github-actions/run-gemini-cli
- EveryDev.ai: https://www.everydev.ai/tools/run-gemini-cli
