feat: native Windows launchers (PowerShell/cmd) + install.ps1 - #18
Merged
Conversation
Route PowerShell/cmd through a policy-bypassing meta.cmd -> .meta/shim.ps1; keep no root .ps1 so `./meta` is execution-policy-proof. Adds install.ps1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…shims Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…afety A CRLF checkout on Windows (core.autocrlf) breaks the ./meta bash shim under Git Bash (CRLF shebang; CR in the version string corrupts the release URL), and a CRLF src/assets/shim.sh gets embedded via include_str! and shipped as a broken bash shim to every managed repo. Pin the bash-path files to LF; .cmd stays CRLF. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The spec/plan under docs/superpowers/ are local planning artifacts, not part of the deliverable. Untrack (keep on disk) and gitignore the directory. Co-Authored-By: Claude Opus 4.8 <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
Makes
./meta <cmd>work transparently on native Windows, not just Git Bash.meta.cmd+.meta/shim.ps1(new generated artifacts): PowerShell (./meta) and cmd.exe (.\meta) both resolvemeta.cmd, which relaunches PowerShell with-ExecutionPolicy Bypassinto the hidden.meta/shim.ps1(mirror of the bashshim.sh: read.meta/version→ map arch → download the pinned release → verify sha256 → exec → propagate exit code). The bashmetashim is unchanged.install.ps1(new): nativeirm https://raw.githubusercontent.com/tizz98/ai-meta/main/install.ps1 | iexbootstrapper, mirror ofinstall.sh..gitattributes: pins*.cmd→CRLF and the bash-path files (*.sh,meta,.meta/version)→LF, so a Windows checkout never bakes a CRLF-broken bash shim into the binary viainclude_str!../metaresolves a binary in-repo.Design (why no root
meta.ps1)PowerShell ranks a repo-root
.ps1above a PATHEXT.cmd, and a directly-invoked.ps1is subject to execution policy. Keeping no rootmeta.ps1makes PowerShell's./metafall through tometa.cmd, whose-ExecutionPolicy Bypassis immune to the machine policy. Verified empirically on PowerShell 5.1 and 7.Test plan
cargo test— newscaffold::tests::generates_windows_launcherspasses. (102 pass; the 2 failingsrc/process.rstests are a pre-existingsh-on-Windows env issue, green on CI/Linux, untouched by this branch — follow-up chipped.)cargo clippy --all-targets -- -D warnings,cargo fmt --all— clean../meta checkunder Restricted execution policy → exit 0 (downloaded the realai-meta-x86_64-pc-windows-msvc.exe);.\metain cmd.exe works; a nonzero exit propagates through both hops exactly once (no double-run).install.ps1real install → runnablemeta.exe; checksum verified; PATH nudge is print-only.Follow-ups (not in this PR)
.gitattributesinto managed repos (so a consumer's committed bash shim survives a Windows teammate's clone).which()PATHEXT resolution + the twosh-dependentsrc/process.rstests on Windows.🤖 Generated with Claude Code