Fix Bun onboarding: pi-v build, prereq checks, and auth UX#9
Open
shaunymca wants to merge 3 commits intohdresearch:mainfrom
Open
Fix Bun onboarding: pi-v build, prereq checks, and auth UX#9shaunymca wants to merge 3 commits intohdresearch:mainfrom
shaunymca wants to merge 3 commits intohdresearch:mainfrom
Conversation
- pi-vers.js: use bun install && bun run build instead of npm run build when building @hdresearch/pi-v; npm is not available in Bun-only environments and typescript is a devDependency that must be installed first - package.json: add postinstall script to install @hdresearch/pi-v's devDependencies after bun install from the root (uses --cwd to stay cross-platform) - cli.js: add checkPrerequisites() to detect missing ssh/openssl before any command runs, with platform-aware install instructions - cli.js: show "check your inbox" hint when --email is passed and no cached key exists, so users know to expect the magic link Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- cli.js: add git, tar, ssh-keygen to checkPrerequisites — all three are required and were silently missing from the check - cli.js: improve Windows help text to explain that openssl requires Git\mingw64\bin in PATH, not just Git\cmd (the installer default) - cli.js: on Windows, detect if System32 ssh.exe takes PATH precedence and warn the user — the Vers ProxyCommand requires Git for Windows ssh - orchestrate.js: use os.tmpdir() instead of process.cwd() for staging temp directories — avoids polluting the project dir and works correctly on all drives and environments Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Patches dist files in @hdresearch/pi-v as a stopgap until upstream
PR #70 (hdresearch/pi-vers) is merged:
- Remove 2>/dev/null from ProxyCommand (breaks Windows native ssh.exe)
- Platform-aware UserKnownHostsFile (NUL on Windows, /dev/null elsewhere)
- icacls call after key file write to set correct Windows ACLs
- Replace require("fs") with ESM readFileSync import
The patch script runs automatically via postinstall after bun install,
and warns if expected strings are not found (e.g. already patched).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
pi-vers.js: replacenpm run buildwithbun install && bun run buildwhen building@hdresearch/pi-vfrom source —npmis unavailable in Bun-only environments, andtypescriptis a devDependency that must be installed before the buildpackage.json: addpostinstallscript (bun install --cwd) so@hdresearch/pi-v's devDependencies are installed automatically afterbun installfrom the rootcli.js: addcheckPrerequisites()to detect missingssh/opensslbefore any command runs, with platform-aware install instructionscli.js: show a "check your inbox" hint when--emailis passed and no cached key exists, so users know to expect the magic linkContext
Discovered while following the README quickstart on a Bun-only Windows environment. None of these are Windows-specific — the
npmand devDependency issues affect any Bun-only setup, and the auth UX gaps affect all platforms.Test plan
bun installfrom root installs@hdresearch/pi-vdevDependencies without manualcdbun src/cli.js provision ...no longer fails withENOENT: npmsshoropensslproduces a clear error with install instructions--emailflag prints inbox hint only when shell-auth will actually run🤖 Generated with Claude Code