Commit Graph

113 Commits

Author SHA1 Message Date
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