What's new
Full cross-platform support for macOS, Ubuntu, and Windows.
Cross-platform fixes
claude-cli.js
findClaudeBin()now detects Windows paths (APPDATA/npm/claude.cmd,LOCALAPPDATA/npm/claude.cmd, etc.)spawnusesshell: truefor.cmd/.batbinaries on Windows (required for cmd.exe scripts)- stdout split on
\r?\ninstead of\n(handles Windows CRLF line endings)
server.js
- Replaced hardcoded
/tmp/withos.tmpdir()(cross-platform temp dir) - Replaced hardcoded
process.env.HOME || '/root'withos.homedir()(works on Windows too) expandTilde()/expandTildeInObj()expand~in MCP env values on all platforms- Windows open-terminal:
start "" cmd /k "..."(empty title prevents cmd.exe treating first arg as window title) - Linux open-terminal: replaced blocking
execSync+ 2-second timeout withspawnProc({ detached: true }) + unref()— terminals (xterm, gnome-terminal, konsole) now stay alive after launch .envparsing usessplit(/\r?\n/)for Windows CRLF compatibility
scripts/install-hooks.js
- Hook commands use
node .claude/scripts/file-lock.jsinstead ofbash(no bash on Windows) copyHookScripts()copiesfile-lock.js/file-unlock.jsto project.claude/scripts/
.claude/scripts/file-lock.js & file-unlock.js (new)
- Node.js cross-platform replacements for the old bash hook scripts
- stdin read via
fs.readSync()loop (reliable on Windows pipes, unlikereadFileSync(0)) - Synchronous sleep via
Atomics.waitwith busy-loop fallback
Upgrade
npx github:Lexus2016/claude-code-studio@latest