Skip to content

feat(install): add standalone binary install and detect the real upgrade owner - #44

Merged
wsehl merged 1 commit into
mainfrom
feat/binary-install
Sep 29, 2026
Merged

wsehl merged 1 commit into
mainfrom
feat/binary-install

Conversation

@wsehl

@wsehl wsehl commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Binary install: new install.sh downloads bstack-<os>-<arch> (macOS/Linux, arm64/x64) from the latest GitHub release into ~/.local/bin (or BSTACK_INSTALL_DIR). It downloads to a temp file and renames it over the target, so it can replace a running bstack.
  • Release workflow: a new binaries job builds the four targets with bun build --compile after release-please creates a release and uploads them to the release. It runs on macos-latest so the darwin binaries get signed.
  • Upgrade detection: package installs now upgrade through the package manager whose global directory (npm root -g, pnpm root -g, bun pm bin -g, yarn global dir) holds the running script. Before, the first manager whose global list included bstack won, so with more than one global install the wrong copy could be upgraded and the command still reported success.
  • Binary upgrade: bstack update / bstack upgrade in a compiled binary reruns the installer into the binary's own directory.
  • README: pi-style install section (curl | sh plus npm/pnpm/bun with --ignore-scripts) and a tighter usage section.

Notes

  • The install URL only works after this merges, and binaries only exist after the next release.
  • Each binary is about 60 MB because it bundles the Bun runtime. There is no Windows binary; Windows users install with npm.

Test plan

  • lint, format-check, type-check, and tests pass
  • Detection picks pnpm for a script under the real pnpm global dir
  • install.sh and binary self-upgrade tested locally with a stubbed curl
  • After the next release: curl -fsSL .../install.sh | sh installs a working binary

🤖 Generated with Claude Code

…ade owner

Add install.sh, which downloads a Bun-compiled bstack binary from the latest
GitHub release, and build those binaries in the release workflow. Binary
installs upgrade by rerunning the installer into their own directory.

Package installs now upgrade through the package manager whose global
directory holds the running script, instead of the first one that lists
bstack, so an extra install elsewhere can't take the upgrade.

Rework the README install section.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@wsehl
wsehl merged commit 16d70f9 into main Sep 29, 2026
1 check passed
@wsehl
wsehl deleted the feat/binary-install branch September 29, 2026 13:35
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