Skip to content

feat: add Windows PowerShell installer (install.ps1) - #779

Merged
ajianaz merged 4 commits into
codecoradev:developfrom
KazamiHazaki:feat/windows-installer-ps1
Aug 4, 2026
Merged

ajianaz merged 4 commits into
codecoradev:developfrom
KazamiHazaki:feat/windows-installer-ps1

Conversation

@KazamiHazaki

@KazamiHazaki KazamiHazaki commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

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.sh for Unix systems.

How

Pure PowerShell 5.1+ script (no external dependencies):

  • Auto-detects latest release with Windows binary from GitHub API
  • SHA256 checksum verification against checksums-sha256.txt
  • Uses gh auth token for authenticated API requests (avoids rate limits)
  • Supports pinned version (-Version v0.10.0), custom dir (-InstallDir), and -NoPathUpdate flags

Testing

  • cargo test --workspace passes (CI)
  • cargo fmt --all -- --check passes (CI)
  • cargo clippy --workspace --all-targets -- -D warnings passes (CI)
  • Cora review passed (CI)
  • Manual smoke-test on Windows: download + checksum verify, binary install (3 exes), uteke --version, remember, recall, search, list, get, forget, stats, doctor, verify, uteke-serve --help, uteke-mcp MCP stdio server, PATH update

Related Issues

N/A

Checklist

  • Branch name follows convention (feat/)
  • Branch is from develop
  • Commit messages follow Conventional Commits
  • No secrets or credentials committed
  • One logical change per PR (no mixed concerns)

@KazamiHazaki

Copy link
Copy Markdown
Contributor Author

Revision v2 � fixes from testing:

  • Get-LatestVersion now iterates through releases to find one with a Windows binary (v0.10.1 had no assets)
  • Uses gh auth token for authenticated API requests to avoid rate limiting
  • Added Invoke-GitHubApi helper function with bearer token support
  • Removed broken redirect method (MaximumRedirection fails in non-interactive PowerShell)
  • README now shows proper command with -ExecutionPolicy Bypass
  • Updated install.ps1 synopsis with both execution methods
  • All raw.githubusercontent.com URLs point to codecoradev/uteke (not fork)

@KazamiHazaki

Copy link
Copy Markdown
Contributor Author

Additional verification � uteke-serve and uteke-mcp:

uteke-serve � uteke-serve --help outputs full server documentation with all API endpoints (health, remember, recall, search, list, forget, memory, stats, rooms, docs). Binary runs and responds correctly.

uteke-mcp � Tested with JSON-RPC initialize and tools/list:

Request:  {"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}
Response: {"capabilities":{"tools":{}},"protocolVersion":"2025-06-18","serverInfo":{"name":"uteke","version":"0.10.0"}}

tools/list returns 30 MCP tools including:

  • uteke_remember / uteke_recall / uteke_search / uteke_list / uteke_forget / uteke_stats
  • uteke_context / uteke_dream
  • uteke_doc_create / uteke_doc_update / uteke_doc_get / uteke_doc_list / uteke_doc_search / uteke_doc_delete / uteke_doc_move
  • uteke_graph / uteke_graph_add_edge / uteke_graph_remove_edge
  • uteke_room_create / uteke_room_list / uteke_room_delete / uteke_room_recall / uteke_room_memories / uteke_room_stats / uteke_room_summary / uteke_room_document
  • uteke_tags_list / uteke_tags_rename / uteke_tags_delete
  • uteke_pin / uteke_unpin

All tools include full input schemas with required fields, types, and descriptions.

@ajianaz ajianaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 token integration for rate limit mitigation
  • Idempotent PATH update (checks before adding)
  • Installs all 3 binaries consistently with install.sh
  • Verification step runs --version/--help on each binary

@ajianaz ajianaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 token for 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)

  1. Naming: The installer adds 3 binaries but the PR title says "install.ps1" — consider the Quick Start section mentions uteke --version (which is uteke.exe), not the MCP/server binaries. Minor doc clarity.

  2. Verify-Install uses --help for uteke-serve/uteke-mcp — fine for now, but when --version is added to those binaries, consider updating.

  3. 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.

  4. 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.

@ajianaz
ajianaz force-pushed the feat/windows-installer-ps1 branch from 368d91a to 0e68f4f Compare August 4, 2026 13:41
@ajianaz
ajianaz merged commit a9f4fbb into codecoradev:develop Aug 4, 2026
13 checks passed
@ajianaz ajianaz mentioned this pull request Aug 5, 2026
2 tasks done
ajianaz added a commit that referenced this pull request Aug 5, 2026
- 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]>
ajianaz added a commit that referenced this pull request Aug 13, 2026
* 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]>
ajianaz added a commit that referenced this pull request Aug 13, 2026
- 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]>
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.

2 participants