Skip to content

feat(runtime): ✨ support bunx binary downloads - #35

Open
CarmeloCampos wants to merge 2 commits into
arturosdg:mainfrom
CarmeloCampos:feat/bunx
Open

feat(runtime): ✨ support bunx binary downloads#35
CarmeloCampos wants to merge 2 commits into
arturosdg:mainfrom
CarmeloCampos:feat/bunx

Conversation

@CarmeloCampos

Copy link
Copy Markdown

Why

opencode-worktree currently relies on postinstall to download its platform binary. Package runners such as bunx can skip lifecycle scripts, so bunx opencode-worktree installs the package but fails because the executable is missing.

Changes

  • Download the platform binary from the launcher when it is absent.
  • Share binary resolution and download logic between the launcher and postinstall.
  • Preserve postinstall as an optimization for regular global installs.
  • Document bunx opencode-worktree.

Benefits

  • Run without a global installation: bunx opencode-worktree.
  • Works when lifecycle scripts are skipped by package runners, including npx and pnpx.
  • Keeps existing npm i -g opencode-worktree behavior unchanged.
  • Avoids duplicated platform/download logic.

Verification

  • Node syntax checks pass for the launcher, runtime module, and postinstall script.
  • npm pack --dry-run confirms the runtime module is included in the published package.
  • git diff --check passes.

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