Skip to content

Commit 8b6738f

Browse files
authored
Merge branch 'google-gemini:main' into main
2 parents b29a172 + 5b5f496 commit 8b6738f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1863
-373
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
node-version: [20.x, 22.x, 24.x]
2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2424

2525
- name: Set up Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
cache: 'npm'
@@ -46,7 +46,7 @@ jobs:
4646
run: npm run typecheck
4747

4848
- name: Upload build artifacts
49-
uses: actions/upload-artifact@v4
49+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5050
with:
5151
name: build-artifacts-${{ matrix.node-version }}
5252
path: |
@@ -65,16 +65,16 @@ jobs:
6565
node-version: [20.x, 22.x, 24.x] # Should match the build job's matrix
6666
steps:
6767
- name: Checkout repository
68-
uses: actions/checkout@v4
68+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
6969

7070
- name: Set up Node.js ${{ matrix.node-version }}
71-
uses: actions/setup-node@v4
71+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
7272
with:
7373
node-version: ${{ matrix.node-version }}
7474
cache: 'npm'
7575

7676
- name: Download build artifacts
77-
uses: actions/download-artifact@v4
77+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
7878
with:
7979
name: build-artifacts-${{ matrix.node-version }}
8080
path: . # Download to the root, this will include package-lock.json and packages/*/dist
@@ -92,7 +92,7 @@ jobs:
9292

9393
- name: Publish Test Report (for non-forks)
9494
if: always() && (github.event.pull_request.head.repo.full_name == github.repository)
95-
uses: dorny/test-reporter@v2
95+
uses: dorny/test-reporter@890a17cecf52a379fc869ab770a71657660be727 # v2
9696
with:
9797
name: Test Results (Node ${{ matrix.node-version }})
9898
path: packages/*/junit.xml
@@ -101,13 +101,13 @@ jobs:
101101

102102
- name: Upload Test Results Artifact (for forks)
103103
if: always() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
104-
uses: actions/upload-artifact@v4
104+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
105105
with:
106106
name: test-results-fork-${{ matrix.node-version }}
107107
path: packages/*/junit.xml
108108

109109
- name: Upload coverage reports
110-
uses: actions/upload-artifact@v4
110+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
111111
if: always()
112112
with:
113113
name: coverage-reports-${{ matrix.node-version }}
@@ -127,10 +127,10 @@ jobs:
127127
node-version: [22.x] # Reduce noise by only posting the comment once
128128
steps:
129129
- name: Checkout repository
130-
uses: actions/checkout@v4
130+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
131131

132132
- name: Download coverage reports artifact
133-
uses: actions/download-artifact@v4
133+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
134134
with:
135135
name: coverage-reports-${{ matrix.node-version }}
136136
path: coverage_artifact # Download to a specific directory

.github/workflows/community-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- name: Generate GitHub App Token 🔑
2727
id: generate_token
28-
uses: actions/create-github-app-token@v2
28+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
2929
with:
3030
app-id: ${{ secrets.APP_ID }}
3131
private-key: ${{ secrets.PRIVATE_KEY }}

.github/workflows/e2e.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
sandbox: [sandbox:none, sandbox:docker]
1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2020

2121
- name: Set up Node.js
22-
uses: actions/setup-node@v4
22+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2323
with:
2424
node-version: 20.x
2525
cache: 'npm'
@@ -32,11 +32,11 @@ jobs:
3232

3333
- name: Set up Docker
3434
if: matrix.sandbox == 'sandbox:docker'
35-
uses: docker/setup-buildx-action@v3
35+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
3636

3737
- name: Set up Podman
3838
if: matrix.sandbox == 'sandbox:podman'
39-
uses: redhat-actions/podman-login@v1
39+
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1
4040
with:
4141
registry: docker.io
4242
username: ${{ secrets.DOCKERHUB_USERNAME }}

.github/workflows/gemini-automated-issue-triage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Generate GitHub App Token
2121
id: generate_token
22-
uses: actions/create-github-app-token@v2
22+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
2323
with:
2424
app-id: ${{ secrets.APP_ID }}
2525
private-key: ${{ secrets.PRIVATE_KEY }}

.github/workflows/gemini-scheduled-issue-triage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: Generate GitHub App Token
1919
id: generate_token
20-
uses: actions/create-github-app-token@v2
20+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
2121
with:
2222
app-id: ${{ secrets.APP_ID }}
2323
private-key: ${{ secrets.PRIVATE_KEY }}

.github/workflows/gemini-scheduled-pr-triage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
prs_needing_comment: ${{ steps.run_triage.outputs.prs_needing_comment }}
2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2323

