Repository navigation
Let the standalone installers start stacktape init [skip ci] - #318
Merged
Merged
Conversation
Arguments after the installer's own now run the installed CLI by its full path: curl -fsSL https://installs.stacktape.com/macos.sh | sh -s -- init, or iex "& { $(irm https://installs.stacktape.com/windows.ps1) } init" on Windows. With curl | sh the CLI reads from the terminal instead of the piped script, and gets empty input when there is no terminal. Run as a file, windows.ps1 exits with the CLI's code; under iex it never exits, so the user's window stays open. Without arguments nothing changes. The docs homepage shows the new commands. Released binaries never found the init wizard beside them: argv[1] is a virtual /$bunfs path in a compiled binary, so the wizard served nothing. The lookup now uses execPath. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
matuscongrady
force-pushed
the
feat/installer-run-init
branch
from
October 24, 2026 00:12
eef421d to
c9f7f2f
Compare
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.
The standalone installers can now start
stacktape initright after installing, so a machine without Node.js needs one command:curl -fsSL https://installs.stacktape.com/macos-arm.sh | sh -s -- initiex "& { $(irm https://installs.stacktape.com/windows.ps1) } init"Anything after the installer's own arguments is passed to the installed CLI, run by its full path because the new PATH entry only applies to new shells. With
curl | sh, the CLI's input comes from the terminal (/dev/tty), because stdin is the rest of the piped script. Without a terminal (CI, Docker builds, a coding agent's shell), the CLI gets empty input instead of failing, sosh -s -- init --headlessworks there too. The shell installersexecthe CLI, so its exit code is the installer's. Run as a file (powershell -File windows.ps1 init), the Windows installer exits with the CLI's code; underiexit never callsexit, which would close the user's PowerShell window. Without extra arguments nothing changes. The docs homepage's standalone-install tabs now use these commands.Testing the real flow found a separate bug: released binaries never found the init wizard beside them, so
stacktape initsaid "The wizard interface has not been built" and served a blank page. This affects4.0.0-preview.10.findWizardBundlelooked next toprocess.argv[1], which is a virtual/$bunfs/...path in a Bun-compiled binary. It now usesprocess.execPath.How it was checked:
installers.spec.tspipes each shell installer intosh -s -- init --projectDirectory "my app"with no terminal (setsid) and inside a pseudo-terminal (script). It checks the exact arguments, the CLI's stdin and the exit code.windows.spec.tsruns both Windows installers under pwsh as a file and through theiexform. The new cases fail against main's installers.linux.shin a pseudo-terminal.initstarted; headless Chromium rendered the wizard; Ctrl+C ended it.init --headlesswrotestacktape.yml.windows.zipwithwindows.ps1run as a file in Windows PowerShell 5.1 and pwsh 7, using temporary home folders.init --headless --projectDirectory "C:\…\my app"wrotestacktape.yml, and the installedstacktape.exeserved the wizard page. I did not run theirm | iexdownload form on Windows: Windows Defender flags apowershell.execommand line that downloads and runs a script asTrojan:Win32/Commando.A!ml. That form was checked with pwsh on Linux instead.pnpm check:publicpasses except two failures thatorigin/mainhas too:scripts/perf/packaging-harness.spec.ts("measures a shape and reports which artifacts each edit changes") and the test registry, which finds no owner forapps/cli/src/domain/packaging-manager/dependency-installer.spec.tsfrom Reuse the runner's dependency install on Git push deploys [skip ci] #316. Also shellcheck (no new findings), and independent reviews by Fable 5.1 and GPT-6.1 Sol. Sol found that the file-run Windows installer hid the CLI's exit code, which is now fixed.Nothing is published. The release workflow's
publish-installersjob uploads the installers toinstalls.stacktape.comon the next stable release. Until then the live 3.7.1 installers ignoreinitand only install. Console PR stacktape/console-app#142 records that the docs should be published after that release.Two unverified notes from review. In Windows PowerShell 5.1 with
$ErrorActionPreference = 'Stop', a CI step that redirects stderr could show an error after the CLI has finished. A coding-agent shell on macOS or Windows that runsinitwithout--headlesswaits for the browser wizard, as plainstacktape initdoes there.