Commit Graph

241 Commits

Author SHA1 Message Date
Will 保哥 51eba66528
Fix a heading issue for Authentication Setup doc (#2592) 2025-06-29 18:45:19 +00:00
Will 保哥 91502193ec
Fix a broken link (#2598) 2025-06-29 18:43:27 +00:00
Zircoz 87d4fc0560
docs: Add uninstallation instructions to README (#1985)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Allen Hutchison <adh@google.com>
Co-authored-by: Allen Hutchison <allen@hutchison.org>
2025-06-29 13:41:58 +00:00
Krushna Sharma 33bfda9879
docs: fix typos and grammatical errors (#2459)
Co-authored-by: Allen Hutchison <adh@google.com>
2025-06-29 01:23:49 +00:00
Vladislav Semyanov f31b1274bf
docs: remove duplicate tool descriptions in file-system.md (#1790)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-28 23:26:38 +00:00
christine betts 0d51e4b4b7
Add troubleshooting note about CI env variables (#2229)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
2025-06-28 16:25:56 +00:00
Reid 8c13c1e82a
fix: typo (#2415)
Signed-off-by: reidliu41 <reid201711@gmail.com>
2025-06-28 16:18:20 +00:00
Kalle Ahlström 9665928860
chore: add proper pluralization handling for match in grep tool (#2344)
Co-authored-by: Allen Hutchison <adh@google.com>
2025-06-28 14:41:25 +00:00
Sandy Tao 150df382f8
Upgrade to Ink 6 and React 19 (#2096)
Co-authored-by: jacob314 <jacob314@gmail.com>
2025-06-27 23:39:54 +00:00
Preston Holmes 5fd6664c4b
Further clarify the situations where a Project ID is required (#2029)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2025-06-27 16:51:28 +00:00
Tommaso Sciortino c55b15f705
Improve LoadCodeAssist error handling (#1645) 2025-06-26 15:27:20 +00:00
Vladislav Semyanov 121bba3464
docs: fix broken configuration link in themes.md (#1780) 2025-06-26 07:37:42 +00:00
김진엽 (Nathan) 02bd8dfeff
docs: fix multiple typos in documentation files (#1781) 2025-06-26 07:36:31 +00:00
Jerop Kipruto b6b9923dc3
Streamline issue submission with YAML forms (#1608) 2025-06-25 22:50:24 +00:00
Tommaso Sciortino 79c647d486
Merge "Login with Google Workspace" auth option into "Login with Google" (#1574)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
2025-06-25 22:38:18 +00:00
anj-s 00b24c917e
Update usage stats doc (#1636) 2025-06-25 22:26:07 +00:00
anj-s 5aa6b9a84b
Update docs and add faq section (#1625) 2025-06-25 21:32:16 +00:00
anj-s 4b5ca6bc77
Add tos and privacy links docs for clarity (#1571) 2025-06-25 19:32:25 +00:00
Mark McDonald 452b82162b
Adding some troubleshooting text for login issues (#1451) 2025-06-25 19:00:36 +00:00
DongJin Jeong aa0e375508
Fix: update npx command to correct GitHub repository URL (#1488) 2025-06-25 18:58:11 +00:00
Arjun Lall 63a7fbc5fd
Fixed Checkpointing docs for enabling checkpointing using settings.json (#1534) 2025-06-25 18:51:38 +00:00
N. Taylor Mullen 3a369ddec3
feat: Refine model fallback messaging to reflect reality. (#1527) 2025-06-25 17:33:32 +00:00
starsandskies 0915bf7d67
Remove GEMINI_CODE_ASSIST env variable from configuration.md doc (#1514) 2025-06-25 16:45:40 +00:00
Marat Boshernitsan 9897a2b80a
Clarify why authentication failures might be happening and direct users to documentation (#1478)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-06-25 16:11:54 +00:00
Thomas Kosiewski af4dfd9327
Update authentication.md (#1429)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-06-25 15:48:15 +00:00
matt korwel 6991ba1387
Version 0 1 1 (#1426) 2025-06-25 13:47:27 +00:00
Brandon Keiji f6c36f75e3
fix: prepublish changes to package names (#1420) 2025-06-25 12:41:11 +00:00
Jenna Inouye a3c46c0d31
Docs: Add link links to tools/index.md. (#1419) 2025-06-25 11:16:17 +00:00
Preston Holmes 4cc2b27f1d
Docs: update docs to clarify the differences between Google account login o… (#1409)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
Co-authored-by: matt korwel <mattkorwel@google.com>
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-06-25 04:15:45 +00:00
Daniel Tedesco 268d29f05c
docs: fix typos in documentation (#1411)
Co-authored-by: Dan Tedesco <dted@google.com>
2025-06-25 03:53:03 +00:00
Brian Ray d45d414c93
sandbox doc (#1390)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
Co-authored-by: Jenna Inouye <jinouye@google.com>
2025-06-24 23:11:39 +00:00
Jenna Inouye 4bf18da2b0
Documents: Add docs tools pages (#1397) 2025-06-24 22:31:58 +00:00
anj-s 418f67086b
Add the link to the privacy policy to the Usage Statistics section and remove debug logs (#1393) 2025-06-24 22:31:45 +00:00
cperry-goog 13cff94b1a
docs: add screenshot to README (#1396) 2025-06-24 22:31:40 +00:00
Louis Jimenez 7421bf681b
Checkpointing documentation (#1321)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-06-24 22:31:32 +00:00
Brian Ray e613cbc448
MCP documentation improvements (#1386)
Co-authored-by: Jenna Inouye <jinouye@google.com>
2025-06-24 13:19:36 -07:00
starsandskies 9f5a625730
Fix broken doc links (#1368) 2025-06-23 20:56:57 -07:00
Bryan Morgan f7caca5f94
Updated README.md (#1367) 2025-06-23 23:37:07 -04:00
Tommaso Sciortino 0abd2a644e
Improve Auth error messaging (#1358) 2025-06-24 01:37:41 +00:00
Jerop Kipruto aca034fdfe
Refactor usage statistics to be a top-level setting (#1363)
This commit refactors the `usageStatisticsEnabled` setting from a sub-property of the `telemetry` configuration to a top-level setting. This change simplifies the configuration by decoupling usage statistics from the telemetry settings.

The documentation has also been updated to reflect this change.
2025-06-24 00:29:31 +00:00
cperry-goog b3741f7016
docs: update configuration.md with new CLI options (#1360) 2025-06-23 17:24:55 -07:00
Bryan Morgan e21dbed8c8
[June 25] Updated docs for telemetry and user statistics (#1346) 2025-06-23 22:25:49 +00:00
starsandskies 160d6a6552
Docs: Add `telemetry` to the list of configuration options (#1348) 2025-06-23 22:18:07 +00:00
Bryan Morgan e423d20a8d
Updated docs and /stats command to support lack of token caching support for OAuth users (b/426943001) (#1307) 2025-06-23 21:55:24 +00:00
Jerop Kipruto 21e6a36cf1
docs(telemetry): relocate telemetry documentation (#1327)
Moves the telemetry.md file from docs/core to the top-level docs/ directory to make it more discoverable.

Updates the link in the main index.md and removes the old reference from the CLI configuration page.
2025-06-23 21:24:48 +00:00
starsandskies d2ae7af487
Edit pass of docs/core/index.md (#1338)
Make a pass through the docs/core/index.md file to hopefully improve readability and consistency.

Of particular note, I've cut out a big chunk that felt mostly like implementation details that aren't particularly relevant for public consumption, and I cut out a discussion of cli/core interconnection that is covered better higher up in the docs hierarchy
2025-06-23 21:07:03 +00:00
cperry-goog 139668c1d1
Docs/authentication doc (#1341) 2025-06-23 13:02:52 -07:00
cperry-goog 1825105d8f
feat(docs): add `/chat` and `/restore` commands (#1336) 2025-06-23 12:10:23 -07:00
Jerop Kipruto 64e1c7df75
docs: update telemetry documentation and scripts (#1318) 2025-06-23 06:10:26 +01:00
cperry-goog 5cf8dc4f07
Docs update (#1295) 2025-06-22 05:06:58 +00:00
Billy Biggs 0779697da6
Add setting enableRecursiveFileSearch to control @-file completion (#1290) 2025-06-22 01:23:35 +00:00
cperry-goog e20171e7dd
Updating missing commands (#1289) 2025-06-21 17:41:03 -07:00
starsandskies ddb32a3614
Edit pass of docs/troubleshooting.md (#1200)
Make a pass through the docs/troubleshooting.md file to hopefully improve readability and consistency.

Notably, some links in the existing documentation appear to point to non-existent pages. I've updated them to what I believe is an appropriate alternative. Also, there's some vague usage of "CLI" and "server", which I've -hopefully correctly- called "Gemini CLI" and "MCP server"
2025-06-20 17:51:51 +00:00
starsandskies 7c4af82da4
Edit pass of docs/integration-tests.md (#1198)
Co-authored-by: cperry-goog <78765543+cperry-goog@users.noreply.github.com>
Co-authored-by: Chris Perry <cperry@google.com>
2025-06-20 10:27:00 -07:00
starsandskies 71f1dcf39a
Edit pass of docs/extensions.md (#1187)
Co-authored-by: cperry-goog <78765543+cperry-goog@users.noreply.github.com>
2025-06-20 09:49:57 -07:00
starsandskies fefe97a1db
Add missing command and alphabetize docs/cli/commands.md (#1194)
As noted in Issue #1189, the /stats command is missing. While we're here, alphabetizing the / commands makes sense in order to better organization the page.
2025-06-20 16:43:47 +00:00
starsandskies 639f8e70d2
Edit pass for the first chunk of docs/cli/configuration.md (#1174)
Co-authored-by: cperry-goog <78765543+cperry-goog@users.noreply.github.com>
2025-06-20 09:39:21 -07:00
starsandskies c48fcaa8c3
Edit pass of docs/cli/themes.md (#1171)
Most notably, the list of available themes didn't match (in completeness or name) the examples provided at the end of the file (nor the listing I found in /packages/cli/src/ui/themes)
2025-06-19 16:24:33 -07:00
Seth Troisi c7a422ccdd
GC guided review of docs (#1167) 2025-06-18 18:49:59 +00:00
starsandskies 589a7b59c6
Edit pass of docs/cli/tutorials.md (#1186)
Make a pass through the docs/cli/tutorials.md file to hopefully improve readability and consistency.
2025-06-18 18:15:49 +00:00
N. Taylor Mullen 7f189f4d5f
docs: update documentation from starsandskies/patch-2 (#1143)
Co-authored-by: starsandskies <nstock@google.com>
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-06-18 05:02:07 +00:00
starsandskies e12c60fcab
Move theme discussion from configuration.md to themes.md (#1158)
This content looks like it is better hosted in the themes.md doc.

This is as close as possible to an as-is cut-paste from one file to the other, with the goal of minimizing fine-grained review in this particular PR. I'll take another pass through themes.md specifically to improve the moved content in a follow up PR
2025-06-17 16:07:12 -07:00
matt korwel df938d6ee8
Preflight and integration npx (#1096) 2025-06-16 15:27:29 +00:00
Jerop Kipruto a6c16ab08d
small fixes in telemetry docs (#1081)
- `GOOGLE_CLOUD_PROJECT` --> `OTLP_GOOGLE_CLOUD_PROJECT`
- Remove `npm run start:gcp` shorthand from docs until after improving cleanup process
2025-06-16 02:45:16 +00:00
Jerop Kipruto 7f06ad40c5
Add a command for starting Gemini CLI with GCP telemetry (#1079)
This command enables starting the application with GCP telemetry:

```shell
npm run start:gcp
```
2025-06-15 21:28:29 -04:00
Jerop Kipruto e772dc2b85
Decouple telemetry project ID configuration (#1077)
#750 

Renames project ID for telemetry from `GOOGLE_CLOUD_PROJECT` to `OTLP_GOOGLE_CLOUD_PROJECT`.

This change allows for a separate Google Cloud Project to be used for telemetry data, distinct from the project used for other services like Vertex AI or Code Assist. This enhances clarity and flexibility in project configuration.
2025-06-16 01:12:57 +00:00
Jerop Kipruto 714421c2da
Add file operation telemetry (#1068)
Introduces telemetry for file create, read, and update operations.

This change adds the `gemini_cli.file.operation.count` metric, recorded by the `read-file`, `read-many-files`, and `write-file` tools.

The metric includes the following attributes:
    - `operation` (string: `create`, `read`, `update`): The type of file operation.
    - `lines` (optional, Int): Number of lines in the file.
    - `mimetype` (optional, string): Mimetype of the file.
    - `extension` (optional, string): File extension of the file.

Here is a stacked bar chart of file operations by extension (`js`, `ts`, `md`):
![image](https://github.com/user-attachments/assets/3e8f8ea9-6155-4186-863c-075cc47647c5)

Here is a stacked bar chart of file operations by type (`create`, `read`, `update`):
![image](https://github.com/user-attachments/assets/3fcf491d-31d0-4ba8-80e6-7fd2bd9c7c27)

#750 

cc @allenhutchison as discussed
2025-06-15 13:24:53 -07:00
Billy Biggs 6959663646
Add support for /mcp schema to show full parameter schema as JSON (#1050)
Outputs a raw JSON version of the parameter names and descriptions as provided to the model, plus minor formatting adjustments to /mcp desc.
2025-06-15 11:25:40 -07:00
Billy Biggs da09431be9
Add support for showing descriptions of CLI tools (#1052)
Adds support for /tools desc to show the full description of tools as provided to the model.
2025-06-15 07:56:07 -07:00
Jerop Kipruto 53753f0455
Add telemetry command and refactor telemetry settings (#1060)
#750 

### Telemetry Settings
Refactors telemetry configuration to use a nested `telemetry` object in `settings.json`, for example:

```json
{
  "telemetry": {
    "enabled": true,
    "target": "gcp"
    "log-prompts": "true"
  },
  "sandbox": false
}
```

The above includes
- Centralized telemetry settings under a `telemetry` object in `settings.json`.
- CLI flags for the `gemini` command to override all telemetry sub-settings:
    - `--telemetry` / `--no-telemetry`
    - `--telemetry-target <local|gcp>`
    - `--telemetry-otlp-endpoint <URL>`
    - `--telemetry-log-prompts` / `--no-telemetry-log-prompts`
- Updates `packages/cli/src/config/config.ts` and `packages/core/src/config/config.ts` to read from the new settings structure and respect the new CLI flags.
- Modifies `scripts/handle-telemetry.js`, `scripts/local_telemetry.js`, and `scripts/telemetry_utils.js` to align with the new settings structure.
- Updates `docs/core/telemetry.md` to reflect the new settings structure, CLI flags, and order of precedence.
- Renames `logUserPromptsEnabled` to `logPrompts` for brevity.

### `npm run telemetry`

Add a new `npm run telemetry` command that uses `scripts/telemetry.js`, automates the entire process of setting up a local and GCP telemetry pipelines, including configuring the necessary settings in the `.gemini/settings.json` workspace file and installing required binaries (e.g. `otelcol-contrib`).

---
```shell
$ npm run telemetry -- --target=gcp

> gemini-cli@0.1.0 telemetry
> node scripts/telemetry.js --target=gcp

⚙️  Using command-line target: gcp
🚀 Running telemetry script for target: gcp.
 Starting Local Telemetry Exporter for Google Cloud 
⚙️  Enabled telemetry in workspace settings.
🔧 Set telemetry OTLP endpoint to http://localhost:4317.
🎯 Set telemetry target to gcp.
 Workspace settings updated.
 Using Google Cloud Project ID: foo-bar

🔑 Please ensure you are authenticated with Google Cloud:
  - Run `gcloud auth application-default login` OR ensure `GOOGLE_APPLICATION_CREDENTIALS` environment variable points to a valid service account key.
  - The account needs "Cloud Trace Agent", "Monitoring Metric Writer", and "Logs Writer" roles.
 otelcol-contrib already exists at /Users/jerop/github/gemini-cli/.gemini/otel/bin/otelcol-contrib
🧹 Cleaning up old processes and logs...
 Deleted old GCP collector log.
📄 Wrote OTEL collector config to /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.yaml
🚀 Starting OTEL collector for GCP... Logs: /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.log
 Waiting for OTEL collector to start (PID: 17013)...
 OTEL collector started successfully on port 4317.

 Local OTEL collector for GCP is running.

🚀 To send telemetry, run the Gemini CLI in a separate terminal window.

📄 Collector logs are being written to: /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.log

📊 View your telemetry data in Google Cloud Console:
   - Logs: https://console.cloud.google.com/logs/query;query=logName%3D%22projects%2Ffoo-bar%2Flogs%2Fgemini_cli%22?project=foo-bar
   - Metrics: https://console.cloud.google.com/monitoring/metrics-explorer?project=foo-bar
   - Traces: https://console.cloud.google.com/traces/list?project=foo-bar

Press Ctrl+C to exit.
^C
👋 Shutting down...
⚙️  Disabled telemetry in workspace settings.
🔧 Cleared telemetry OTLP endpoint.
🎯 Cleared telemetry target.
 Workspace settings updated.
🛑 Stopping otelcol-contrib (PID: 17013)...
 otelcol-contrib stopped.
```
2025-06-15 00:47:32 -04:00
Keir Mierle 32dd298351
fix: Push tool calls to absolute paths (#1055) (#1057)
Make several changes to guide the model to request absolute paths,
reducing frequent accidental relative path tool call failures.

- Switch the parameter name: path --> absolute_path.
- Update the tool definition to strongly require an absolute path.
- Update the system prompt to indicate absolute paths are required.
- Update the system prompt tool use examples to use absolute paths.

Test case:

Open GC in GC: "Locate the primary file calling genai"
- Expected: Model opens files with absolute path, successfully.
- Actual (pre-patch): Failure, attempts to read with relative path.
- Actual (post-patch): Success, attempts to read with absolute path.
2025-06-14 21:16:11 -07:00
Scott Densmore e30e650a77
docs: document environment variables for cloud services (#1048) 2025-06-14 15:19:05 -07:00
Jerop Kipruto 3bcb3c3666
docs: clarify telemetry script usage (#1034)
Updates the telemetry documentation and the GCP telemetry script to make it clearer that the Gemini CLI needs to be run in a separate terminal session after starting the collector script.

This addresses potential user confusion where they might expect telemetry data to appear without actively using the CLI.

#750
2025-06-14 14:49:21 +00:00
Allen Hutchison 643bdf31d5
feat: Add custom URL support for the /bug command (#1017) 2025-06-14 07:00:24 +00:00
Jacob MacDonald d5c6bb9740
Add `/compress` command to force a compression of the context (#986)
Related to https://b.corp.google.com/issues/423605555 - I figured this might be a simpler solution to start with, while still also being useful on its own even if we do implement that.
2025-06-14 04:21:40 +00:00
Jerop Kipruto 1452bb4ca4
Add GCP telemetry script (#1033)
Adds a script -  `scripts/telemetry_gcp.js` - to simplify setting up a local OpenTelemetry collector that forwards data to Google Cloud. This is a follow up to the script for local telemetry `scripts/local_telemetry.js` added in #1015.

This script automates downloading necessary binaries, configuring the collector, and updating workspace settings.

Also includes `scripts/telemetry_utils.js` with shared helper functions for telemetry scripts. Will refactor `scripts/local_t elemetry.js` in next steps to use this shared functionality.

Updates `docs/core/telemetry.md` to include:
- A new "Quick Start" section
- Detailed instructions for the new GCP automated script
- Reorganization of existing sections for clarity

#750 

---
```
 Starting Local Telemetry Exporter for Google Cloud 
⚙️  Enabled telemetry in workspace settings.
🔧 Set telemetry OTLP endpoint to http://localhost:4317.
 Workspace settings updated.
 Using Google Cloud Project ID: foo-bar

🔑 Please ensure you are authenticated with Google Cloud:
  - Run `gcloud auth application-default login` OR ensure `GOOGLE_APPLICATION_CREDENTIALS` environment variable points to a valid service account key.
  - The account needs "Cloud Trace Agent", "Monitoring Metric Writer", and "Logs Writer" roles.
 otelcol-contrib already exists at /Users/jerop/github/gemini-cli/.gemini/otel/bin/otelcol-contrib
🧹 Cleaning up old processes and logs...
 Deleted old GCP collector log.
📄 Wrote OTEL collector config to /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.yaml
🚀 Starting OTEL collector for GCP... Logs: /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.log
 Waiting for OTEL collector to start (PID: 65145)...
 OTEL collector started successfully on port 4317.

 Local OTEL collector for GCP is running.

📄 Collector logs are being written to: /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.log

📊 View your telemetry data in Google Cloud Console:
   - Traces: https://console.cloud.google.com/traces/list?project=foo-bar
   - Metrics: https://console.cloud.google.com/monitoring/metrics-explorer?project=foo-bar
   - Logs: https://console.cloud.google.com/logs/query;query=logName%3D%22projects%2Ffoo-bar%2Flogs%2Fgemini_cli%22?project=foo-bar

Press Ctrl+C to exit.
^C
👋 Shutting down...
⚙️ Disabled telemetry in workspace settings.
🔧 Cleared telemetry OTLP endpoint.
 Workspace settings updated.
🛑 Stopping otelcol-contrib (PID: 65145)...
 otelcol-contrib stopped.
```
2025-06-13 23:28:18 -04:00
Keir Mierle 9954779739
Add a local telemetry launcher (#1015) 2025-06-13 18:08:03 -07:00
Allen Hutchison 31b28ade01
Improvements to web-fetch tool (#1030) 2025-06-13 17:44:14 -07:00
Tommaso Sciortino 54f0d9d0e5
Fix default extension context filename and update docs (#1024) 2025-06-13 13:57:00 -07:00
Jerop Kipruto 1f63f3331f
Revert "Telemetry: Auto-export to GCP if GOOGLE_CLOUD_PROJECT is set" (#1011) 2025-06-13 10:27:22 -07:00
starsandskies 8e804c9fa1
Edit pass of docs/cli/index.md (#999)
Make a pass through the docs/deployment.md file to hopefully improve readability and conciseness

Notably, I've proposed axing both the "Core Features" section - which feels too promotional this far down the folder hierarchy and which is somewhat repetitive to later in the page - and the "Basic Interaction" section - which is covered better, and makes more sense, in other parts of the documentation
2025-06-13 16:53:30 +00:00
Billy Biggs 2a1ad1f5d9
Update contextFileName to support an optional list of strings (#1001) 2025-06-13 09:19:08 -07:00
Anas H. Sulaiman 34e0d9c0b6
cleanup unused `allowBuildArtifacts` (#1010) 2025-06-13 12:00:38 -04:00
Anas H. Sulaiman c886f08525
cleanup unused `customIgnorePatterns` (#1009) 2025-06-13 11:49:48 -04:00
Jerop Kipruto 95e4a60a83
Telemetry: Auto-export to GCP if GOOGLE_CLOUD_PROJECT is set (#1003)
This change simplifies telemetry setup for users who want to integrate with GCP, as they no longer need to configure a local collector or an explicit endpoint if their project is already set up in the environment.

This change updates the telemetry system to automatically export traces, logs, and metrics to Google Cloud Platform (GCP) if the `GOOGLE_CLOUD_PROJECT` environment variable is set and no explicit `telemetryOtlpEndpoint` is configured by the user.

Key changes:
-   The default `telemetryOtlpEndpoint` in `Config` is now an empty string.
-   The `initializeTelemetry` SDK logic now prioritizes:
    -  User-defined `telemetryOtlpEndpoint`.
    -  `GOOGLE_CLOUD_PROJECT` for direct GCP export.
    -  Console exporters as a fallback.
-   If an invalid `telemetryOtlpEndpoint` is provided, it falls back to console exporters with a warning.

#750
2025-06-13 03:51:41 -04:00
Jerop Kipruto b20c8389f3
Handle telemetry in non-interactive mode (#1002)
Changes:
- Ensure proper shutdown in non-interactive mode
- Ensures the initial user prompt is logged in non-interactive mode
- Improve telemetry for streaming - handle chunks and input token count is now alongside other token counts in response

To test:
- Follow instructions in https://github.com/google-gemini/gemini-cli/blob/main/docs/core/telemetry.md#google-cloud
- Run CLI in non-interactive mode and observe logs/metrics in GCP Logs Explorer and Metrics Explorer

#750
2025-06-13 03:44:17 -04:00
Tommaso Sciortino 431ee839a0
Code Assist cleanup and docs (#993) 2025-06-12 18:00:17 -07:00
Jerop Kipruto 3c3da655b0
Refactor OTEL logging for API calls (#991)
Refactor OpenTelemetry logging for API requests, responses, and errors. Moved logging responsibility from GeminiClient to GeminiChat for more detailed logging.

#750
2025-06-12 16:36:51 -07:00
Eddie Santos 61d0cc39fd
GitHub MCP warning (#979) 2025-06-12 22:23:45 +00:00
Jerop Kipruto 6723c72fa5
telemetry: include user decisions in tool call logs (#966)
Add the user's decision (accept, reject, modify) to tool call telemetry to better understand user intent. The decision provides crucial context to the `success` metric, as a user can reject a call that would have succeeded or accept one that fails. 

Also prettify the arguments json.

Example: 
![image](https://github.com/user-attachments/assets/251cb9fc-ceaa-4cdd-929c-8de47031aca8)

#750
2025-06-12 20:48:10 +00:00
starsandskies af247a6cbd
Edit pass of docs/architecture.md (#971) 2025-06-12 16:44:55 +00:00
Mark McDonald 041e7c177c
Added note about using MCP/tools with a sandbox (#933) 2025-06-11 22:49:58 -07:00
Jerop Kipruto 89f682f081
Telemetry: Improve clarity of user prompt event (#967) 2025-06-11 21:43:00 -04:00
Leo 1ef68e0612
feat: External editor settings (#882) 2025-06-11 18:21:54 -07:00
JingboWang1997-1 6ecdecbdcc
add excludeTools flag to settings.json config (#957) 2025-06-11 14:32:23 -07:00
matt korwel 4160d904da
Extensibility: Gemini.md files (#944) 2025-06-11 20:34:35 +00:00
jerop c0580eaf4b feat(telemetry): expand cli configuration event
Adds the following attributes to the  event:
- embedding_model
- api_key_enabled
- code_assist_enabled
- debug_mode
- mcp_servers

This additional data will provide more insight into user configurations.
2025-06-11 16:22:35 -04:00
jerop 03bc1f3141 feat(telemetry): Update API response in telemetry
Adds the text content of the API response to the  telemetry event. This provides more context for debugging and analysis without logging the entire, potentially large, response object.

- Adds an optional  field to the  type.
- Updates  to include the  field in the logged attributes.
- Modifies the  to extract the response text using  and pass it to the logger.
- Adds a new test file for the telemetry loggers, including tests for the  function to verify the new functionality.
2025-06-11 14:18:16 -04:00
jerop d96af8bacd refactor(telemetry): pass config object to telemetry functions
This commit refactors the telemetry system to pass a  object to various logging and metrics functions. This change centralizes configuration management within the telemetry system, making it more modular and easier to maintain.

The  constructor and various tool execution functions have been updated to accept the  object, which is then passed down to the telemetry functions. This eliminates the need to pass individual configuration values, such as , through multiple layers of the application.
2025-06-11 13:24:41 -04:00
jerop 7ba2b13870 update token usage with types 2025-06-11 10:38:07 -04:00
jerop 3f5ac384cc update from metrics and logs prefix from gemini_code to gemini_cli 2025-06-11 01:28:26 -04:00
jerop b92fa78a1e docs(telemetry): Refine OTEL Collector setup instructions
Standardizes on the  distribution for local and Google Cloud setups.

Restructures the guide to present Docker and standalone binary as clear, parallel options and makes the Google Cloud command more robust.
2025-06-10 20:04:05 -04:00
Tommaso Sciortino 4e84431df3
Allow simple extensions for registering MCPservers (#890) 2025-06-10 15:48:39 -07:00
jerop 916cfee08d update documentation for otel 2025-06-10 18:14:04 -04:00
jerop f0f7a30d9f docs(telemetry): improve telemetry documentation
This commit enhances the telemetry documentation with several key improvements for clarity and usability.

- Adds a prominent note clarifying that telemetry is currently incompatible with sandbox mode.
- Updates the example JSON configuration to explicitly include sandbox: false to prevent user confusion.
- Introduces a new Configurations section with instructions to create the  directory.
- Adds a new step for setting necessary environment variables for the Google Cloud setup.
- Makes the  command for Google Cloud more portable by using the  environment variable instead of a hardcoded path.
- Re-numbers the steps in the Google Cloud setup guide to maintain a logical flow.
2025-06-10 16:51:46 -04:00
anj-s 83660ec016
Fix null pointer for traces field and use the batch processor (#884) 2025-06-10 09:24:27 -07:00
Olcan e38d2078cc
restricted networking for all sandboxing methods, new seatbelt profiles, updated docs, fixes to sandbox build, debugging through sandbox (#891) 2025-06-10 08:58:37 -07:00
Brandon Keiji 6e5332f716
docs: add deployment documentation (#874) 2025-06-09 19:58:24 +00:00
matt korwel 3b943c1582
Windows: Refactor Shell Scripts to Node.js for Cross-Platform Compatibility (#784) 2025-06-09 12:19:42 -07:00
Olcan 87474e52d7
rename shell tool more intuitively as run_shell_command (from historical name of execute_bash_command inherited from terminal tool) (#869) 2025-06-09 08:57:30 -07:00
N. Taylor Mullen d62dad5575
Revert "Add batch editing capabilities to Edit Tool (#648)" (#857) 2025-06-08 23:20:43 +00:00
Bryan Morgan e95a6086fc
Bryanmorgan/add mcp description support (#825) 2025-06-07 18:30:56 -04:00
cperry-goog 63757d6a7a
docs: update and reorganize documentation (#806) 2025-06-07 10:47:30 -07:00
Keith Ballinger 0c86874677
Add batch editing capabilities to Edit Tool (#648)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-06 22:54:37 -07:00
jerop 21acdee0a0 docs: Initialize tutorials section with MCP server example
This commit adds a new `tutorials.md` file to the CLI documentation.
This section is intended to house various tutorials for using Gemini CLI.

The initial content includes a tutorial on setting up Model Context
Protocol (MCP) servers, using the GitHub MCP server as an example.

The `docs/cli/index.md` has been updated to include a link to this
new tutorials section.
2025-06-06 13:05:13 -04:00
jerop 4e9d365407 feat: Enable environment variable substitution in settings
This commit introduces the ability to use system environment variables
within the settings files (e.g., `settings.json`). Users can now
reference environment variables using the `${VAR_NAME}` syntax.

This enhancement improves security and flexibility, particularly
for configurations like MCP server settings, which often require
sensitive tokens.

Previously, to configure an MCP server, a token might be directly
embedded:
```json
"mcpServers": {
  "github": {
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "pat_abc123"
    }
    // ...
  }
}
```

With this change, the same configuration can securely reference an
environment variable:
```json
"mcpServers": {
  "github": {
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
    }
    // ...
  }
}
```

This allows users to avoid storing secrets directly in configuration files.
2025-06-06 11:47:37 -04:00
Jerop Kipruto 2ebf2fbc82
OpenTelemetry Integration & Telemetry Control Flag (#762) 2025-06-05 13:04:25 -07:00
Eddie Santos e02868bb1a
Bump default model to `gemini-2.5-pro-preview-06-05` (#765) 2025-06-05 11:52:36 -07:00
Tolik Malibroda 1d20cedf03
fix: Disable automatic image building if BUILD_SANDBOX is not provided (#764) 2025-06-05 18:47:39 +02:00
Tolik Malibroda 4d4cf0f2f9
feat: Add multi-stage docker build support for custom sandbox.Dockerfile (#746) 2025-06-05 17:46:54 +02:00
Miguel Solorio a8ac9b1fac
Add Theme docs (#753) 2025-06-05 08:10:05 -07:00
Riccardo Carlesso 13b55c6e68
Docs: Update architecture diagram with Google colors (for future aricles) (#718) 2025-06-04 12:33:07 -07:00
Keith Ballinger a14aada945
Fix broken documentation links after server->core folder rename (#740) 2025-06-04 10:02:07 -07:00
Keith Ballinger c313762ba0
Ignore folders files (#651)
# Add .gitignore-Aware File Filtering to gemini-cli

This pull request introduces .gitignore-based file filtering to the gemini-cli, ensuring that git-ignored files are automatically excluded from file-related operations and suggestions throughout the CLI. The update enhances usability, reduces noise from build artifacts and dependencies, and provides new configuration options for fine-tuning file discovery.

Key Improvements
.gitignore File Filtering

All @ (at) commands, file completions, and core discovery tools now honor .gitignore patterns by default.
Git-ignored files (such as node_modules/, dist/, .env, and .git) are excluded from results unless explicitly overridden.
The behavior can be customized via a new fileFiltering section in settings.json, including options for:
Turning .gitignore respect on/off.
Adding custom ignore patterns.
Allowing or excluding build artifacts.
Configuration & Documentation Updates

settings.json schema extended with fileFiltering options.
Documentation updated to explain new filtering controls and usage patterns.
Testing

New and updated integration/unit tests for file filtering logic, configuration merging, and edge cases.
Test coverage ensures .gitignore filtering works as intended across different workflows.
Internal Refactoring

Core file discovery logic refactored for maintainability and extensibility.
Underlying tools (ls, glob, read-many-files) now support git-aware filtering out of the box.


Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-04 04:40:46 +00:00
Cindy Xing d85f09ac51
Update configuration.md (#722) 2025-06-03 21:33:02 -07:00
Olcan e190249732
link tool discovery/call docs from core configuration doc (#720) 2025-06-03 10:22:43 -07:00
Olcan d967752833
document mcp server trust option (#719) 2025-06-03 10:08:34 -07:00
Olcan 59b6267b2f
allow toolDiscoveryCommand to return function declarations with or without a tool wrapper; fully document both toolDiscoveryCommand and toolCallCommand with examples and pointers to API docs (#696) 2025-06-02 13:41:49 -07:00
Sandy Tao 4a455a053a
Add documentation about debugging using React DevTools (#679) 2025-06-02 09:16:03 -07:00
Allen Hutchison 53bf778497
feat: allow custom filename for context files (#654)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-05-31 12:49:28 -07:00
Tommaso Sciortino 21fba832d1
Rename server->core (#638) 2025-05-30 18:25:47 -07:00
cperry-goog 9f85f8ed29
docs: Update README, CONTRIBUTING, and CLI configuration docs (#591)
cleaning up for now, will take another pass
2025-05-30 12:20:12 -07:00
Jacob Richman dab7517622
Refactor read-file and support images. (#480) 2025-05-29 15:30:18 -07:00
Jacob Richman 937f473651
Update docs and tool description for read-many-files. (#456) 2025-05-20 16:32:49 -07:00
Olcan 8b20d16ba8
coreTools doc tweak (#452) 2025-05-20 12:35:44 -07:00
cperry-goog d1210f2e0a
Docs: Update CLI and Server documentation for recent features (#430) 2025-05-20 10:37:21 -07:00
Olcan 76cf5e9fc1
rename env vars GEMINI_CODE_{MODEL,SANDBOX,SANDBOX_IMAGE} (#411) 2025-05-17 17:28:44 -07:00
N. Taylor Mullen c09bad9393
Docs: Update MCP server configuration (#396) 2025-05-16 17:19:00 -07:00
Olcan 1728bf3f44
fixes and tweaks to docs, mostly related to sandboxing (#385) 2025-05-16 13:09:27 -07:00
cperry-goog 59e8fcb409
Docs: Fix broken links and update documentation (#377) 2025-05-15 20:43:01 -07:00
cperry-goog 58ef39e2a9
Docs: Add initial project documentation structure and content (#368)
Co-authored-by: Taylor Mullen <ntaylormullen@google.com>
2025-05-15 20:04:33 -07:00