2424
- name: Generate GitHub App Token
2525
id: generate_token
26-
uses: actions/create-github-app-token@v2
26+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
2727
with:
2828
app-id: ${{ secrets.APP_ID }}
2929
private-key: ${{ secrets.PRIVATE_KEY }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
steps:
5050
- name: Checkout code
51-
uses: actions/checkout@v4
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
5252
with:
5353
ref: ${{ github.sha }}
5454
fetch-depth: 0
@@ -69,7 +69,7 @@ jobs:
6969
echo "is_dry_run=${is_dry_run}" >> $GITHUB_OUTPUT
7070
7171
- name: Setup Node.js
72-
uses: actions/setup-node@v4
72+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
7373
with:
7474
node-version: '20'
7575
cache: 'npm'
@@ -130,7 +130,7 @@ jobs:
130130
npm run prepare:package
131131
132132
- name: Configure npm for publishing
133-
uses: actions/setup-node@v4
133+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
134134
with:
135135
node-version: '20'
136136
registry-url: 'https://wombat-dressing-room.appspot.com'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ In the PR description, explain the "why" behind your changes and link to the rel
7676

7777
## Forking
7878

79-
If you are forking the repository you will be able to run the Built, Test and Integration test workflows. However in order to make the integration tests run you'll need to add a [GitHub Repository Secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) with a value of `GEMINI_API_KEY` and set that to a valid API key that you have available. Your key and secret are private to your repo; no one without access can see your key and you cannot see any secrets related to this repo.
79+
If you are forking the repository you will be able to run the Build, Test and Integration test workflows. However in order to make the integration tests run you'll need to add a [GitHub Repository Secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) with a value of `GEMINI_API_KEY` and set that to a valid API key that you have available. Your key and secret are private to your repo; no one without access can see your key and you cannot see any secrets related to this repo.
8080

8181
Additionally you will need to click on the `Actions` tab and enable workflows for your repository, you'll find it's the large blue button in the center of the screen.
8282

docs/cli/authentication.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The Gemini CLI requires you to authenticate with Google's AI services. On initia
1010
1. You have a Google Workspace account. Google Workspace is a paid service for businesses and organizations that provides a suite of productivity tools, including a custom email domain (e.g. your-name@your-company.com), enhanced security features, and administrative controls. These accounts are often managed by an employer or school.
1111
1. You have received a free Code Assist license through the [Google Developer Program](https://developers.google.com/program/plans-and-pricing) (including qualified Google Developer Experts)
1212
1. You have been assigned a license to a current Gemini Code Assist standard or enterprise subscription.
13-
1. You are using the product outside the [supported regions](https://developers.google.com/gemini-code-assist/resources/available-locations) for free individual usage.>
13+
1. You are using the product outside the [supported regions](https://developers.google.com/gemini-code-assist/resources/available-locations) for free individual usage.
1414
1. You are a Google account holder under the age of 18
1515
- If you fall into one of these categories, you must first configure a Google Cloud Project Id to use, [enable the Gemini for Cloud API](https://cloud.google.com/gemini/docs/discover/set-up-gemini#enable-api) and [configure access permissions](https://cloud.google.com/gemini/docs/discover/set-up-gemini#grant-iam).
1616

@@ -40,9 +40,19 @@ The Gemini CLI requires you to authenticate with Google's AI services. On initia
4040
```
4141

4242
3. **Vertex AI:**
43-
- If not using express mode:
43+
- Obtain your Google Cloud API key: [Get an API Key](https://cloud.google.com/vertex-ai/generative-ai/docs/start/api-keys?usertype=newuser)
44+
- Set the `GOOGLE_API_KEY` environment variable. In the following methods, replace `YOUR_GOOGLE_API_KEY` with your Vertex AI API key:
45+
- You can temporarily set these environment variables in your current shell session using the following commands:
46+
```bash
47+
export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"
48+
```
49+
- For repeated use, you can add the environment variables to your [.env file](#persisting-environment-variables-with-env-files) or your shell's configuration file (like `~/.bashrc`, `~/.zshrc`, or `~/.profile`). For example, the following commands add the environment variables to a `~/.bashrc` file:
50+
```bash
51+
echo 'export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"' >> ~/.bashrc
52+
source ~/.bashrc
53+
```
54+
- To use Application Default Credentials (ADC), use the following command:
4455
- Ensure you have a Google Cloud project and have enabled the Vertex AI API.
45-
- Set up Application Default Credentials (ADC), using the following command:
4656
```bash
4757
gcloud auth application-default login
4858
```
@@ -59,17 +69,6 @@ The Gemini CLI requires you to authenticate with Google's AI services. On initia
5969
echo 'export GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"' >> ~/.bashrc
6070
source ~/.bashrc
6171
```
62-
- If using express mode:
63-
- Set the `GOOGLE_API_KEY` environment variable. In the following methods, replace `YOUR_GOOGLE_API_KEY` with your Vertex AI API key provided by express mode:
64-
- You can temporarily set these environment variables in your current shell session using the following commands:
65-
```bash
66-
export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"
67-
```
68-
- For repeated use, you can add the environment variables to your [.env file](#persisting-environment-variables-with-env-files) or your shell's configuration file (like `~/.bashrc`, `~/.zshrc`, or `~/.profile`). For example, the following commands add the environment variables to a `~/.bashrc` file:
69-
```bash
70-
echo 'export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"' >> ~/.bashrc
71-
source ~/.bashrc
72-
```
7372
4. **Cloud Shell:**
7473
- This option is only available when running in a Google Cloud Shell environment.
7574
- It automatically uses the credentials of the logged-in user in the Cloud Shell environment.

docs/cli/commands.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ Slash commands provide meta-level control over the CLI itself.
8181
- **`nodesc`** or **`nodescriptions`**:
8282
- **Description:** Hide tool descriptions, showing only the tool names.
8383

84+
- **`/privacy`**
85+
- **Description:** Display the Privacy Notice and allow users to select whether they consent to the collection of their data for service improvement purposes.
86+
8487
- **`/quit`** (or **`/exit`**)
8588
- **Description:** Exit Gemini CLI.
8689

0 commit comments

Comments
 (0)