Skip to content

feat: add Windows platform support#26

Open
Zac-lzh wants to merge 1 commit into
Wechat-ggGitHub:mainfrom
Zac-lzh:feat/windows-support
Open

feat: add Windows platform support#26
Zac-lzh wants to merge 1 commit into
Wechat-ggGitHub:mainfrom
Zac-lzh:feat/windows-support

Conversation

@Zac-lzh

@Zac-lzh Zac-lzh commented Jun 11, 2026

Copy link
Copy Markdown

What

Add Windows platform support to wechat-claude-code. The core Node.js code already works on Windows, but the daemon management script and a few source files had Unix-specific assumptions.

Changes

New file: scripts/daemon.js

Cross-platform daemon manager that replaces the bash-only daemon.sh. Supports macOS (launchd), Linux (systemd + nohup fallback), and Windows (PID file + tasklist/taskkill).

package.json

Changed daemon script from bash scripts/daemon.sh to node scripts/daemon.js for cross-platform compatibility.

src/main.ts — Windows path regex

extractFilePathsFromText() now matches Windows paths in addition to Unix paths, so file auto-push works on Windows.

src/wechat/send.ts — tilde expansion fix

Replaced process.env.HOME || '' with homedir() from node:os. On Windows, process.env.HOME is typically unset, causing tilde paths to resolve incorrectly.

src/tools/visualize-logs.ts — cross-platform file open

Replaced macOS-only open command with platform-conditional logic (open / cmd start / xdg-open).

README.md & SKILL.md

Updated prerequisites to include Windows.

Testing

  • npm run build compiles without errors
  • node scripts/daemon.js status works on Windows
  • node scripts/daemon.js logs works on Windows
  • node dist/main.js setup QR code flow works on Windows
  • node dist/main.js start daemon runs on Windows

- Add scripts/daemon.js: cross-platform daemon manager (macOS/Linux/Windows)
- Update package.json: use node scripts/daemon.js instead of bash scripts/daemon.sh
- Fix src/main.ts: add Windows path pattern (C:\..., D:\...) to file auto-push regex
- Fix src/wechat/send.ts: use homedir() instead of process.env.HOME for tilde expansion
- Fix src/tools/visualize-logs.ts: cross-platform file open (macOS/Windows/Linux)
- Update README.md and SKILL.md: add Windows to supported platforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant