Skip to content

feat: add native Windows support for Zeude CLI#14

Open
scm1400 wants to merge 16 commits intozep-us:mainfrom
scm1400:feat/windows-support
Open

feat: add native Windows support for Zeude CLI#14
scm1400 wants to merge 16 commits intozep-us:mainfrom
scm1400:feat/windows-support

Conversation

@scm1400
Copy link

@scm1400 scm1400 commented Mar 6, 2026

Summary

Windows(x86_64/arm64) 환경에서 Zeude CLI를 네이티브로 설치하고 사용할 수
있도록 지원합니다.

  • Go 코드의 Unix 전용 API를 크로스플랫폼으로 교체 (syscall.Exec
    executil, os.Getenv("HOME")os.UserHomeDir())
  • Windows에서 .exe 확장자 및 파일 권한 처리 호환
  • PowerShell 설치/제거 스크립트 (install.ps1, uninstall.ps1)
  • Windows 빌드 타겟 추가 (Dockerfile, build-release.sh)
  • getDashboardURL()이 config 파일을 읽지 않던 버그 수정 (Windows/기존
    플랫폼 모두 해당)

Changes

Go 크로스플랫폼 호환

  • internal/executil/ (신규): 빌드 태그 기반 플랫폼별 프로세스 실행 —
    Unix는 syscall.Exec, Windows는 os/exec 자식 프로세스
  • internal/autoupdate/: os.Getenv("HOME")os.UserHomeDir(),
    Windows에서 chmod skip
  • internal/resolver/: PATH 검색 시 .exe 확장자 자동 추가, Windows
    파일 권한 체크 skip
  • internal/mcpconfig/install.go: test -fos.Stat(), which
    exec.LookPath() (순수 Go)
  • cmd/claude/, cmd/zeude/, cmd/doctor/: executil 마이그레이션 +
    .exe 경로 처리

설치 스크립트

  • scripts/install.ps1 (신규): 플랫폼 감지, claude.exe 탐색, 바이너리
    다운로드, User PATH 등록, agent key 설정
  • scripts/uninstall.ps1 (신규): hooks/settings/PATH/디렉토리 정리

빌드 & 문서

  • Dockerfile, build-release.sh에 windows/amd64, windows/arm64 타겟 추가
  • README에 Windows 설치 방법 및 트러블슈팅 추가

이 PR의 코드는 Claude Code (Opus 4.6)의 도움을 받아 작성되었습니다.

@scm1400 scm1400 force-pushed the feat/windows-support branch from dec8e66 to 8dca9bb Compare March 6, 2026 08:09
@scm1400 scm1400 changed the title windows support feat: add native Windows support for Zeude CLI Mar 6, 2026
feat(install): auto-install jq on Windows if missing

Downloads jq binary from GitHub releases to .zeude/bin/ (already in
PATH). Falls back to manual install instructions if download fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

fix: address code review findings for Windows support

- [Critical] Auto-update URL now appends .exe on Windows
- [High] Dockerfile copies install.ps1/uninstall.ps1 to releases
- [High] Credentials file ACL restricted to current user on Windows
- [Medium] Windows auto-update uses staging (.new) to handle locked exe
- [Medium] zeude-doctor path includes .exe on Windows
- [Low] getDashboardURL normalizes \r\n line endings
- [Low] exec_windows.go package doc comment added

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@scm1400 scm1400 force-pushed the feat/windows-support branch from f7692d4 to 4c0124b Compare March 6, 2026 08:26
scm1400 and others added 15 commits March 17, 2026 13:03
…eneration

- Add dual hook generation: .sh (Git Bash) + .ps1 (PowerShell) on Windows
- Register hooks with explicit interpreter prefix in settings.json
  (bash "path.sh") since Claude Code uses cmd.exe on Windows
- Fix backslash path matching in hook dedup with filepath.ToSlash normalization
  at both map population and lookup time
- Add extractPathFromCommand() for upgrade compat from bare-path entries
- Fix SessionStart hook: cmd.exe syntax with ZEUDE_INITIALIZED guard
- Auto-replace old bash-syntax SessionStart hooks on Windows upgrade
- Add doctor command: bash availability check, OS-appropriate messages
- Add sanitizeScriptComment() to prevent comment injection in generated scripts
- Add escapePowerShellValue() for .ps1 env var escaping
- Add 9 test functions (49 subtests) covering all new helpers, round-trip,
  dual generation, SessionStart, and comment sanitization

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nginx-only image that serves Go binaries and install scripts
without requiring the full Next.js dashboard build or Supabase env vars.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…osing

When running via `irm | iex`, the PowerShell window closes immediately
on exit. Add pause before exit on all paths so users can see the output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When the zeude shim (claude.exe) is running, the file is locked and
can't be overwritten. Download to .new, rename old to .old, then
rename new into place. Gracefully warns if rename also fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…URL args

Both Dockerfiles now accept APP_URL and OTEL_URL build args to replace
placeholder URLs in install/uninstall scripts. Users no longer need to
set ZEUDE_DOWNLOAD_BASE manually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Default APP_URL=https://dev-zeude.zep.works and
OTEL_URL=http://k8wk0w00w0g4csw4ww84040g.zep.works/ are substituted
at build time via sed, replacing placeholder URLs in install scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Step 4 was missing the URL format, causing Claude to generate
incorrect URLs like /auth/ott?token= instead of /auth?ott=

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Actual deployment URLs should be set via Coolify build args,
not hardcoded in the Dockerfile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…staller

When install.sh is run on MSYS/MinGW/Cygwin, show a friendly message
directing users to use install.ps1 instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
exit 1 inside $(detect_platform) only exits the subshell.
Add explicit check to exit the main script on failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move Windows/MSYS detection to the very top of install.sh so it
exits immediately, avoiding subshell exit issues with curl | bash.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…form

Early detection at script top handles this. Also remove extra exit checks
since set -e handles subshell failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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