Repository navigation
feat(cli): add update command to auto-upgrade based on package manager - #21426
roy-abir05 wants to merge 3 commits into
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! 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 enhances the Gemini CLI by adding a new Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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 👍 and 👎 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a helpful gemini update command. The implementation is solid, but I've found a high-severity security issue in the error handling for permissions. The current implementation suggests an insecure practice to the user. My review includes a code suggestion to correct this by providing safer, more specific instructions and refactoring the code slightly for better error reporting.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a gemini update command, which is a useful addition for improving the user experience of keeping the CLI up-to-date. The implementation is straightforward and includes good test coverage. The feedback regarding making the permission error message platform-aware, as the current suggestion to use sudo is not applicable on Windows, has been retained.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a gemini update command to automate the CLI upgrade process. The new command detects the installation package manager and runs the corresponding update command. The implementation includes logic to handle cases where an automatic update is not possible, such as local development clones. Error handling is included for scenarios like permission failures, providing users with suggested next steps. The changes are accompanied by unit tests that validate the new command's behavior under various conditions. The implementation appears robust, and no high or critical severity issues were found.
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we have updated our contribution policy (see Discussion #17383). We only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. All other community pull requests are subject to closure after 14 days if they do not align with our current focus areas. For this reason, we strongly recommend that contributors only submit pull requests against issues explicitly labeled as 'help-wanted'. This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding and for being part of our community! |
|
@roy-abir05, apologies for the bot closing this PR! We have reopened it. Please sync your branch to the latest |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
88c11c4 to
3140d48
Compare
|
Thanks for reopening this @cocosheng-g! |
|
Hi @cocosheng-g! |
|
Thank you for your interest in contributing to the project! We are closing this PR as the associated issue was closed. |
Summary
Introduces a new
gemini updatesubcommand that automatically detects the CLI's installation package manager (npm, brew, yarn, bun, pnpm) and executes the corresponding upgrade command. This reduces friction for users who frequently switch between package managers and eliminates the need to remember their original installation method.Details
Wires
updateCommandinto the main Yargs router (config.ts).Uses the existing
getInstallationInfoutility to find the package manager, safely aborts for local/npx environments, and runsexecSyncwithstdio: 'inherit'Bypasses the interactive UI (
argv['isCommand'] = true) and pipes logs throughcoreEvents.emitFeedbackTesting: Adds
update.test.tsto mockchild_processand verify execution pathsRelated Issues
Fixes #21400
How to Validate
npm run build:alland link the binary locally.gemini updatePre-Merge Checklist