stack/packages/stack-cli
Bilal Godil dadaa8ddaf feat(cli): auto-update RDE dashboard via npx re-exec on stack dev
Re-running `stack dev` / `hexclave dev` now picks up the latest published
dashboard without reinstalling the CLI. Before doing any work, the `dev`
command checks npm for a newer `@hexclave/cli` and, if found, re-execs
`npx <pkg>@<latest> stack dev ...` so the running code (and the dashboard
bundled in that tarball) is the latest. The user's installed dependency is
left untouched.

Because `stack dev` keeps a detached background dashboard alive across runs
and reuses it by default, the now-latest process also compares the running
dashboard's version against its own and restarts the stale one so the new
dashboard actually binds the port.

- self-update.ts: maybeReexecToLatest(), resolveLatestVersion() (TTL-cached
  registry lookup, short timeout, offline-safe), isVersionNewer(),
  buildNpxInvocation(). Loop guard via STACK_CLI_SKIP_AUTO_UPDATE; opt-outs
  via STACK_CLI_NO_AUTO_UPDATE, --no-auto-update, and auto-skip in CI.
- dev.ts: re-exec at the top of the dev action; killLocalDashboard() +
  version handshake in startDashboardIfNeeded; stamp CLI version when
  recording the dashboard process; --no-auto-update flag.
- dev-env-state.ts: localDashboard.version + cliUpdateCheck cache helpers.
- Tests for self-update and the new dev-env-state fields.
2026-05-29 10:47:44 -07:00
..
scripts Merge branch 'cl/romantic-mendel-5a2c25' into cl/hexclave-pr3 2026-05-26 10:15:27 -07:00
src feat(cli): auto-update RDE dashboard via npx re-exec on stack dev 2026-05-29 10:47:44 -07:00
.eslintrc.cjs Stack CLI (#1227) 2026-03-09 13:24:15 -07:00
package.json chore(hexclave): point repository URLs at hexclave/hexclave ahead of repo rename 2026-05-28 18:54:26 -07:00
tsconfig.json Stack CLI (#1227) 2026-03-09 13:24:15 -07:00
tsdown.config.ts stack-cli: cloud/local init flow, auto-create on empty projects, post-setup next-steps (#1383) 2026-05-08 10:47:49 -07:00
vitest.config.ts Fast-start local emulator via RAM snapshot + live secret rotation (#1340) 2026-04-20 14:24:49 -07:00