Skip to content

Conversation

butschster
Copy link
Collaborator

Adds a native Windows installer script (download-latest.ps1)Default installation to %LOCALAPPDATA%\ctx (e.g., C:\Users\YourName\AppData\Local\ctx) ✅ Added -CurrentDir switch to install to current directory when needed ✅ Smart PATH handling:

  • Default location → Adds to PATH automatically
  • Current directory → Does NOT add to PATH (unless -AddToPath specified)
  • Custom path → Adds to PATH automatically (unless -AddToPath:$false specified)

Usage Examples

# Install to %LOCALAPPDATA%\ctx and add to PATH (NEW DEFAULT)
.\download-latest.ps1

# Install to current directory without PATH
.\download-latest.ps1 -CurrentDir

# Install to current directory WITH PATH
.\download-latest.ps1 -CurrentDir -AddToPath

# Install to custom location with PATH
.\download-latest.ps1 -Path "C:\Tools\ctx"

# Install to custom location WITHOUT PATH
.\download-latest.ps1 -Path "C:\Tools\ctx" -AddToPath:$false
powershell -c "& ([ScriptBlock]::Create((irm 'https://raw.githubusercontent.com/context-hub/generator/main/download-latest.ps1'))) -AddToPath"

@butschster butschster added this to the 1.32 milestone Sep 30, 2025
@butschster butschster self-assigned this Sep 30, 2025
@butschster butschster added the os:windows Windows specific issues label Sep 30, 2025
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@butschster butschster moved this to Done in Context Generator Sep 30, 2025
@butschster butschster merged commit 2da5e70 into main Sep 30, 2025
5 checks passed
@butschster butschster deleted the issue/256 branch September 30, 2025 07:11
@butschster butschster linked an issue Sep 30, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:windows Windows specific issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve Windows Cli Installer
1 participant