Skip to content

Commit 2cc3bb1

Browse files
sethvargo8bitmp3
andauthored
Upgrade run-gemini-cli README.md (#49)
Closes #43 This rebases @8bitmp3's changes against main. --------- Signed-off-by: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com> Co-authored-by: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com>
1 parent 15a02c0 commit 2cc3bb1

1 file changed

Lines changed: 54 additions & 54 deletions

File tree

README.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# run-gemini-cli
22

3-
This action invokes the Gemini CLI. Use this to automate software development
4-
tasks within your GitHub repositories with [Gemini CLI].
5-
6-
You can interact with Gemini by mentioning it in pull request comments and
7-
issues to perform tasks like code generation, analysis, and modification.
3+
`run-gemini-cli` is a GitHub Action that integrates [Gemini] AI into your development
4+
workflow via the [Gemini CLI]. You can use it to perform GitHub pull request reviews, triage
5+
issues, perform code analysis and modification, and more using [Gemini] conversationally
6+
(e.g., `@gemini-cli /review`) directly inside your GitHub repositories.
87

98
**This is not an officially supported Google product, and it is not covered by a
109
Google Cloud support contract. To report bugs or request features in a Google
@@ -30,16 +29,16 @@ Cloud product, please contact [Google Cloud support].**
3029

3130
## Features
3231

33-
- **Extensible with Tools**: Leverage Gemini's tool-calling capabilities to
34-
interact with other CLIs like the `gh` CLI for powerful automations.
32+
- **Extensible with Tools**: Leverage [Gemini] models' tool-calling capabilities to
33+
interact with other CLIs like the [GitHub CLI] (`gh`) for powerful automations.
3534
- **Customizable**: Use a `GEMINI.md` file in your repository to provide
36-
project-specific instructions and context to Gemini.
35+
project-specific instructions and context to [Gemini CLI].
3736
- **Comment-based Interaction**: Trigger workflows in issue and pull request
38-
comments.
37+
comments by mentioning the [Gemini CLI] (e.g., `@gemini-cli /review`).
3938

4039
## Getting Started
4140

42-
Before using this action, you need to:
41+
Before using the Gemini CLI GitHub Action, make sure to:
4342

4443
1. **Get a Gemini API Key**: Obtain your API key from [Google AI Studio].
4544
2. **Add it as a GitHub Secret**: Store your API key as a secret in your
@@ -48,7 +47,7 @@ Before using this action, you need to:
4847

4948
## Configuration
5049

51-
This action is configured via a combination of workflow inputs, outputs,
50+
The Gemini CLI GitHub Action is configured via a combination of workflow inputs, outputs,
5251
environment variables, and secrets.
5352

5453
### Inputs
@@ -78,49 +77,48 @@ Set the following environment variables in your repository or workflow:
7877

7978
| Name | Description | Type | Required | When Required |
8079
|---------------------------|---------------------------------------------------------------------------------------------|----------|----------|------------------------------|
81-
| GEMINI_CLI_VERSION | Controls which version of the Gemini CLI is installed. Supports npm versions (e.g., `0.1.0`, `latest`), a branch name (e.g., `main`), or a commit hash. | Variable | No | To pin or override CLI version |
82-
| GCP_WIF_PROVIDER | The full resource name of the Workload Identity Provider. | Variable | No | If using observability |
83-
| OTLP_GOOGLE_CLOUD_PROJECT | The Google Cloud project for telemetry. | Variable | No | If using observability |
84-
| GOOGLE_CLOUD_PROJECT | The Google Cloud project for Vertex auth. | Variable | No | If using Vertex auth |
85-
| GOOGLE_CLOUD_LOCATION | The location of the Google Cloud project for Vertex auth. | Variable | No | If using Vertex auth |
86-
| GOOGLE_GENAI_USE_VERTEXAI | Set to 'true' to use Vertex AI | Variable | No | If using Vertex auth |
87-
| APP_ID | GitHub App ID for custom authentication. | Variable | No | If using a custom GitHub App |
88-
89-
90-
To add an environment variable, go to your repository's **Settings > Secrets and
91-
variables > Actions > New variable**. Enter the variable name and value, then
92-
save. For organization-wide or environment-specific variables, see the
80+
| GEMINI_CLI_VERSION | Controls which version of the Gemini CLI is installed. Supports `npm` versions (e.g., `0.1.0`, `latest`), a branch name (e.g., `main`), or a commit hash. | Variable | No | To pin or override the CLI version |
81+
| GCP_WIF_PROVIDER | Full resource name of the Workload Identity Provider. | Variable | No | When using observability |
82+
| OTLP_GOOGLE_CLOUD_PROJECT | Google Cloud project for telemetry. | Variable | No | When using observability |
83+
| GOOGLE_CLOUD_PROJECT | Google Cloud project for Vertex AI authentication. | Variable | No | When using Vertex AI authentication |
84+
| GOOGLE_CLOUD_LOCATION | Geographic location of the Google Cloud project for Vertex AI authentication. | Variable | No | When using Vertex AI authentication |
85+
| GOOGLE_GENAI_USE_VERTEXAI | Set to 'true' to use Vertex AI | Variable | No | When using Vertex AI authentication |
86+
| APP_ID | GitHub App ID for custom authentication. | Variable | No | When using a custom GitHub App |
87+
88+
89+
To add an environment variable: 1) Go to your repository's **Settings > Secrets and
90+
variables > Actions > New variable**; 2) Enter the variable name and value; and 3) Save.
91+
For organization-wide or environment-specific variables, refer to the
9392
[GitHub documentation on variables][variables].
9493

