-
Notifications
You must be signed in to change notification settings - Fork 81
feat: Add comprehensive Windows compatibility improvements #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Fixed undefined 'args' variable in executeCommandWithPipedInput function - Added PowerShell executable detection for better Windows compatibility - Updated to use powershell.exe on Windows and pwsh on other platforms - Resolves 'spawn powershell.exe ENOENT' error - Tested and verified ask-gemini functionality works correctly
- Add version changelog and update information - Update installation instructions to specify v1.0.2 - Add troubleshooting section for PowerShell execution errors - Include upgrade instructions for existing users - Highlight fixes for 'spawn powershell.exe ENOENT' error
- Update Trae AI and Claude Desktop config examples to use @1.0.2 - Ensure users get the latest version with PowerShell fixes - Prevent users from accidentally using older v1.0.0 with known issues
…ject - Added Claude Code one-line setup command and installation verification - Added natural language usage examples with file references (@syntax) - Added sandbox mode examples for safe code execution - Added slash commands documentation (/analyze, /sandbox, /help, /ping) - Included compatibility notes for different MCP clients - Enhanced both README.md and INSTALL-GUIDE.md with consistent content
- Add optional powershellPath parameter to ask-gemini and brainstorm tools - Support custom PowerShell executable paths for different system configurations - Enhance PowerShell path detection and error handling - Update documentation with PowerShell path configuration guide - Add comprehensive test scripts for validation - Maintain backward compatibility with existing configurations Files updated: - lib/fixed-mcp-tool.js: Add powershellPath parameter definitions - lib/fixed-geminiExecutor.js: Extend functions to support custom PowerShell paths - package.json: Bump version to 1.0.3 - INSTALL-GUIDE.md: Add PowerShell path configuration section - Add POWERSHELL-PATH-UPDATE.md: Detailed update documentation - Add multiple test scripts for validation
- Update version references from 1.0.2 to 1.0.3 in all documentation - Add PowerShell path parameter feature description - Update installation commands and configuration examples - Maintain backward compatibility information
…nfiguration examples - Update remaining v1.0.2 references to v1.0.3 in INSTALL-GUIDE.md and README.md - Add comprehensive PowerShell path parameter documentation to claude-config-v1.0.3.json - Include usage examples for brainstorm and ask-gemini tools with custom PowerShell paths - Document common PowerShell installation paths for different Windows versions - Emphasize backward compatibility of the optional powershellPath parameter
- Add comprehensive PowerShell path parameter documentation to INSTALL-GUIDE.md - Add PowerShell path configuration examples to README.md - Include usage examples for brainstorm and ask-gemini tools with custom PowerShell paths - Document common PowerShell installation paths for different Windows versions - Emphasize backward compatibility of the optional powershellPath parameter - Provide clear guidance for users with non-standard PowerShell installations
- Remove all test files (test-*.js, test-*.cjs) - Remove development scripts (fix-proxy-push.ps1) - Remove temporary documentation files (POWERSHELL-FIX-SUMMARY.md, POWERSHELL-PATH-UPDATE.md) - Remove configuration examples (claude-config-v1.0.3.json, gemini-cli-test.json) - Remove old version artifacts (gemini-mcp-tool-windows-fixed-1.0.1/) - Keep only essential project files for production release
… series - Fixed brainstorm tool error when prompt parameter is undefined - Changed default model from 1.5 series to gemini-2.5-pro - Ensured backward compatibility with explicit model parameter - Improved error handling in brainstorm tool logging
- Updated package version to reflect brainstorm tool fixes - Includes default model change to 2.5 series - Ready for npm publication
- Updated all version references from 1.0.3 to 1.0.4 - Added v1.0.4 changelog with brainstorm tool fixes and model upgrades - Updated installation commands and configuration examples - Maintained backward compatibility information
- 增强PATH环境变量处理,添加常见Node.js安装路径 - 修复fetch-chunk工具的MCP协议格式错误 - 更新文档和配置示例到最新版本 - 删除旧版本打包文件 - 完全兼容所有终端环境(PowerShell, CMD, VS Code, Trae AI等)
- 更新README.md和INSTALL-GUIDE.md中所有版本号到v1.0.21 - 添加TERMINAL-CONFIG-GUIDE.md终端配置指南 - 包含CherryStudio等其他终端的配置说明 - 提供详细的故障排除步骤
- Translated all Chinese content to English - Maintained original formatting and structure - Updated version references and installation instructions - Improved readability for international users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @orzcls, 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 delivers a significant set of changes aimed at making the Gemini MCP Tool fully compatible and robust on Windows operating systems. It addresses various underlying technical challenges related to command execution and environment setup specific to Windows, ensuring a smooth user experience. Beyond core functionality, the PR also refines the project's documentation and adjusts its licensing to be more open, enhancing its usability and accessibility.
Highlights
- Windows Compatibility: This pull request introduces comprehensive improvements to ensure seamless operation of the Gemini MCP Tool across all Windows environments, including enhanced command execution, improved argument escaping, and better PowerShell integration.
- Documentation Overhaul: A new, detailed
INSTALL-GUIDE.md
has been added, and theREADME.md
has been significantly updated to reflect the Windows-specific fixes, installation methods, and troubleshooting steps, providing clear guidance for users. - Licensing Change: The project's license has been updated from a 'MIT License (Non-Commercial)' to a standard 'MIT License', removing restrictions on commercial use and broadening its applicability.
- Project Identity and Structure: The project name has been updated to
gemini-mcp-tool-windows-fixed
inpackage.json
to clearly denote its specialized focus. The.gitignore
and a new.npmignore
have been expanded for better management of ignored files across different environments and build processes. - Dependency Management: The
@modelcontextprotocol/sdk
dependency has been updated, anddotenv
has been added to improve environment variable handling, while several unused development dependencies have been removed.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
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
-
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. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces significant changes to improve Windows compatibility. However, there are critical issues in package.json
regarding missing dependencies and build tooling that render the project unbuildable. Additionally, the documentation (README.md
and INSTALL-GUIDE.md
) contains inconsistencies such as version mismatches, placeholder URLs, and duplicated sections. These issues must be addressed to ensure the project is functional and the documentation is accurate.
package.json
Outdated
{ | ||
"name": "gemini-mcp-tool-windows-fixed", | ||
"version": "1.0.21", | ||
"type": "module", | ||
"description": "Windows-compatible MCP server that enables AI assistants to interact with Google Gemini CLI - Fixed version for Windows environments", | ||
"main": "index.js", | ||
"bin": { | ||
"gemini-mcp-tool-windows-fixed": "./index.js" | ||
}, | ||
"scripts": { | ||
"start": "node index.js", | ||
"test": "node test-fixed-mcp.js", | ||
"dev": "node index.js" | ||
}, | ||
"keywords": [ | ||
"mcp", | ||
"model-context-protocol", | ||
"gemini", | ||
"google-gemini", | ||
"ai", | ||
"claude", | ||
"cli", | ||
"windows", | ||
"powershell", | ||
"fixed" | ||
], | ||
"author": "Windows Fixed Version", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/your-username/gemini-mcp-tool-windows-fixed.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/your-username/gemini-mcp-tool-windows-fixed/issues" | ||
}, | ||
"homepage": "https://github.com/your-username/gemini-mcp-tool-windows-fixed#readme", | ||
"engines": { | ||
"node": ">=16.0.0" | ||
}, | ||
"dependencies": { | ||
"@modelcontextprotocol/sdk": "^1.17.1", | ||
"dotenv": "^17.2.1" | ||
}, | ||
"devDependencies": {}, | ||
"files": [ | ||
"index.js", | ||
"lib/", | ||
"README.md", | ||
"LICENSE" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package.json
has several critical issues that break the project:
- Missing Build Tooling: The project's source files are in TypeScript (e.g.,
src/utils/commandExecutor.ts
), but you've removedtypescript
and thebuild
script (tsc
). Without a TypeScript compiler, theindex.js
file specified inmain
will not be generated from the source code. - Missing Dependencies: The source code imports packages like
zod
(insrc/tools/ask-gemini.tool.ts
) which have been removed from the dependencies list. This will cause runtime errors.
The project is currently not buildable or runnable. You need to either:
a) Restore the TypeScript dependencies (like typescript
, ts-node
/tsx
, zod
, and @types/*
) and the build scripts.
b) Convert all .ts
source files to .js
and ensure they work with the new dependency set.
Please fix the project setup to ensure it can be installed and run correctly.
"GEMINI_API_KEY": "YOUR_ACTUAL_API_KEY_HERE" | ||
}, | ||
"isActive": true, | ||
"providerUrl": "https://github.com/your-username/gemini-mcp-tool-windows-fixed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The providerUrl
in this configuration example for Trae AI uses a placeholder your-username
. This should be updated to the correct repository URL to ensure the provider link is valid for users.
"providerUrl": "https://github.com/your-username/gemini-mcp-tool-windows-fixed" | |
"providerUrl": "https://github.com/orzcls/gemini-mcp-tool-windows-fixed" |
|
||
If you encounter any issues or have questions: | ||
|
||
1. Check the [Issues](https://github.com/your-username/gemini-mcp-tool-windows-fixed/issues) page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The support link for opening issues points to a URL with a placeholder your-username
. Please update this to the correct repository issues page.
1. Check the [Issues](https://github.com/your-username/gemini-mcp-tool-windows-fixed/issues) page | |
[Issues](https://github.com/orzcls/gemini-mcp-tool-windows-fixed/issues) |
package.json
Outdated
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/your-username/gemini-mcp-tool-windows-fixed.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/your-username/gemini-mcp-tool-windows-fixed/issues" | ||
}, | ||
"homepage": "https://github.com/your-username/gemini-mcp-tool-windows-fixed#readme", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repository
, bugs
, and homepage
fields all point to a placeholder URL with your-username
. Please update these to the correct URL for the project's repository. This is crucial for users to find the code, report issues, and contribute.
"url": "https://github.com/orzcls/gemini-mcp-tool-windows-fixed.git",
"url": "https://github.com/orzcls/gemini-mcp-tool-windows-fixed/issues",
"homepage": "https://github.com/orzcls/gemini-mcp-tool-windows-fixed#readme",
|
||
```powershell | ||
# 使用最新版本 (推荐) | ||
npx gemini-mcp-tool-windows-fixed@1.0.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
```powershell | ||
# 安装最新版本 | ||
npm install -g gemini-mcp-tool-windows-fixed@1.0.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version number 1.0.4
used in the installation command is inconsistent with the version in package.json
(1.0.21
). Please update to match the package version or use @latest
for consistency.
npm install -g gemini-mcp-tool-windows-fixed@1.0.4 | |
npm install -g gemini-mcp-tool-windows-fixed@1.0.21 |
npm cache clean --force | ||
|
||
# 安装最新版本 | ||
npm install -g gemini-mcp-tool-windows-fixed@1.0.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version number 1.0.3
used in the installation command is inconsistent with the version in package.json
(1.0.21
). Please update to match the package version or use @latest
for consistency.
npm install -g gemini-mcp-tool-windows-fixed@1.0.3 | |
npm install -g gemini-mcp-tool-windows-fixed@1.0.21 |
README.md
Outdated
1. **[Node.js](https://nodejs.org/)** (v16.0.0 or higher) | ||
2. **[Google Gemini CLI](https://github.com/google-gemini/gemini-cli)** installed and configured | ||
|
||
## 📋 Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
For detailed troubleshooting, see [INSTALL-GUIDE.md](./INSTALL-GUIDE.md). | ||
|
||
## 🔧 Windows-Specific Fixes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check #17 before sending this PR ? |
I will try my best to merge both our solutions in a new branch |
Good luck! Looking forward to it! |
Your contributions will be added to main-windows-patch branch. Thank you for testing clients. |
Summary
This PR adds comprehensive Windows compatibility improvements to ensure seamless operation across all Windows environments while maintaining full backward compatibility with Unix-like systems.
Key Improvements
Testing
Files Changed
src/utils/commandExecutor.ts
- Enhanced Windows command executionsrc/utils/geminiExecutor.ts
- Improved Windows argument handlingThis resolves Windows compatibility issues and ensures the tool works seamlessly across all environments.