Skip to content

One-line install: curl | sh bootstrap with optional GUI prompt, plus skill-triggered install #2146

Closed

Description

@malibio

Problem

NodeSpace has no front door. Every current path to a working install assumes the user already arrived somewhere specific:

  • brew install --cask nodespace assumes Homebrew and that the user already knows the tap exists (and today serves a stale v0.1.6 — Homebrew tap is two months stale (v0.1.6 vs v0.2.0): cask is hand-maintained instead of generated on release #2114).
  • The DMG assumes the user wants the GUI.
  • The skill assumes NodeSpace is already installed — SKILL.md's failure-recovery table detects command not found: nodespace and then dead-ends with "Tell the user... Do not proceed."
  • There is no Homebrew route to a headless CLI at all. nodespace-cli has no formula; the only CLI-only path is cargo install nodespace-cli, which needs a Rust toolchain.

The realistic discovery path is an agent user finding the NodeSpace skill, not someone downloading a DMG first. That path currently terminates in a dead end.

What this issue covers

One install decision tree, one implementation, three entry points. The tree is the same in all cases:

detect what's installed → ask whether the GUI is wanted → run the matching install → verify

Entry points, all calling the same script:

Surface Command Interactive?
Copy-paste one-liner curl -fsSL https://nodespace.ai/install.sh | sh Yes — prompts for GUI
Skill-triggered same script, --no-gui No
Homebrew (existing) brew install --cask nodespace n/a

Implementing the tree once is the point. Three surfaces with three copies of this logic will drift, and the seam between them (the non-interactive flags) is exactly where the drift would hide.

Design decisions

1. Prompting must read from /dev/tty, not stdin

With curl … | sh, stdin is the pipe. A plain read gets EOF and either hangs or silently takes a default. The prompt must read /dev/tty explicitly, and when there is no tty (CI, an agent's non-interactive Bash) it must skip the prompt and take a documented default rather than blocking.

This also means non-interactive escape hatches are required, not optional — --gui / --no-gui flags (and/or an env var). Without them the script is unusable from the skill path, which is one of its three consumers.

2. Wrap Homebrew, fall back to direct download

Wraps brew Direct download
Requires Homebrew Yes — hard fail without it No
Upgrade / uninstall brew upgrade, clean removal We build and own it
Effort Small — a shell wrapper Larger: versioning, PATH, uninstaller

Use brew when present, fall back to direct download when absent. Real upgrade/uninstall semantics for the common case without excluding anyone.

Consequence: #2114 becomes a hard blocker. A stale tap stops being cleanup and becomes a defect on the primary install path.

3. /install.sh is a static file in nodespace-website

nodespace.ai is a Cloudflare Pages site deployed from the NodeSpaceAI/nodespace-website repo (wrangler.toml: pages_build_output_dir = "."), serving the repo root with no build step. Deploy is bun run deploy → wrangler pages deploy ..

So the script is a static file committed to nodespace-website — no Worker needed. That is materially simpler than routing around a Worker.

But the catch-all must be fixed first. Every path on nodespace.ai currently returns the marketing HTML — verified: /install.sh, /install, and /zzz-does-not-exist-9f3 all return 200 with content-type: text/html. So today curl -fsSL https://nodespace.ai/install.sh | sh would pipe HTML into the user's shell. The failure mode is not a clean 404; it is garbage executed.

Source of the catch-all: render.yaml carries an SPA rewrite —

routes:
  - type: rewrite
    source: /*
    destination: /index.html

Note this is a Render Blueprint, while the site actually deploys to Cloudflare Pages. Either render.yaml is stale config from a previous host and the catch-all comes from Pages' own SPA fallback, or the site is served from Render. Worth resolving while in there — two deploy configs for one site is its own hazard, and it should be one or the other. (The repo has no _redirects and no 404.html, so on Pages the fallback is default behavior rather than explicit.)

Whichever it is, the rewrite must not swallow /install.sh.

Also needed in _headers:

/install.sh
  Content-Type: text/x-shellscript

Pages would otherwise serve .sh as application/octet-stream or similar. Alias /install to the same content — people will type it.

Guard required: a check that /install.sh returns a shell content-type and a body starting with a shebang — not HTML. This is the one criterion that must not ship unverified.

4. A nodespace-cli formula must be created

Distinct from the existing cask. This is the actual new packaging work; the prompting logic is the easy half.

5. Shell is the correct language here — documented exception

CLAUDE.md requires tooling in scripts/ to be TypeScript, allowing .sh only "where shell is genuinely required — e.g. an uninstaller that must run without Bun present." A bootstrap installer that must run on a machine with no Bun, no Rust, and no NodeSpace is squarely inside that exception. Noted here so it is not flagged in review.

6. Never install without confirmation

The skill must propose and let the user confirm — never silently run brew install because a binary search failed. Some agents auto-approve Bash tool calls; an unprompted install is a bad surprise.

Detection

command -v nodespace, plus ~/.nodespace/bin/ and /Applications/NodeSpace.app, distinguishes four states: nothing / CLI-only / GUI-only / both. Note the GUI ships its own daemon at ~/.nodespace/bin/nodespaced, so "GUI installed" and "CLI on PATH" are independent facts, not a hierarchy.

Interaction with the existing app-launch installer

Today the dependency runs GUI → skill: packages/desktop-app/src-tauri/src/skill_setup.rs shells out to npx @nodespaceai/skill install on first launch and records skill_installed in ~/.nodespace/setup.json.

This issue adds the inverse direction (skill → CLI/GUI). Both will exist, and they must not fight — the app's first-launch installer must not clobber a skill the user installed manually, and vice versa. Reconciling the two is in scope.

Acceptance criteria

  • curl -fsSL https://nodespace.ai/install.sh | sh installs a working nodespace CLI on a clean machine
  • /install.sh serves an actual shell script — verified content-type and shebang, not the marketing-page catch-all
  • SPA catch-all rewrite no longer swallows /install.sh; _headers sets a shell Content-Type
  • /install aliases to the same content
  • nodespace-website's duplicate deploy config (render.yaml vs wrangler.toml) resolved to one host
  • GUI prompt reads from /dev/tty; works correctly under curl | sh
  • No tty → no hang; documented default is taken
  • --gui / --no-gui (or env equivalent) supported for non-interactive callers
  • Uses Homebrew when present; falls back to direct download when absent
  • nodespace-cli formula exists in the tap and installs a headless CLI
  • SKILL.md's command not found: nodespace row offers a guided install instead of dead-ending
  • Skill path invokes the same script (non-interactively) — not a second implementation
  • Skill never installs without explicit user confirmation
  • Script is published as part of the release process, pinned to a release — not hand-copied
  • App-launch skill installer and skill-triggered CLI install coexist without clobbering each other
  • Verified end to end on both architectures

Dependencies

Both are independently-filed live bugs and stay separate; they are dependencies, not scope.

Cross-repo: the script and _headers/routing changes land in NodeSpaceAI/nodespace-website; the nodespace-cli formula lands in NodeSpaceAI/homebrew-nodespace; SKILL.md and release wiring land here.

Activity

  1. mstomar125 commented on Aug 19, 2026

    @mstomar125
    Contributor

    Status: nodespace-core slice merged; website + homebrew-nodespace slices await human merge

    Merged: nodespace-core#2160 — SKILL.md's failure-recovery row now proposes a confirmation-gated install.sh --no-gui install instead of dead-ending; the three "CLI not on PATH" surfaces (SKILL.md, packages/skill's installer warning, the GUI's cli_warning()) now agree; skill_setup.rs documents the coexistence contract with install.sh; and scripts/publish-install-script.ts + a new sync-install-script release job pin install.sh's CLI version to a confirmed-built release (needs a WEBSITE_DEPLOY_TOKEN secret provisioned before it can actually push).

    Blocked on a human with write access (this account only has push access to nodespace-core):

    • nodespace-website: issue #1 — the full install.sh/_headers/_redirects/catch-all-fix changeset as a patch, since this repo has forking disabled org-wide (private repo, allow_forking: false) and this account is pull-only, so no PR could be opened directly. Needs a maintainer to git am the attached patch (or apply by hand) and deploy.
    • homebrew-nodespace PR #2 — the new nodespace-cli formula, opened from a fork (this account is pull-only here too, but forking is allowed). Needs a maintainer to merge.

    Follow-ups filed (added to the board, Status=Todo):

    See the full acceptance-criteria checklist and verification details in the linked PRs/issue.

  2. mstomar125 commented on Aug 19, 2026

    @mstomar125
    Contributor

    Final update: all three repo-side changesets merged

    • nodespace-core: PR#2160 — merged 6bffdc34.
    • homebrew-nodespace: PR#1 (cask v0.2.0 bump) — merged 2713cf41. PR#2 (new nodespace-cli formula) — merged 8b3a935b. Both needed a human with write access to this repo; access was granted and both merged.
    • nodespace-website: filed as issue #1 (this repo had forking disabled, so the changeset was delivered as an attached patch). Access was subsequently granted; applied via git am and merged as PR#2 — merged b94eff99, closing issue Set up Tauri + Svelte project structure #1.

    One thing still outstanding, not code: the nodespace-website merge lands the fix in git, but this project's Cloudflare Pages deploy is not git-triggered (no CI, no GitHub Deployments activity on this repo) — it's a manual wrangler pages deploy step per the repo's own README, and no Cloudflare credentials are available in this environment to run it. https://nodespace.ai/install.sh is still serving the old marketing-page HTML as of this comment. Someone with Cloudflare access needs to either run the deploy manually or wire up Cloudflare's git integration for this repo.

    Also still outstanding, unrelated to this issue's own scope: HOMEBREW_TAP_TOKEN needs to be added as a nodespace-core repo secret (PAT w/ contents:write on homebrew-nodespace) before the sync-homebrew-cask release job can push automatically on future releases.

    Closing this issue — the acceptance criteria that were achievable are done; the two remaining items (Cloudflare deploy, tap-sync token) are ops/credential tasks for a human, not further engineering work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions