Skip to content

feat: curl installer at hdtilt.com/install.sh - #21

Merged
ralyodio merged 1 commit into
mainfrom
feat/curl-install
Oct 13, 2026
Merged

ralyodio merged 1 commit into
mainfrom
feat/curl-install

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Every product serves curl -fsSL https://<domain>/install.sh | sh (standing rule, 2026-10-12). hdtilt had no installer, so this adds one.

web/public/install.sh (POSIX sh, never asks for root, re-running upgrades):

  • CLI: installs with bun if present, otherwise with npm, which needs Node >= 22.6 to match engines. When the npm global prefix is not writable, it installs into ~/.local. Then it checks that the bin is on PATH.

    • With bun but no node, the #!/usr/bin/env node bin cannot start, so the script replaces it with a small shim that runs hdtilt.js under bun.
    • It also creates ~/.bun/install/global/package.json when missing. Without that file, bun add -g walks up and adds hdtilt to the first package.json above it. That happened to me in testing.
  • Desktop: on a Linux desktop session (DISPLAY, WAYLAND_DISPLAY or XDG_CURRENT_DESKTOP), or with --desktop, the script:

    • downloads hdtilt-<ver>.AppImage for the latest release into ~/.local/share/hdtilt/
    • links it as ~/.local/bin/hdtilt-desktop
    • writes ~/.local/share/applications/hdtilt.desktop and an icon

    --cli-only skips this. On macOS it points to the release page for the dmg.

  • src/server/server.js: .sh is served as text/x-sh.

  • test/server.test.js: checks that /install.sh returns 200, has type text/x-sh, and starts with #!/bin/sh.

  • README: the Install section leads with the curl line.

Tested on dev2:

  • sh -n and dash -n pass.
  • Ran the script under dash in a throwaway HOME three ways. npm with a non-writable prefix installed to ~/.local/bin. bun with no node installed the shim. --desktop downloaded a 134 MB AppImage, created the menu entry and linked hdtilt-desktop. In every case hdtilt --version and --help ran.
  • bun run lint, bun run build and bun test pass (58 pass, 0 fail).

Note: the published npm hdtilt@0.2.11 reports --version as 0.2.10. #17 fixed src/version.js after that publish, so the next release corrects it.

🤖 Generated with Claude Code

House rule: every product answers `curl -fsSL https://<domain>/install.sh | sh`.

web/public/install.sh installs the `hdtilt` CLI with bun if present, or npm
with Node >= 22.6, falling back to ~/.local rather than sudo. With bun and no
node it writes a shim that runs the bin under bun. On a Linux desktop session
(or with --desktop) it also installs the AppImage into ~/.local/share/hdtilt
with a menu entry; --cli-only skips that. Re-running upgrades.

The server serves .sh as text/x-sh; a server test covers /install.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 0dcea0e into main Oct 13, 2026
3 checks passed
@ralyodio
ralyodio deleted the feat/curl-install branch October 13, 2026 00:03
@ralyodio ralyodio mentioned this pull request Oct 13, 2026
ralyodio added a commit that referenced this pull request Oct 13, 2026
Adds install.sh, generated from the W3BS npm CLI installer template, so
`curl -fsSL https://hdtilt.com/install.sh | sh` installs the hdtilt command into ~/.local with no root. It uses the
machine's Node if new enough, otherwise fetches an official Node build (checksum verified)
into ~/.local/share/hdtilt, and writes uninstall.sh + manifest.json there for the W3BS catalog.
The README install section now leads with the curl line.
The site copy (web/public/install.sh) replaces the bun/npm -g installer from #21: that one stopped with
"needs bun or Node" on a machine without Node, and had no uninstall. The desktop AppImage is no longer
installed by the script; the README points to the releases page for it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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