-
-
Notifications
You must be signed in to change notification settings - Fork 138
chore: install script for Windows(power-shell) #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 2 comments
helix-cli/install.ps1
Outdated
| # Map amd64 to x86_64 for Rust target format | ||
| $rustArch = "x86_64" | ||
|
|
||
| # new naming format strting from v2.0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: 'strting' is misspelled
| # new naming format strting from v2.0.2 | |
| # new naming format starting from v2.0.2 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: helix-cli/install.ps1
Line: 143:143
Comment:
**syntax:** 'strting' is misspelled
```suggestion
# new naming format starting from v2.0.2
```
How can I resolve this? If you propose a fix, please make it concise.
helix-cli/install.ps1
Outdated
| $pathEntries = $userPath -split ";" | Where-Object { $_ -and $_ -ne $BinPath } | ||
| if ($pathEntries -contains $BinPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Logic error: filters out the target path then checks if filtered array contains it
| $pathEntries = $userPath -split ";" | Where-Object { $_ -and $_ -ne $BinPath } | |
| if ($pathEntries -contains $BinPath) { | |
| $pathEntries = $userPath -split ";" | Where-Object { $_ -and $_ -ne "" } | |
| if ($pathEntries -contains $BinPath) { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: helix-cli/install.ps1
Line: 301:302
Comment:
**logic:** Logic error: filters out the target path then checks if filtered array contains it
```suggestion
$pathEntries = $userPath -split ";" | Where-Object { $_ -and $_ -ne "" }
if ($pathEntries -contains $BinPath) {
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
helix installation script for Windows
Related Issues
None
Checklist when merging to main
rustfmthelix-cli/Cargo.tomlandhelixdb/Cargo.tomlAdditional Notes
None
Greptile Overview
Updated On: 2025-10-03 08:17:28 UTC
Summary
This PR adds a PowerShell installation script (`install.ps1`) for Windows users to complement the existing Unix/Linux shell script. The script provides comprehensive functionality to install, uninstall, and manage the Helix CLI on Windows systems.The implementation follows the same patterns as the existing Unix installer but adapts to Windows-specific requirements:
Invoke-WebRequestinstead of curl/wget.exefile extensions and Windows-style path separatorsThe script maintains feature parity with the Unix version including checksum verification, progress tracking, version comparison to avoid unnecessary reinstalls, and support for both user and system-wide installations. It also includes backwards compatibility handling for different asset naming formats in GitHub releases.
This change enhances the project's accessibility by providing native Windows installation support, making it easier for Windows developers to get started with HelixDB without requiring WSL or other Unix-like environments.
Important Files Changed
Changed Files
helix-cli/install.ps1Sequence Diagram
sequenceDiagram participant User participant PowerShell as "PowerShell Script" participant GitHub as "GitHub API" participant FileSystem as "File System" participant Environment as "Environment Variables" User->>PowerShell: "Execute install.ps1 with parameters" alt Help requested PowerShell->>User: "Display help message and exit" else Uninstall requested PowerShell->>FileSystem: "Remove helix.exe binary" PowerShell->>Environment: "Remove from PATH variable" PowerShell->>FileSystem: "Clean up empty directories" PowerShell->>User: "Uninstall complete" else Install (default) PowerShell->>PowerShell: "Detect system architecture" PowerShell->>GitHub: "Fetch release information" GitHub-->>PowerShell: "Return release data and assets" alt Force not set and same version exists PowerShell->>FileSystem: "Check existing installation" PowerShell->>User: "Already up to date message" else Install/Reinstall PowerShell->>FileSystem: "Create temporary directory" PowerShell->>GitHub: "Download helix binary" GitHub-->>PowerShell: "Return binary file" opt Checksum available PowerShell->>GitHub: "Download checksum file" GitHub-->>PowerShell: "Return checksum" PowerShell->>PowerShell: "Verify file integrity" end PowerShell->>FileSystem: "Create install directory" PowerShell->>FileSystem: "Move binary to install location" PowerShell->>Environment: "Update user PATH variable" PowerShell->>PowerShell: "Test installation by running --version" PowerShell->>FileSystem: "Clean up temporary files" PowerShell->>User: "Installation successful message" end end