9594
### Secrets
9695

9796
The following secrets are required for security:
9897

99-
| Name | Description | Required | When Required |
100-
|-------------------|-----------------------------------------------|----------|----------------------------------------|
101-
| GEMINI_API_KEY | Your Gemini API key. | No | If using API key from AI Studio |
102-
| APP_PRIVATE_KEY | Private key for your GitHub App (PEM format). | No | If using a custom GitHub App |
98+
| Name | Description | Required | When Required |
99+
|-------------------|-----------------------------------------------|----------|-----------------------------------------------------------|
100+
| GEMINI_API_KEY | Your Gemini API key from Google AI Studio. | No | If you are using the Gemini API key from Google AI Studio |
101+
| APP_PRIVATE_KEY | Private key for your GitHub App (PEM format). | No | If you are using a custom GitHub App |
103102

104103
To add a secret, go to your repository's **Settings > Secrets and variables >
105-
Actions > New repository secret**. For more information, see the
104+
Actions > New repository secret**. For more information, refer to the
106105
[official GitHub documentation on creating and using encrypted secrets][secrets].
107106

108107
## Workflows
109108

110-
To use this action, create a workflow file in your repository (e.g.,
111-
`.github/workflows/gemini.yml`).
112-
113-
The best way to get started is to copy one of the pre-built workflows from the
109+
Workflows include Issue Triage, Pull Request Review. and Generic Gemini CLI. To use
110+
this GitHub Action, you need to create a workflow file in your repository (e.g.,
111+
`.github/workflows/gemini.yml`). The best way to get started is to copy one of the pre-built workflows from the
114112
[`/workflows`](./workflows) directory into your project's `.github/workflows`
115113
folder and customize it.
116114

117-
See the sections below for specific examples.
115+
Below are specific examples of workflows:
118116

119117
### Issue Triage
120118

121-
This action can be used to triage GitHub issues automatically or on a schedule.
122-
For a detailed guide on how to set up the issue triage system, please see the
123-
[documentation](./workflows/issue-triage).
119+
This action can be used to triage GitHub Issues automatically or on a schedule.
120+
For a detailed guide on how to set up the issue triage system, go to the
121+
[GitHub Issue Triage workflow documentation](./workflows/issue-triage).
124122

125123
### Pull Request Review
126124

@@ -129,20 +127,20 @@ opened. Additionally, users with `OWNER`, `MEMBER`, or `COLLABORATOR`
129127
permissions can trigger a review by commenting `@gemini-cli /review` in a pull
130128
request.
131129

