Skip to content

Conversation

@ishaksebsib
Copy link
Contributor

@ishaksebsib ishaksebsib commented Oct 2, 2025

Description

helix installation script for Windows

Related Issues

None

Checklist when merging to main

  • No compiler warnings (if applicable)
  • Code is formatted with rustfmt
  • No useless or dead code (if applicable)
  • Code is easy to understand
  • Doc comments are used for all functions, enums, structs, and fields (where appropriate)
  • All tests pass
  • Performance has not regressed (assuming change was not to fix a bug)
  • Version number has been updated in helix-cli/Cargo.toml and helixdb/Cargo.toml

Additional Notes

None

Greptile Overview

Updated On: 2025-11-06 01:54:27 UTC

Greptile Summary

Adds Windows PowerShell installation script with install/uninstall functionality, PATH management, checksum verification, and proper error handling.

Key Changes

  • New install.ps1 providing native Windows support for Helix CLI installation
  • Implements architecture detection (currently amd64 only, with ARM64 detection)
  • Supports both user-level (~/.local/bin) and system-wide (Program Files) installations
  • Includes backward compatibility for older asset naming conventions (pre-v2.0.2)
  • Features robust error handling with try-catch blocks and cleanup logic

Issues Found

  • Two previously identified issues need resolution:
    • Typo in comment at line 143 ('strting' → 'starting')
    • Critical PATH check logic error at lines 301-302 (filters out target path before checking if it exists)
  • Minor style issue: unnecessary blank lines at 265-266

Important Files Changed

File Analysis

Filename Score Overview
helix-cli/install.ps1 4/5 New PowerShell Windows installer with comprehensive functionality - two existing comments need resolution (typo at line 143, PATH logic error at line 301-302)

Sequence Diagram

sequenceDiagram
    participant User
    participant PS as PowerShell Script
    participant GH as GitHub API
    participant FS as File System
    participant ENV as Environment Variables

    User->>PS: Execute install.ps1 with params
    
    alt Help flag
        PS->>User: Display help and exit
    else Uninstall flag
        PS->>FS: Remove helix.exe
        PS->>ENV: Remove from PATH
        PS->>FS: Clean up directories
        PS->>User: Uninstall complete
    else Install (default)
        PS->>PS: Detect architecture (amd64)
        PS->>GH: Fetch release info
        GH-->>PS: Return release data + assets
        
        alt Not forced & same version exists
            PS->>FS: Check existing installation
            PS->>User: Already up to date
        else Install/Upgrade
            PS->>FS: Create temp directory
            PS->>GH: Download binary
            GH-->>PS: Binary file
            
            opt Checksum available
                PS->>GH: Download checksum
                GH-->>PS: SHA256 hash
                PS->>PS: Verify integrity
            end
            
            PS->>FS: Create install directory
            PS->>FS: Move binary to destination
            PS->>ENV: Update user PATH
            PS->>PS: Test installation (--version)
            PS->>FS: Clean up temp files
            PS->>User: Installation successful
        end
    end
Loading

@xav-db
Copy link
Member

xav-db commented Oct 3, 2025

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

@xav-db
Copy link
Member

xav-db commented Nov 6, 2025

@ishaksebsib is this ready?

@ishaksebsib ishaksebsib marked this pull request as ready for review November 6, 2025 01:52
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Member

@xav-db xav-db left a comment

Choose a reason for hiding this comment

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

LGTM

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