Summary
Full Windows support for cac. Claude Code on Windows requires Git for Windows, so Git Bash (MINGW64) is always available.
Approach
Adapt the existing bash cac script to work in Git Bash, rather than rewriting in PowerShell or Node.js.
Core changes needed
| Item |
Problem |
Solution |
/dev/tcp |
Not available in MINGW bash |
_tcp_check() helper using node -e "require('net').connect(...)" |
python3 |
May not exist on Windows |
Replace with node -e (guaranteed available) |
| Wrapper |
Need claude.cmd not bash |
_write_wrapper generates claude.cmd on Windows |
| Shims |
ioreg/ifconfig/cat shims not needed |
Skip on Windows — fingerprint-hook.js handles everything |
| RC files |
No .bashrc in native context |
Write to Git Bash ~/.bashrc + set Windows system PATH via registry |
| Platform |
_detect_platform returns unsupported |
Add win32-x64 support |
openssl |
Not default on Windows |
Git for Windows bundles OpenSSL |
What already works cross-platform
fingerprint-hook.js — already has Windows wmic/reg interception
cac-dns-guard.js — pure Node.js, fully cross-platform
relay.js — pure Node.js
NODE_OPTIONS --require / BUN_OPTIONS --preload — cross-platform
Testing
Need a Windows machine or VM with:
- Git for Windows installed
- Claude Code installed (
irm https://claude.ai/install.ps1 | iex)
- npm available
Files to modify
src/utils.sh — _tcp_check(), _detect_platform, _write_path_to_rc
src/templates.sh — _write_wrapper Windows branch, skip shims
src/cmd_setup.sh — _ensure_initialized Windows branch
src/cmd_claude.sh — Windows binary download support
package.json — bin field for Windows
References
Summary
Full Windows support for cac. Claude Code on Windows requires Git for Windows, so Git Bash (MINGW64) is always available.
Approach
Adapt the existing bash
cacscript to work in Git Bash, rather than rewriting in PowerShell or Node.js.Core changes needed
/dev/tcp_tcp_check()helper usingnode -e "require('net').connect(...)"python3node -e(guaranteed available)claude.cmdnot bash_write_wrappergeneratesclaude.cmdon Windowsioreg/ifconfig/catshims not neededfingerprint-hook.jshandles everything.bashrcin native context~/.bashrc+ set Windows system PATH via registry_detect_platformreturnsunsupportedwin32-x64supportopensslWhat already works cross-platform
fingerprint-hook.js— already has Windowswmic/reginterceptioncac-dns-guard.js— pure Node.js, fully cross-platformrelay.js— pure Node.jsNODE_OPTIONS --require/BUN_OPTIONS --preload— cross-platformTesting
Need a Windows machine or VM with:
irm https://claude.ai/install.ps1 | iex)Files to modify
src/utils.sh—_tcp_check(),_detect_platform,_write_path_to_rcsrc/templates.sh—_write_wrapperWindows branch, skip shimssrc/cmd_setup.sh—_ensure_initializedWindows branchsrc/cmd_claude.sh— Windows binary download supportpackage.json—binfield for WindowsReferences
cac.ps1andcac.cmdcan be used as reference