Skip to content

Commit 377e936

Browse files
authored
docs: improve README usability and clarity (#88)
This commit significantly enhances the README.md to provide a clearer and more user-friendly experience for developers. The key improvements include: - **Restructured Quick Start:** The Quick Start section is now more actionable, with a clear 1-2-3-4 step process. It also introduces the recommended `gemini /setup-github` command for a streamlined setup experience. - **Simplified Workflow Instructions:** The workflow setup instructions are simplified, directing users to the setup command or manual copying, and clarifying how to trigger the different workflows. - **Improved Readability:** The table of contents and overall document structure have been refined for better navigation and readability. - **Clarified Configuration:** The "Environment Variables" section has been renamed to "Repository Variables" to more accurately reflect GitHubs terminology. The instructions for adding variables are also more precise. - **Enhanced Authentication and Customization Sections:** Minor improvements to these sections for better clarity. - **Updated Links:** Links to GitHub documentation and other resources have been updated to point to more specific and relevant pages.
1 parent 5cf9fc2 commit 377e936

File tree

1 file changed

+46
-34
lines changed

1 file changed

+46
-34
lines changed

README.md

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
`run-gemini-cli` is a GitHub Action that integrates [Gemini] AI into your development workflow via the [Gemini CLI]. It acts both as an autonomous agent for critical routine coding tasks, and an on-demand collaborator you can quickly delegate work to.
5+
`run-gemini-cli` is a GitHub Action that integrates [Gemini] into your development workflow via the [Gemini CLI]. It acts both as an autonomous agent for critical routine coding tasks, and an on-demand collaborator you can quickly delegate work to.
66

77
Use it to perform GitHub pull request reviews, triage issues, perform code analysis and modification, and more using [Gemini] conversationally (e.g., `@gemini-cli fix this issue`) directly inside your GitHub repositories.
88

@@ -14,16 +14,21 @@ Cloud product, please contact [Google Cloud support].**
1414
- [Overview](#overview)
1515
- [Features](#features)
1616
- [Quick Start](#quick-start)
17+
- [1. Get a Gemini API Key](#1-get-a-gemini-api-key)
18+
- [2. Add it as a GitHub Secret](#2-add-it-as-a-github-secret)
19+
- [3. Choose a Workflow](#3-choose-a-workflow)
20+
- [4. Try it out!](#4-try-it-out)
1721
- [Workflows](#workflows)
1822
- [Issue Triage](#issue-triage)
1923
- [Pull Request Review](#pull-request-review)
2024
- [Gemini CLI Assistant](#gemini-cli-assistant)
21-
- [Configuration](#configuration)
2225
- [Inputs](#inputs)
2326
- [Outputs](#outputs)
24-
- [Environment Variables](#environment-variables)
27+
- [Repository Variables](#repository-variables)
2528
- [Secrets](#secrets)
2629
- [Authentication](#authentication)
30+
- [Google Authentication](#google-authentication)
31+
- [GitHub Authentication](#github-authentication)
2732
- [Observability](#observability)
2833
- [Customization](#customization)
2934
- [Contributing](#contributing)
@@ -52,21 +57,38 @@ Store your API key as a secret named `GEMINI_API_KEY` in your repository:
5257
- Name: `GEMINI_API_KEY`, Value: your API key
5358

5459
### 3. Choose a Workflow
55-
Copy one of our pre-built workflows from the [`/workflows`](./workflows) directory:
60+
You have two options to set up a workflow:
5661

57-
```bash
58-
# Example: Add PR Review workflow
59-
mkdir -p .github/workflows
60-
curl -o .github/workflows/gemini-pr-review.yml \
61-
https://raw.githubusercontent.com/google-github-actions/run-gemini-cli/main/workflows/pr-review/gemini-pr-review.yml
62-
```
62+
**Option A: Use setup command (Recommended)**
63+
1. Start the Gemini CLI:
64+
```bash
65+
gemini
66+
```
67+
2. In the chat interface, type:
68+
```
69+
/setup-github
70+
```
71+
72+
**Option B: Manually copy workflows**
73+
1. Copy the pre-built workflows from the [`/workflows`](./workflows) directory to your repository's `.github/workflows` directory.
6374

6475
### 4. Try it out!
65-
- Open a Pull Request in your repository
66-
- Comment `@gemini-cli /review` to trigger an AI review
67-
- Or wait for automatic reviews on new PRs
6876

69-
For detailed setup instructions and advanced configuration, see the [Authentication documentation](./docs/authentication.md).
77+
**Pull Request Review:**
78+
- Open a pull request in your repository and wait for automatic review
79+
- Comment `@gemini-cli /review` on an existing pull request to manually trigger a review
80+
81+
**Issue Triage:**
82+
- Open an issue and wait for automatic triage
83+
- Comment `@gemini-cli /triage` on existing issues to manually trigger triaging
84+
85+
**General AI Assistance:**
86+
- In any issue or pull request, mention `@gemini-cli` followed by your request
87+
- Examples:
88+
- `@gemini-cli explain this code change`
89+
- `@gemini-cli suggest improvements for this function`
90+
- `@gemini-cli help me debug this error`
91+
- `@gemini-cli write unit tests for this component`
7092

7193
## Workflows
7294

@@ -81,12 +103,8 @@ For a detailed guide on how to set up the issue triage system, go to the
81103
### Pull Request Review
82104

83105
This action can be used to automatically review pull requests when they are
84-
opened. Additionally, users with `OWNER`, `MEMBER`, or `COLLABORATOR`
85-
permissions can trigger a review by commenting `@gemini-cli /review` in a pull
86-
request.
87-
88-
For a detailed guide on how to set up the pull request review system, go to the
89-
[GitHub PR Review workflow documentation](./workflows/pr-review).
106+
opened. For a detailed guide on how to set up the pull request review system,
107+
go to the [GitHub PR Review workflow documentation](./workflows/pr-review).
90108

91109
### Gemini CLI Assistant
92110

@@ -95,13 +113,6 @@ AI assistant within the pull requests and issues to perform a wide range of
95113
tasks. For a detailed guide on how to set up the general-purpose Gemini CLI workflow,
96114
go to the [Gemini CLI workflow documentation](./workflows/gemini-cli).
97115

98-
## Configuration
99-
100-
For detailed information on configuring this action, see the following guides:
101-
102-
- **[Authentication](./docs/authentication.md):** Learn how to authenticate with Google services and the GitHub API
103-
- **[Observability](./docs/observability.md):** Set up telemetry to monitor action performance
104-
105116
### Inputs
106117

107118
<!-- BEGIN_AUTOGEN_INPUTS -->
@@ -139,9 +150,9 @@ For detailed information on configuring this action, see the following guides:
139150

140151
<!-- END_AUTOGEN_OUTPUTS -->
141152

142-
### Environment Variables
153+
### Repository Variables
143154

144-
The following environment variables are automatically passed into the action's inputs if set in your repository or workflow. You may also set them directly as workflow inputs if preferred.
155+
We recommend setting the following values as repository variables so they can be reused across all workflows. Alternatively, you can set them inline as action inputs in individual workflows or to override repository-level values.
145156

146157
| Name | Description | Type | Required | When Required |
147158
| --------------------------- | ------------------------------------------------------ | -------- | -------- | ------------------------- |
@@ -155,12 +166,12 @@ The following environment variables are automatically passed into the action's i
155166
| `APP_ID` | GitHub App ID for custom authentication. | Variable | No | Using a custom GitHub App |
156167

157168

158-
To add an environment variable:
169+
To add a repository variable:
159170
1) Go to your repository's **Settings > Secrets and variables > Actions > New variable**.
160171
2) Enter the variable name and value.
161172
3) Save.
162173

163-
For organization-wide or environment-specific variables, refer to the [GitHub documentation on variables][variables].
174+
For details about repository variables, refer to the [GitHub documentation on variables][variables].
164175

165176
### Secrets
166177

@@ -214,10 +225,10 @@ the [Observability documentation](./docs/observability.md).
214225

215226
## Customization
216227

217-
Create a `GEMINI.md` file in the root of your repository to provide
228+
Create a [GEMINI.md] file in the root of your repository to provide
218229
project-specific context and instructions to [Gemini CLI]. This is useful for defining
219230
coding conventions, architectural patterns, or other guidelines the model should
220-
follow.
231+
follow for a given repository.
221232

222233
## Contributing
223234

@@ -231,5 +242,6 @@ started.
231242
[Google AI Studio]: https://aistudio.google.com/apikey
232243
[Gemini CLI]: https://github.com/google-gemini/gemini-cli/
233244
[Google Cloud support]: https://cloud.google.com/support
234-
[variables]: https://docs.github.com/en/actions/learn-github-actions/variables
245+
[variables]: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-variables#creating-configuration-variables-for-a-repository
235246
[GitHub CLI]: https://docs.github.com/en/github-cli/github-cli
247+
[GEMINI.md]: https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md#context-files-hierarchical-instructional-context

0 commit comments

Comments
 (0)