gemini-cli/packages/core
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
..
src Add file operation telemetry (#1068) 2025-06-15 13:24:53 -07:00
README.md refactor: rename gemini-code to gemini-cli (#822) 2025-06-07 14:27:22 -07:00
index.ts refactor: Use default centralized Flash & Pro models everywhere (#994) 2025-06-13 08:25:42 +00:00
package-lock.json Improvements to web-fetch tool (#1030) 2025-06-13 17:44:14 -07:00
package.json Improvements to web-fetch tool (#1030) 2025-06-13 17:44:14 -07:00
tsconfig.json Rename server->core (#638) 2025-05-30 18:25:47 -07:00
vitest.config.ts Reduce coupling between core and cli packages (#961) 2025-06-12 17:17:29 -07:00

README.md

Nested package template. Either fill this out with "backend" functionality or create similar packages that you want built separate from the CLI.

To use this package from another dependent package in this monorepo:

  1. Add "@gemini-cli/core" to the dependent package's package.json
  2. Import a dependency by calling import { } from "@gemini-cli/core"