Repository navigation
feat: add Windows PowerShell installer (install.ps1) - #779
Conversation
|
Revision v2 � fixes from testing:
|
|
Additional verification � uteke-serve and uteke-mcp: uteke-serve � uteke-mcp � Tested with JSON-RPC
All tools include full input schemas with required fields, types, and descriptions. |
ajianaz
left a comment
There was a problem hiding this comment.
Nice work! Well-structured PowerShell installer — clean functions, proper error handling, SHA256 verification. Landed a few things that need attention though.
🔴 Must Fix
Write-ErrorMsg on checksum mismatch exits without cleaning up temp files
When checksum verification fails, Write-ErrorMsg calls exit 1 immediately — but $archivePath, $checksumPath, and $extractDir are left behind in the temp directory. The cleanup block only runs on the happy path.
# Current — exits without cleanup
if ($actualHash -ne $expectedHash.ToLower()) {
Write-ErrorMsg "Checksum mismatch! ..."
}
# Fix — clean up before exiting
if ($actualHash -ne $expectedHash.ToLower()) {
Write-Host "[ERROR] Checksum mismatch! Expected: $expectedHash, Got: $actualHash" -ForegroundColor Red
Remove-Item $archivePath -Force -ErrorAction SilentlyContinue
Remove-Item $checksumPath -Force -ErrorAction SilentlyContinue
Remove-Item $extractDir -Recurse -Force -ErrorAction SilentlyContinue
exit 1
}$env:GH_TOKEN = $env:GH_TOKEN is a no-op
This line assigns the variable to itself — it doesn't do anything. Can safely be removed.
# Remove this line
$env:GH_TOKEN = $env:GH_TOKEN🟡 Should Fix
No newline at end of file
Git flags this with \ No newline at end of file. Add a trailing newline to install.ps1.
INSTALL.md not updated
The "Windows Setup" section in INSTALL.md still only shows manual download instructions. Since this PR adds a proper one-liner installer, there should be an Option C: PowerShell One-Liner added there, similar to how Linux/macOS has the curl | sh option.
💡 Nice to Have
Add UTEKE_INSTALL_DIR env var support for consistency
install.sh supports UTEKE_INSTALL_DIR as an env var fallback:
INSTALL_DIR="${UTEKE_INSTALL_DIR:-$HOME/.local/bin}"The PowerShell script only accepts -InstallDir as a parameter. Adding an env var check would make the two installers more consistent:
$ResolvedInstallDir = if ($InstallDir -and $InstallDir -ne "$env:USERPROFILE\.local\bin") {
$InstallDir
} elseif ($env:UTEKE_INSTALL_DIR) {
$env:UTEKE_INSTALL_DIR
} else {
"$env:USERPROFILE\.local\bin"
}⚠️ Important Note: README URL targets main branch
The install command in README points to main:
irm https://raw.githubusercontent.com/codecoradev/uteke/main/install.ps1 | iex
This PR merges into develop. The file won't be available at that URL until develop is synced to main. Make sure a sync PR is created after this merges.
What's working well:
- Clean [CmdletBinding()] + param block structure
- SHA256 checksum verification against
checksums-sha256.txt gh auth tokenintegration for rate limit mitigation- Idempotent PATH update (checks before adding)
- Installs all 3 binaries consistently with
install.sh - Verification step runs
--version/--helpon each binary
ajianaz
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Solid work on the PowerShell installer.
Review Summary
Overall: ✅ Approved with minor suggestions
What works well
- SHA256 checksum verification against
checksums-sha256.txt— good security practice - Proper architecture detection (AMD64/ARM64)
- Uses
gh auth tokenfor authenticated API requests (avoids rate limits) - Clean function decomposition (
Get-LatestVersion,Install-Uteke,Update-Path,Verify-Install) $ErrorActionPreference = "Stop"— fail-fast by default- Version pinning support (
-Version v0.10.0) - Proper cleanup of temp files
Minor suggestions (non-blocking)
-
Naming: The installer adds 3 binaries but the PR title says "install.ps1" — consider the Quick Start section mentions
uteke --version(which isuteke.exe), not the MCP/server binaries. Minor doc clarity. -
Verify-Installuses--helpfor uteke-serve/uteke-mcp — fine for now, but when--versionis added to those binaries, consider updating. -
Checksum parsing (
$_.Split(" ")[0]): Works for current format. If checksums file format changes (e.g., to two-space separator), the regex split\s+handles it. Good defensive coding. -
No newline at end of file (trivial).
CI Note
The Trivy FS Scan failure is a pre-existing issue on this branch (from Jul 25), not related to this PR. Build, Test, Clippy, Format, Cargo Audit, and Cora Review all pass.
Verdict
Ready to merge after rebasing on latest develop (PR is 10 days old). The README install table addition is correctly placed. Welcome addition — Windows users now have a native PowerShell install path without needing WSL or curl.
368d91a to
0e68f4f
Compare
- v0.12.0: add @KazamiHazaki (Windows installer #779) + @dependabot - v0.11.0: add @themiguelamador (#830 #831) + @tomatotomata (#829) - v0.12.0: add install.ps1 to Added section Co-authored-by: ajianaz <[email protected]>
* feat: add Windows PowerShell installer (install.ps1) * fix: find latest release with Windows binary instead of using /latest endpoint * fix: add ExecutionPolicy Bypass to Windows install command in README * ci: trigger PR description re-check --------- Co-authored-by: KazamiHazaki <[email protected]> Co-authored-by: ajianaz <[email protected]>
- v0.12.0: add @KazamiHazaki (Windows installer #779) + @dependabot - v0.11.0: add @themiguelamador (#830 #831) + @tomatotomata (#829) - v0.12.0: add install.ps1 to Added section Co-authored-by: ajianaz <[email protected]>
What
Adds
install.ps1— a pure PowerShell Windows installer (no Node.js, no WSL, no curl). Downloads the latest release with Windows binary from GitHub, verifies SHA256 checksum, installs all 3 binaries (uteke.exe, uteke-serve.exe, uteke-mcp.exe), and adds install dir to user PATH.Why
Windows users previously had to use WSL, install curl, or manually download binaries from GitHub Releases. This provides a native one-liner install experience comparable to the existing
install.shfor Unix systems.How
Pure PowerShell 5.1+ script (no external dependencies):
checksums-sha256.txtgh auth tokenfor authenticated API requests (avoids rate limits)-Version v0.10.0), custom dir (-InstallDir), and-NoPathUpdateflagsTesting
cargo test --workspacepasses (CI)cargo fmt --all -- --checkpasses (CI)cargo clippy --workspace --all-targets -- -D warningspasses (CI)uteke --version, remember, recall, search, list, get, forget, stats, doctor, verify,uteke-serve --help,uteke-mcpMCP stdio server, PATH updateRelated Issues
N/A
Checklist
feat/)develop