132-
For a detailed guide on how to set up the pull request review system, please see
133-
the [documentation](./workflows/pr-review).
130+
For a detailed guide on how to set up the pull request review system, go to the
131+
[GitHub PR Review workflow documentation](./workflows/pr-review).
134132

135133
### Generic Gemini CLI
136134

137-
This action can be used to invoke a general-purpose, conversational AI assistant
138-
that can be invoked within pull requests and issues to perform a wide range of
139-
tasks. For a detailed guide on how to set up the Gemini CLI, please see the
140-
[documentation](./workflows/gemini-cli).
135+
This type of action can be used to invoke a general-purpose, conversational Gemini
136+
AI assistant within the pull requests and issues to perform a wide range of
137+
tasks. For a detailed guide on how to set up the [Gemini CLI], go to the Generic
138+
[Gemini CLI workflow documentation](./workflows/gemini-cli).
141139

142-
You can configure the [maxSessionTurns](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md#available-settings-in-settingsjson)
143-
when running the gemini cli in the workflow's yml file if you want to restrict
144-
maximum session turns for each yolo gemini cli run. In the step 'Run Gemini',
145-
you can configure the maxSessionTurns in the settings.
140+
You can configure the [`maxSessionTurns`](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md#available-settings-in-settingsjson)
141+
when running the Gemini CLI in the workflow's YAML configuration file if you want to restrict
142+
the maximum number of session turns for each of the `yolo` Gemini CLI runs. In the 'Run Gemini' step ,
143+
you can configure the `maxSessionTurns` in the settings.
146144

147145
## Authentication
148146

@@ -155,41 +153,43 @@ authenticate in two ways:
155153
default `GITHUB_TOKEN` provided by the workflow.
156154

157155
For a detailed guide on how to set up authentication, including creating a
158-
custom app and the required permissions, please see the
156+
custom app and the required permissions, go to the
159157
[**Authentication documentation**](./docs/github-app.md).
160158

161159
## Observability with OpenTelemetry
162160

163161
This action can be configured to send telemetry data (traces, metrics, and logs)
164162
to your own Google Cloud project. This allows you to monitor the performance and
165-
behavior of the Gemini CLI within your workflows, providing valuable insights
163+
behavior of the [Gemini CLI] within your workflows, providing valuable insights
166164
for debugging and optimization.
167165

168-
For detailed instructions on how to set up and configure observability, please
169-
see the [Observability documentation](./docs/observability.md).
166+
For detailed instructions on how to set up and configure observability, go to
167+
the [Observability documentation](./docs/observability.md).
170168

171169
### OpenTelemetry in Google Cloud
172170

173171
To use observability features with Google Cloud, you'll need to set up Workload
174-
Identity Federation. For detailed setup instructions, see the
172+
Identity Federation. For detailed setup instructions, check out the
175173
[Workload Identity Federation documentation](./docs/workload-identity.md).
176174

177175
## Customization
178176

179177
Create a `GEMINI.md` file in the root of your repository to provide
180-
project-specific context and instructions to Gemini. This is useful for defining
178+
project-specific context and instructions to [Gemini CLI]. This is useful for defining
181179
coding conventions, architectural patterns, or other guidelines the model should
182180
follow.
183181

184182
## Contributing
185183

186-
Contributions are welcome! Please see our
184+
Contributions are welcome! Check out the Gemini CLI
187185
[**Contributing Guide**](./CONTRIBUTING.md) for more details on how to get
188186
started.
189187

190188
[secrets]: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions
191189
[settings_json]: https://github.com/google-gemini/gemini-cli/blob/main/docs/
190+
[Gemini]: https://deepmind.google/models/gemini/
192191
[Google AI Studio]: https://aistudio.google.com/apikey
193-
[Gemini CLI]: https://github.com/google-github-actions/run-gemini-cli
192+
[Gemini CLI]: https://github.com/google-gemini/gemini-cli/
194193
[Google Cloud support]: https://cloud.google.com/support
195194
[variables]: https://docs.github.com/en/actions/learn-github-actions/variables
195+
[GitHub CLI]: https://docs.github.com/en/github-cli/github-cli

0 commit comments

Comments
 (0)