Allow for gemini extension installation bypass
TLDR
Currently, if the gemini CLI attempts to install gemini extensions, it fails due to the consent requirement. This PR allows users and gemini CLI to skip that step.
This is similar to the gemini CLI's root -y command.
Dive Deeper
Reviewer Test Plan
- Wrote additional tests
- Ran manually with a local build with a GEMINI.md file with
-yflag
Testing Matrix
| 🍏 | 🪟 | 🐧 | |
|---|---|---|---|
| npm run | ✅ | ❓ | ❓ |
| npx | ❓ | ❓ | ❓ |
| Docker | ❓ | ❓ | ❓ |
| Podman | ❓ | - | - |
| Seatbelt | ❓ | - | - |
Linked issues / bugs
Summary of Changes
Hello @maneesht, 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 addresses a current limitation where the Gemini CLI fails to install extensions due to an interactive consent requirement. It introduces a --yolo flag to the gemini extensions install command, enabling users to bypass this consent step. This change streamlines automated extension installations and aligns with the existing -y behavior found in the root Gemini CLI, improving the overall user experience for non-interactive scenarios.
Highlights
-
Consent Bypass Flag: Introduced a new
--yolo(or-y) flag for thegemini extensions installcommand. - Automated Installation: This flag allows users and the Gemini CLI to bypass the interactive consent requirement during extension installation, preventing failures in automated environments.
-
Test Coverage: Added new test cases to ensure the
yoloflag correctly skips the consent prompt when enabled and enforces it when disabled.
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.
I assume this is specifically for non-interactive mode? It makes sense that some flag should be able to be passed to indicate automatic consent for installing extensions.
I am not sure if we want to piggy back on --yolo for this, but we could. cc @chrstnb for thoughts
Thanks Jake for the response. I want to clarify that the use-case here is if we already have a GEMINI.md file that indicates to users to install a specific Gemini CLI extension, it currently completely failed. I feel like allowing Gemini to install its own CLI extensions should be a valid use.
Thanks Jake for the response. I want to clarify that the use-case here is if we already have a GEMINI.md file that indicates to users to install a specific Gemini CLI extension, it currently completely failed. I feel like allowing Gemini to install its own CLI extensions should be a valid use.
Gotcha, in general for real world use cases I am not sure we want to be bypassing consent here given how much power extensions have.
Also, I am not sure this will really work because you still can't use that extension within the same session - I assume its running a shell command gemini extensions install <extension> or similar?
@jakemac53 Thanks for the comment. For the Firebase CLI, we're looking at adding a GEMINI.md that recommends people install the Firebase extension when someone requests firebase integrations. That way users don't have to look at extra documentation to know that the extension exists, making it more discoverable.
And you're right. The installation doesn't load quite yet in the same session, but I can update the code to do so
This pull request has been automatically marked as stale due to 60 days of inactivity. It will be closed in 14 days if no further activity occurs.