fix(cli): enable daemon relaunch in binary and bundle keytar#26333
fix(cli): enable daemon relaunch in binary and bundle keytar#26333
Conversation
- Remove `IS_BINARY` environment variable checks in `index.ts` and `gemini.tsx` to allow the daemon/relaunch mechanism to run in compiled binaries. - Update `build_binary.js` to include the `@github/keytar` native module in staging and assets for secure keychain support.
|
Hi @ruomengz, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
|
Size Change: -108 B (0%) Total Size: 33.9 MB
ℹ️ View Unchanged
|
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 improves the functionality of the distributed CLI binary by enabling the daemon relaunch mechanism and ensuring that secure keychain storage is properly bundled. These changes ensure that the standalone binary behaves consistently with the source-based installation, providing a better user experience for credential management and process lifecycle handling. Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request simplifies environment variable checks in the CLI entry points and updates the binary build script to include the @github/keytar module and its assets. Specifically, it removes redundant checks for IS_BINARY and SANDBOX in the relaunch logic and ensures that secure keychain features are correctly bundled during the build process. I have no feedback to provide.
Note: Security Review is unavailable for this PR.
sripasg
left a comment
There was a problem hiding this comment.
Thanks for fixing.
LGTM !
Summary
Enables the daemon relaunch mechanism when running from a compiled binary and includes the
@github/keytarnative module in the binary build process. This ensures that features like automatic relaunch and secure keychain storage work correctly in the distributed binary versions of the CLI.Details
IS_BINARYenvironment variable check inpackages/cli/index.tsandpackages/cli/src/gemini.tsx. Previously, these checks disabled the relaunch mechanism when the CLI detected it was running as a binary.scripts/build_binary.jsto copy the@github/keytarnative module to the staging directory and include it in the binary's assets. This is necessary for secure keychain support on macOS and other platforms when using the standalone binary.Related Issues
Fixes https://github.com/google-gemini/maintainers-gemini-cli/issues/1648
How to Validate
npm run build:binary(or the appropriate command fromscripts/build_binary.js).Pre-Merge Checklist