Skip to content

Serve install scripts from ferrus.dev/cli/ - #25

Merged
RomanEmreis merged 1 commit into
mainfrom
install-script-aliases
Aug 25, 2026
Merged

RomanEmreis merged 1 commit into
mainfrom
install-script-aliases

Conversation

@RomanEmreis

@RomanEmreis RomanEmreis commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Adds static/_redirects so the site 302s the pretty install URLs to the latest GitHub release assets:
    • /cli/install.sh -> github.com/ferrus-dev/ferrus/releases/latest/download/install.sh
    • /cli/install.ps1 -> .../install.ps1
  • Points the install snippets at those short URLs, in src/components/InstallTabs/index.tsx. That component renders on both the homepage and Quickstart, so both pages pick this up.

The commands become:

curl -fsSL https://ferrus.dev/cli/install.sh | sh
irm https://ferrus.dev/cli/install.ps1 | iex

Why

The long release-asset URL was hardcoded in the docs. Behind ferrus.dev/cli/, a repo or org rename is a one-line change in _redirects instead of an edit to every page and every copy of the command users have already pasted into their own READMEs and CI.

The /cli/ prefix leaves room for a future desktop build at /desktop/install.sh. Doing that split in the installer instead (prompting for a variant) does not work under curl | sh — stdin is the pipe, not a terminal.

Notes for the reviewer

  • The Windows snippet also switches from iwr ... -useb | iex to the shorter irm ... | iex. Same behavior; both follow redirects by default, as does curl -fsSL.
  • Docusaurus copies static/ to the root of build/, which is what wrangler serves as assets, so the rules are picked up with no config change.
  • Verified locally with npm run build && npx wrangler dev: wrangler logs "Parsed 2 valid redirect rules", and both paths return 302 with the expected Location.
  • Cloudflare Workers static assets support external redirects in _redirects; only the Pages-style 200 proxy status is unsupported, which this does not use.
  • Rebased onto main after Update GitHub organization from RomanEmreis to ferrus-dev #24. That PR renamed the org in the same two lines this one replaces outright, so the conflict resolved in favor of the short URLs — the release-asset URL now lives only in _redirects.

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ferrus 9f93975 Commit Preview URL

Branch Preview URL
Aug 25 2026, 05:16 PM

Add a `_redirects` file so the site 302s /cli/install.sh and
/cli/install.ps1 to the latest GitHub release assets, and point the
install snippets at those short URLs.

The docs no longer hardcode the release-asset URL, so an org or repo
rename only needs a change in `_redirects`. The Windows command also
switches from `iwr -useb | iex` to the shorter `irm | iex`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@RomanEmreis
RomanEmreis force-pushed the install-script-aliases branch from d7b1fae to 9f93975 Compare August 25, 2026 17:15
@RomanEmreis
RomanEmreis merged commit 8b5336f into main Aug 25, 2026
2 checks passed
@RomanEmreis
RomanEmreis deleted the install-script-aliases branch August 25, 2026 17:18
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