feat: add Windows platform support (lightweight, seamless)#32
Closed
Slldyd2077 wants to merge 1 commit into
Closed
feat: add Windows platform support (lightweight, seamless)#32Slldyd2077 wants to merge 1 commit into
Slldyd2077 wants to merge 1 commit into
Conversation
- Add MINGW/MSYS/CYGWIN branch to daemon.sh with PID file + nohup backend - Fix send.ts: process.env.HOME -> homedir() for Windows compatibility - Fix visualize-logs.ts: cross-platform file opening (cmd /c start / open / xdg-open) - Update prerequisites in README.md, README_en.md, SKILL.md
596848d to
bbf3c97
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
为 wechat-claude-code 添加 Windows (Git Bash) 支持,使用户可以在 Windows 上使用与 macOS/Linux 完全一致的命令管理 daemon。
改动内容
1.
scripts/daemon.sh— 新增 Windows (MINGW/MSYS/CYGWIN) 分支windows_start、windows_stop、windows_status、windows_logs四个函数nohup后台运行(Git Bash 环境下均可用)taskkill //F //PID作为强制停止的兜底方案npm run daemon -- {start|stop|status|logs}2.
src/wechat/send.ts— 修复homedir()兼容性process.env.HOME在 Windows 上为空,改用homedir()fromnode:os3.
src/tools/visualize-logs.ts— 跨平台文件打开open,Windows:cmd /c start,Linux:xdg-open4. 文档更新
README.md、README_en.md、SKILL.md前置条件更新为 macOS、Windows 或 Linux设计特点
npm run daemon -- start,Windows 用户无需学习新命令对比其他 Windows 支持方案
daemon:ps测试
已在 Windows 11 (Git Bash/MINGW64) 上验证:
npm run build编译通过npm run daemon -- start启动成功npm run daemon -- status状态检测正确npm run daemon -- stop停止成功npm run daemon -- logs日志输出正常