Skip to content

feat(install): unified install.sh that prefers Homebrew - #347

Merged
eddietejeda merged 3 commits into
mainfrom
install-script-brew
Oct 18, 2026
Merged

eddietejeda merged 3 commits into
mainfrom
install-script-brew

Conversation

@eddietejeda

@eddietejeda eddietejeda commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds scripts/install.sh, published as a release asset via a dist extra-artifact, so curl .../releases/latest/download/install.sh | sh (and, after hotdata-dev/www#456, curl -fsSL https://hotdata.dev/install | sh) works on Linux and macOS.

  • If brew is found (PATH or the usual prefixes), runs brew install hotdata-dev/tap/cli, or brew upgrade when already installed. This keeps the binary brew-managed so hotdata manage upgrade follows the same path.
  • Otherwise falls back to the cargo-dist hotdata-cli-installer.sh (prebuilt binary in ~/.hotdata/cli).
  • After the binary lands, runs hotdata manage skills install --no-input so the agent skill is in ~/.agents/skills and linked into ~/.claude/skills when that directory exists. Best-effort: a skill failure warns and does not fail the install.
  • HOTDATA_NO_BREW=1 forces the fallback; HOTDATA_NO_SKILLS=1 skips the skill.

Tested locally: fake-brew harness for the install branch, real brew for the already-installed branch (skill ends up symlinked into ~/.claude), shellcheck clean. The asset only exists from the next release onward.

Ships scripts/install.sh as a release asset. It installs through the
hotdata-dev/tap/cli formula when brew is present (HOTDATA_NO_BREW=1 to
skip), otherwise pipes to the cargo-dist installer. README now leads
with the one-liner.
@eddietejeda
eddietejeda requested a review from a team as a code owner October 18, 2026 01:12
@eddietejeda
eddietejeda requested review from anoop-narang and removed request for a team October 18, 2026 01:12
Comment thread scripts/install.sh
if [ -n "$BREW" ]; then
echo "Homebrew found at $BREW; installing $FORMULA" >&2
if "$BREW" list --formula cli >/dev/null 2>&1; then
"$BREW" upgrade "$FORMULA"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Check the fully-qualified formula instead of the short name cli (not blocking).

Suggested change
"$BREW" upgrade "$FORMULA"
if "$BREW" list --formula "$FORMULA" >/dev/null 2>&1; then

The short name cli matches any installed formula named cli from any tap. A user with a different cli formula takes the upgrade branch. brew upgrade hotdata-dev/tap/cli then fails with "not installed", and set -e aborts the script.

Comment thread scripts/install.sh
echo "Homebrew not found; installing a prebuilt binary to ~/.hotdata/cli" >&2
if command -v curl >/dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -LsSf "$DIST_INSTALLER" | sh
elif command -v wget >/dev/null 2>&1; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Download the dist installer fully before running it, so a failed download fails the script (not blocking).

POSIX sh has no pipefail. If curl fails here (404 before the next release, or a network error), sh reads empty input and exits 0. The script then reports success with no binary installed. CI jobs that use this installer pass silently. The wget branch on line 56 has the same problem.

Fix: capture the script first, for example script="$(curl --proto '=https' --tlsv1.2 -LsSf "$DIST_INSTALLER")" and then printf '%s\n' "$script" | sh. Under set -e, the failed assignment exits the script with an error.

claude[bot]
claude Bot previously approved these changes Oct 18, 2026
Runs 'hotdata manage skills install --no-input' once the binary is in
place, so ~/.claude/skills/hotdata exists right after install.
Best-effort; HOTDATA_NO_SKILLS=1 skips it.
claude[bot]
claude Bot previously approved these changes Oct 18, 2026
@eddietejeda
eddietejeda merged commit fdaae29 into main Oct 18, 2026
14 checks passed
@eddietejeda
eddietejeda deleted the install-script-brew branch October 18, 2026 01:19
@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

eddietejeda added a commit that referenced this pull request Oct 18, 2026
Documents the unified installer from #347: Homebrew when present,
prebuilt binary otherwise, skill installed afterward, and the two
opt-out variables.

Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.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