feat: add Windows support for installation and usage#100
Open
josegironn wants to merge 1 commit intomainfrom
Open
feat: add Windows support for installation and usage#100josegironn wants to merge 1 commit intomainfrom
josegironn wants to merge 1 commit intomainfrom
Conversation
Adds native Windows support to the CLI while preserving the existing Linux/macOS experience unchanged. Build & distribution: - GoReleaser builds windows/amd64 and windows/arm64 with .zip archives - Release workflow uploads install.ps1 to S3 alongside install.sh Installation: - install.ps1: PowerShell installer with SHA256 checksum and version verification - install.sh: hardened to fail loudly on version mismatch (parity with .ps1) - cmd/install.go: installWindows branch registers completion in $PROFILE and updates User PATH via [Environment]::SetEnvironmentVariable Updater (cmd/update.go): - Go-native download path for Windows and as fallback when bash is missing - SHA256 checksum verification against checksums.txt - Pre-promotion health check (runs new binary with --version) - Safe Windows binary swap with rollback (.new -> .old -> rename chain) Plugin integration (cross-platform via Go commands): - New hidden command: major mcp get-headers (replaces bash headersHelper) - New hidden command: major mcp check-readonly-hook (replaces bash PreToolUse script) - .mcp.json and auto-approve.json now use the Go commands; work identically on Windows, macOS, and Linux - Kept .sh scripts for backwards compat; added .ps1 equivalents for direct use Dev tooling: - Makefile: dev-install-windows target for PowerShell workflow - cmd/completion.go: added PowerShell completion documentation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Adds native Windows support to the CLI while preserving the existing Linux/macOS experience unchanged. The Go code was already largely cross-platform; the changes concentrate on installation, distribution, update, and the plugin layer's bash dependencies.
Build & distribution
windows/amd64andwindows/arm64with.ziparchives (format_overrides)install.ps1to S3 alongsideinstall.shInstallation
install.ps1: PowerShell installer with SHA256 checksum and version verificationinstall.sh: hardened to fail loudly on version mismatch (parity with.ps1)cmd/install.go:installWindowsbranch registers completion in$PROFILEand updates UserPATHvia[Environment]::SetEnvironmentVariable(PowerShell API, notreg.exescraping)Updater (
cmd/update.go)checksums.txt--versionbefore swapping.new->.old-> rename chain)curl \| bashflow for backwards compatPlugin integration
major mcp get-headersandmajor mcp check-readonly-hook.mcp.jsonandauto-approve.jsonnow use the Go commands; cross-platform by construction (no bash dependency).shscripts kept for backwards compat;.ps1equivalents added for direct useDev tooling
Makefile:dev-install-windowstarget for PowerShell workflowcmd/completion.go: PowerShell completion documentationVerification
go test ./...passes (no test files in repo)go run . installon macOS still detects zsh and reuses existing# Major CLImarker (no regression)major.exeverified as PE32+ executable (x86-64 and Aarch64)Test plan
irm <s3>/install.ps1 | iexon Windows 10/11 and verify install succeedsmajor user loginand confirm credential storage uses Windows Credential Managermajor updateon Windows and verify.oldcleanup on next update./install.shon a fresh Linux/macOS machine and confirm unchanged behaviorKnown limitations (out of scope)
Release artifacts remain unsigned (same trust model as existing
install.shon Unix). Moving to a signed release scheme (cosign/Sigstore/TUF) is a whole-CLI supply-chain initiative that should be tracked separately and will apply equally to all platforms.🤖 Generated with Claude Code