Remote installer: curl | sh bootstrap for a fresh Debian VPS - #2
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add init_ui, paint, _c, hr, step_ok, step_fail, note, log_line, die to deploy/bootstrap.sh. Fix _c to append `|| true` so it never returns nonzero when COLOR=0 — the bare `[ cond ] && printf ...` form otherwise trips `set -e` at every call site (step_ok/hr/die/note), aborting the step before its label ever prints.
Add _hero_rgb, hero, spinner_start/spinner_stop, progress_bar to deploy/bootstrap.sh. hero degrades to a single line under WIDTH<62 or plain color. Spinner/progress are cosmetic and short-circuit under COLOR=0 or non-tty, so they never run in the test suite.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a GitHub Actions workflow that shellchecks deploy/bootstrap.sh and its test suite and runs the unit tests on every deploy/** change. Point the README's server install instructions at the remote bootstrap.sh one-liner (and --from-checkout for local dev) instead of the superseded checkout-only deploy/install.sh, which is now removed.
Address final review: the spinner_start/<work>/spinner_stop idiom aborted under set -e before spinner_stop and the trailing || die, leaving dead error handling and (in build_binary) an orphaned spinner. Capture rc under set +e/set -e at each site so failures reach a clean die/note; move build_binary's spinner into the parent shell so cleanup can kill it. Also: fd-3 falls back to /dev/null (safe defaults) not stdin on headless pipes; journalctl -b avoids stale setup tokens on re-run; preserve the live SSH session's port so a non-standard sshd port isn't firewalled out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
deploy/bootstrap.sh— a single, self-contained POSIX-sh installer served athttps://outhaul.sh/install, so a fresh Debian VPS goes from nothing to a running Outhaul with:curl -fsSL https://outhaul.sh/install | shHighlights
OUTHAULhero, braille spinner, colored step ledger, confetti finish; auto-falls back truecolor→256→16→plain (NO_COLOR/non-TTY) and Unicode→ASCII, and emits clean prefixed logs when piped (no escape soup)./dev/tty(fd 3): ingress mode (Let's Encrypt / Cloudflare Tunnel / local-only), git-push port, optional Nixpacks, optional firewall — with a safe/dev/nullfallback (defaults, never stdin) on truly headless pipes.go.modand downloaded from go.dev with SHA256 verification (Debian's apt Go is far too old), plusGOTOOLCHAIN=localso the build can't silently fetch a different toolchain.ufw allowevery port (incl. SSH/22 and the live SSH session's actual port) beforeufw enable, so you can't lock yourself out.deploy/install.sh(dev path preserved:sudo sh deploy/bootstrap.sh --from-checkout .). Systemd unit unchanged.Built TDD-first: pure logic (version parse, firewall-port derivation, swap decision, env-file gen, color detection, prompts, setup-URL extraction) is unit-tested with a zero-dependency POSIX harness; a systemd-Debian Docker harness covers the end-to-end path in CI. All error paths were hardened so a failed step reaches a clean
die/noterather than aborting mid-install underset -e.Spec:
docs/superpowers/specs/2026-07-13-remote-installer-design.md· Plan:docs/superpowers/plans/2026-07-13-remote-installer.mdTest Plan
docker run --rm -v "$PWD:/x" debian:13 dash /x/deploy/test/run.sh→ 14 files, 0 failedshellcheck -s sh --severity=warningclean onbootstrap.sh+ tests (matches CI)set -efail-path verified: a failinggo buildreachesdie "build failed"(exit 1), no orphaned spinnerCOLOR=0emits no ANSI escapes; hero reflows/one-lines under narrow widthdeploy/test/integration.sh) — runs in CI (needs privileged systemd-in-Docker, not available in the dev sandbox)🤖 Generated with Claude Code