gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Add commands for listing and updating per-extension settings

Open chrstnb opened this issue 1 month ago • 4 comments

Summary

Adds support for:

Getting a list of an extension's settings by running:

gemini extensions settings list <extension name>

Make an update to a given setting using:

gemini extensions settings set <extension name> <setting name>

Details

Related Issues

How to Validate

Pre-Merge Checklist

  • [ ] Updated relevant documentation and README (if needed)
  • [ ] Added/updated tests (if needed)
  • [ ] Noted breaking changes (if any)
  • [ ] Validated on required platforms/methods:
    • [ ] MacOS
      • [ ] npm run
      • [ ] npx
      • [ ] Docker
      • [ ] Podman
      • [ ] Seatbelt
    • [ ] Windows
      • [ ] npm run
      • [ ] npx
      • [ ] Docker
    • [ ] Linux
      • [ ] npm run
      • [ ] npx
      • [ ] Docker

chrstnb avatar Nov 06 '25 20:11 chrstnb

Summary of Changes

Hello @chrstnb, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the gemini CLI by adding robust functionality for managing extension settings. It introduces new configure subcommands under gemini extensions, enabling users to easily list and update individual settings for any installed extension. This change improves the user experience by providing direct command-line control over extension configurations, with careful consideration for sensitive data handling and proper formatting of environment variables.

Highlights

  • New CLI Commands for Extension Settings: Introduced gemini extensions configure list and gemini extensions configure set to manage per-extension settings.
  • List Extension Settings: Users can now view all configurable settings for a specific extension, including their current values and descriptions.
  • Update Extension Settings: Provides a way to modify individual extension settings, handling both sensitive (stored in keychain) and non-sensitive (stored in .env files) values appropriately.
  • Improved .env Handling: Values containing spaces are now correctly wrapped in quotes when written to .env files, preventing parsing issues.
  • Documentation Update: The docs/extensions/index.md file has been updated to include instructions for using the new configuration commands.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot] avatar Nov 06 '25 20:11 gemini-code-assist[bot]

Size Change: +4.98 kB (+0.02%)

Total Size: 21.5 MB

Filename Size Change
./bundle/gemini.js 21.4 MB +4.98 kB (+0.02%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

github-actions[bot] avatar Nov 06 '25 21:11 github-actions[bot]

I have addressed all the review comments:

  • Refactored the set and list commands to remove code duplication by creating a shared getExtensionAndManager function.
  • Moved getExtensionAndManager to a shared utils file.
  • Renamed the configure command to settings for consistency and updated the documentation accordingly.
  • Replaced all console.log and console.error statements with debugLogger.
  • The code duplication in extensionSettings.ts was already addressed.

Regarding the security vulnerability warning, I believe it is a false positive. The code correctly handles sensitive values by printing [value stored in keychain] instead of the actual value.

Please let me know if there are any other changes you would like me to make.

chrstnb avatar Nov 20 '25 19:11 chrstnb

The build is now passing, and the debugLogger.info calls have been replaced with debugLogger.log in all relevant files.

chrstnb avatar Nov 20 '25 19:11 chrstnb