Skip to content

Windows install support: detect OS on home, add /install.ps1 route#5

Merged
julien-c merged 4 commits into
masterfrom
fix/install-windows-detection
May 18, 2026
Merged

Windows install support: detect OS on home, add /install.ps1 route#5
julien-c merged 4 commits into
masterfrom
fix/install-windows-detection

Conversation

@julien-c
Copy link
Copy Markdown
Contributor

Summary

  • Detect Windows in src/routes/+page.svelte via navigator.userAgent and swap the displayed install snippet (and copy handler) to irm https://llama.app/install.ps1 | iex.
  • Switch the curl flags to -LsSf.
  • Add src/routes/install.ps1/+server.ts, mirroring /install.sh but fetching upstream with a PowerShell/7.0 user-agent so installama.sh returns the PowerShell variant.

Note: the home-page swap happens in a \$effect after hydration, so Windows visitors briefly see the curl command before it switches. Acceptable tradeoff given the static deploy — a no-flash fix would need an inline UA-detection script in app.html.

Test plan

  • Visit / on macOS/Linux — shows curl command, copy copies it.
  • Visit / on Windows — shows irm | iex after hydration, copy copies it.
  • curl https://llama.app/install.sh returns the bash installer.
  • iwr https://llama.app/install.ps1 returns the PowerShell installer.

julien-c and others added 2 commits May 15, 2026 21:21
Detects Windows via navigator.userAgent on mount and swaps the install
snippet (and copy handler) to `irm | iex`. Also switches the curl flags
to `-LsSf`.

Co-Authored-By: julien-agent <Agents+cyolo@huggingface.co>
Mirrors /install.sh but fetches upstream with a PowerShell user-agent so
installama.sh returns the PowerShell variant of the installer.

Co-Authored-By: julien-agent <Agents+cyolo@huggingface.co>
@julien-c julien-c requested review from allozaur, angt and gary149 May 15, 2026 19:24
julien-c and others added 2 commits May 15, 2026 21:31
Co-Authored-By: julien-agent <Agents+cyolo@huggingface.co>
Co-Authored-By: julien-agent <Agents+cyolo@huggingface.co>
@julien-c julien-c merged commit d47034e into master May 18, 2026
1 check passed
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.

3 participants