Original Summary

Hey HN,<p>This is a CLI tool I initially built as a convenient and reliable way to install executable(s) from a local monorepo workspace into Bun&#x27;s global package store.<p>I had a local monorepo with workspace dependencies that needed to be installed as a whole. The commands aren&#x27;t bundled, and I didn&#x27;t want to manually manage dependencies. (If you want to try it out, <a href="https:&#x2F;&#x2F;github.com&#x2F;open-pencil&#x2F;open-pencil" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;open-pencil&#x2F;open-pencil</a> is what I was contributing to)<p>I tried bun link initially. But linking directly meant I had to keep a separate local checkout just so branch switches wouldn&#x27;t break my installed tools. bun-install solves this by packaging the dependencies and installing a snapshot to Bun&#x27;s global store instead.<p>I later added the --bun (and --package) options, which mirror the bunx option which supports using bun over node, after I ran into some annoying JS-execution-environment-related issues. I&#x27;ve found the recurring theme with JS-managed commands is they tend to be fragile when installed globally on machines used for development purposes, susceptible to both runtime and update time incompatibilities and breakages. I concluded this was something of a confluence of factors: A vast ecosystem, numerous runtime environments, and indirection between what&#x27;s installed (the module) and what&#x27;s executed (the contents of the bin directory end users add to their PATH). This project doesn&#x27;t magically fix all of those, but, for me personally, it has completely resolved what was a long-standing pain point.<p>Highlights: - Topological resolution: builds and packs sibling dependencies in order. - Command filtering: bun-install -p my-cli tool-a. Strips unselected commands from the manifest so they don&#x27;t clobber existing global symlinks. - Shebang rewriting: forces Node shebangs to #!&#x2F;usr&#x2F;bin&#x2F;env bun (and injects them if missing). Installed commands actually run under Bun. - Safe binary scanning: does an 8 KiB null-byte scan so it doesn&#x27;t mangle non-node scripts or native executables. - Workspace support: install the local state, great for dev, works with internal dependencies that aren&#x27;t published. - Cleans up temporary tarballs and drains TTY input on interactive prompts to prevent stdin bleed.<p>(pre-v1, so the API might change, but the core implementation is stable).<p>Try it out: bun add -g bun-install<p>NPM: <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;bun-install" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;bun-install</a> GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;joeycumines&#x2F;bun-install" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;joeycumines&#x2F;bun-install</a><p>I&#x27;ll be around to answer any questions. Might not respond immediately though :)


  • 情报分类:商业与市场研究
  • 分类依据:内容涉及商业、投资或市场动态
  • 信息来源:Hacker News 新项目
  • 发布时间:2026/10/2 07:57:50