Skip to content

feat: add Windows install script#32

Merged
pablopunk merged 3 commits into
mainfrom
feat/windows-installer
Jul 5, 2026
Merged

feat: add Windows install script#32
pablopunk merged 3 commits into
mainfrom
feat/windows-installer

Conversation

@pablopunk

@pablopunk pablopunk commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a PowerShell installer for Windows that downloads the latest dot-windows-x64.exe release asset
  • install dot.exe under %LOCALAPPDATA%\Programs\dot
  • add the install directory to the user's PATH and verify the binary runs
  • document the Windows installation command in the README

Testing

  • npm exec --yes bun@latest -- test
  • verified latest GitHub release contains dot-windows-x64.exe
  • git diff --cached --check

Prepared with help from Hermes/Codex AI.

Summary by CodeRabbit

  • New Features

    • Added a Windows PowerShell installer that downloads the latest release, installs the app, and updates your user PATH automatically.
    • Added support for an easier Windows-specific install flow with built-in help and progress messages.
  • Documentation

    • Expanded the installation guide with clearer macOS/Linux and Windows-specific instructions.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@pablopunk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 41a8f3e5-2cda-48ea-901c-02d7b6c4f264

📥 Commits

Reviewing files that changed from the base of the PR and between 11c433c and ef02236.

📒 Files selected for processing (1)
  • scripts/install.ps1

Walkthrough

This PR adds a new Windows PowerShell installer script (scripts/install.ps1) and updates README.md with OS-specific installation instructions. The script validates the platform is Windows, detects architecture (x64 supported), fetches the latest GitHub release, downloads and installs the matching binary to a user-scoped directory, updates the user PATH, verifies installation, and cleans up temporary files.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant InstallScript as install.ps1
  participant GitHubAPI
  participant FileSystem

  User->>InstallScript: run install.ps1
  InstallScript->>InstallScript: Assert-Windows / Get-DotArchitecture
  InstallScript->>GitHubAPI: Get-LatestRelease
  GitHubAPI-->>InstallScript: release metadata
  InstallScript->>GitHubAPI: download matching asset
  GitHubAPI-->>InstallScript: binary file
  InstallScript->>FileSystem: Install-DotBinary (move to dot.exe)
  InstallScript->>FileSystem: Add-ToUserPath
  InstallScript->>FileSystem: Test-Installation (run dot --help)
  InstallScript->>FileSystem: Remove-TempDir
  InstallScript-->>User: success/warning output
Loading

Compact metadata

  • Type: Feature addition (installer script) + documentation update
  • Files changed: 2 (README.md, scripts/install.ps1)
  • Lines changed: +270/-0

Related issues: None specified

Related PRs: None specified

Suggested labels: documentation, enhancement, windows

Suggested reviewers: pablopunk

Poem
A rabbit hops on Windows snow,
PowerShell script begins to flow,
Fetches releases, checks the arch,
Installs dot.exe on its march,
PATH updated, cleanup done,
Cross-platform install, second one! 🐇💻

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a Windows installer script for dot.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pablopunk

Copy link
Copy Markdown
Owner Author

Fix pushed: replaced RuntimeInformation-based architecture detection with Windows environment variables for Windows PowerShell compatibility.\n\nValidation: npm exec --yes bun@latest -- test → 171 pass, 0 fail.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
scripts/install.ps1 (1)

66-70: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Consider allowing ARM64 via x64 emulation.

Windows 11 on ARM64 transparently runs x64 binaries under emulation, so hard-blocking arm64 denies an otherwise-working install. You could fall back to the x64 asset with a note instead of exiting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/install.ps1` around lines 66 - 70, The architecture check in the
install script currently hard-blocks arm64, but Windows 11 on ARM64 can run the
x64 asset under emulation. Update the arm64 branch in the install logic to fall
back to the x64 download path instead of exiting, and keep a warning message in
the relevant installer flow so users know emulation is being used.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/install.ps1`:
- Around line 208-213: The native binary check in the install script only
catches launch failures, so a non-zero exit from the $DotPath --help invocation
can still be reported as success. Update the try block around the $DotPath call
to inspect $LASTEXITCODE after the native command runs, and branch to
Write-Success only when it is zero; otherwise emit the warning path in the same
install script flow.
- Around line 54-76: The helper failures in Assert-Windows and
Get-DotArchitecture currently use exit, which can terminate the caller’s
PowerShell session when invoked from the installer flow. Change these helpers to
throw terminating errors instead of exiting, then catch and report those
failures in Main so the script returns control to the prompt cleanly. Keep the
existing validation logic in Assert-Windows and Get-DotArchitecture, but move
process-level termination responsibility out of the helpers.
- Around line 162-191: The PATH update logic in the PowerShell installer is
flattening expandable user PATH entries because it reads with
GetEnvironmentVariable and writes back with SetEnvironmentVariable, which can
lose REG_EXPAND_SZ segments. Update the PATH handling in the install script to
read and write HKCU\Environment\Path directly using DoNotExpandEnvironmentNames
when reading and ExpandString when saving, and keep the existing
normalization/check logic in place around the PATH merge in the installer flow.

---

Nitpick comments:
In `@scripts/install.ps1`:
- Around line 66-70: The architecture check in the install script currently
hard-blocks arm64, but Windows 11 on ARM64 can run the x64 asset under
emulation. Update the arm64 branch in the install logic to fall back to the x64
download path instead of exiting, and keep a warning message in the relevant
installer flow so users know emulation is being used.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9f94ceb-ae1a-4d09-934d-7bab4d3bf28e

📥 Commits

Reviewing files that changed from the base of the PR and between c990520 and 11c433c.

📒 Files selected for processing (2)
  • README.md
  • scripts/install.ps1

Comment thread scripts/install.ps1
Comment thread scripts/install.ps1 Outdated
Comment thread scripts/install.ps1
@pablopunk

Copy link
Copy Markdown
Owner Author

Addressed the CodeRabbit review comments:

  • replaced installer exit 1 failure paths with throw + a Main catch, so irm ... | iex returns to the prompt cleanly
  • preserved expandable user PATH entries by reading/writing HKCU\Environment\Path directly with DoNotExpandEnvironmentNames and RegistryValueKind.ExpandString
  • checked $LASTEXITCODE after dot.exe --help before reporting success
  • allowed Windows ARM64 to use the x64 asset under emulation with a warning

Validation:

  • npm exec --yes bun@latest -- test → 171 pass, 0 fail
  • git diff --check
  • verified no remaining exit 1, PATH SetEnvironmentVariable, or RuntimeInformation usage in scripts/install.ps1

@pablopunk pablopunk merged commit a07fc31 into main Jul 5, 2026
9 checks passed
@pablopunk pablopunk deleted the feat/windows-installer branch July 5, 2026 19:41
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