Commit graph

55 commits

Author SHA1 Message Date
Sijie Wang
fbdc8d5ab3
Vim mode (#3936) 2025-07-25 22:36:42 +00:00
Brandon Keiji
d7a304bcff
feat(memory): make directory search limit on memory discovery configurable with settings.json (#4460) 2025-07-23 21:48:35 +00:00
christine betts
f95674e646
Add env var to configure system settings path (#4339) 2025-07-21 20:14:07 +00:00
Pyush Sinha
a01b1219a3
feat: full implementation for .geminiignore in settings and respective tool calls (#3727) 2025-07-20 07:55:33 +00:00
Ali Al Jufairi
76b935d598
Feature custom themes logic (#2639)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-07-20 07:51:18 +00:00
Tommaso Sciortino
4dbd9f30b6
Revert background agent commits (#4479) 2025-07-19 00:28:40 +00:00
Tommaso Sciortino
003609239f
Add /background commands (when background agent is configured) (#4407)
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
2025-07-18 22:38:04 +00:00
christine betts
58f1aa6ceb
Add support for allowed/excluded MCP server names in settings (#4135)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
2025-07-15 20:45:24 +00:00
anj-s
d3ee9de3c3
Enable tool summarization only when explicitly set in settings.json (#4140)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-07-15 17:22:31 +00:00
Shreya Keshive
fadc477001
Add feature flag for IDE integration (#3927)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
2025-07-14 16:04:08 +00:00
K
3110e8f810
feat(cli): add hideBanner setting to disable startup banner (#2803)
Co-authored-by: Pascal Birchler <pascalb@google.com>
2025-07-14 04:37:31 +00:00
anj-s
c9e1e6d3bd
Add support for specifying maxSessionTurns via the settings configuration (#3507) 2025-07-11 14:55:03 +00:00
christine betts
da50a1eefb
Add system-wide settings config for administrators (#3498)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
2025-07-09 21:16:42 +00:00
Marat Boshernitsan
48c2aa296a
Enable Gemini CLI to reuse user's auth in Cloud Shell (#3070) 2025-07-07 22:02:13 +00:00
Jack Wotherspoon
b70fba5b09
fix: respect env variables in .env for settings.json variable substitution (#3416) 2025-07-07 05:13:13 +00:00
Marcin Jahn
d1eb86581c
feat(cli): Add hideTips setting (#1524)
Co-authored-by: Allen Hutchison <adh@google.com>
2025-06-29 23:56:37 +00:00
Brandon Keiji
f6c36f75e3
fix: prepublish changes to package names (#1420) 2025-06-25 12:41:11 +00:00
Jacob Richman
75ed7aaa06
Jacob314/max old space (#1314) 2025-06-24 14:18:55 -07: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
Billy Biggs
0779697da6
Add setting enableRecursiveFileSearch to control @-file completion (#1290) 2025-06-22 01:23:35 +00:00
Louis Jimenez
6c67618624
Make checkpoints configurable in settings.json (#1251) 2025-06-20 00:39:15 -04:00
matt korwel
04518b52c0
Auth First Run (#1207)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-19 16:52:22 -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
Allen Hutchison
643bdf31d5
feat: Add custom URL support for the /bug command (#1017) 2025-06-14 07:00:24 +00:00
Keir Mierle
9954779739
Add a local telemetry launcher (#1015) 2025-06-13 18:08:03 -07: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
Leo
ad2e47dc20
remove enable editor flag (#984) 2025-06-12 17:28:20 +00: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
Mark McDonald
5673c5f267
Add a window title when CLI is launched (#787) 2025-06-10 11:54:51 +08:00
Leo
9efca40dae
feat: Add flow to allow modifying edits during edit tool call (#808) 2025-06-08 10:56:58 -07:00
cperry-goog
18d6a11c04
refactor: rename gemini-code to gemini-cli (#822) 2025-06-07 14:27:22 -07:00
Jacob Richman
89aca349cf
Exit with an error message if parsing settings.json fails. (#747) 2025-06-06 09:56:45 -07:00
jerop
8c28250bb3 Refactor: Improve env var resolution in settings
Refactors the `resolveEnvVarsInObject` function in settings to
explicitly handle primitive types (null, undefined, boolean, number)
at the beginning of the function. This clarifies the logic for
subsequent string, array, and object processing.
2025-06-06 11:47:37 -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
Tommaso Sciortino
4192cfb092
CLI_TITLE env var for setting the CLI title (#748) 2025-06-04 10:44:50 -07:00
N. Taylor Mullen
afc30e314f
feat(accessibility): Add option to disable loading phrases (#745) 2025-06-04 07:46:57 +00: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
Scott Densmore
2ab7e3da71
feat(cli): Allow custom title in CLI header (#706) 2025-06-02 17:09:55 -07:00
Allen Hutchison
7f20425c98
feat(cli): add pro model availability check and fallback to flash (#608) 2025-06-02 13:55:54 -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
Miguel Solorio
cbc1614b84
Update default & ANSI theme names (#637) 2025-05-31 11:10:52 -07:00
Tommaso Sciortino
21fba832d1
Rename server->core (#638) 2025-05-30 18:25:47 -07:00
Jacob Richman
01768d7759
feat: add --show_memory_usage flag to display memory usage in status bar (#606) 2025-05-30 15:18:01 -07:00
olcan
6cc0087105 allow comments in settings.json 2025-05-18 10:58:20 -07:00
Olcan
3bf0304e31
ability to override core system prompt (via .gemini/system.md) and specify core tools via coreTools setting (e.g. coreTools:["ls", "GrepTool", ...]) ; added tests, but did not update docs for now (#413) 2025-05-17 19:45:16 -07:00
Olcan
4de4822219
added timeout setting to mcp server config, also switched to custom config type without "stderr" field that does not make sense in settings (#410) 2025-05-17 16:53:22 -07:00
Olcan
d9bd2b0e14
improved mcp support, including standard "mcpServers" setting with multiple named servers with command/args/env/cwd (#392) 2025-05-16 16:29:03 -07:00