@ashlr/stack 0.2.2 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +38 -8
  2. package/dist/index.js +12385 -9104
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @ashlr/stack
2
2
 
3
- > The `stack` CLI — configure supported services with Phantom-backed credentials and MCP wiring. This source checkout registers 39 providers; use `stack providers` for your installed catalog.
3
+ > The `stack` CLI — configure supported services with Phantom-backed credentials and MCP wiring. Use `stack providers` to inspect your installed catalog.
4
4
 
5
5
  Part of [Ashlr Stack](https://stack.ashlr.ai). See the monorepo at [ashlrai/ashlr-stack](https://github.com/ashlrai/ashlr-stack).
6
6
 
7
7
  ## What it is
8
8
 
9
- `stack` collapses the "spin up ten services" phase of a project into a single command. Instead of tab-hopping between Supabase, Vercel, Sentry, Neon, etc. to create projects and paste secrets into `.env`, you run:
9
+ `stack` offers template-assisted setup for selected supported services. For example:
10
10
 
11
11
  ```bash
12
12
  stack init --template nextjs-supabase-posthog
@@ -31,17 +31,17 @@ irm https://stack.ashlr.ai/install.ps1 | iex
31
31
  Or install manually from the registry:
32
32
 
33
33
  ```bash
34
- bun add -g @ashlr/stack ashlr-stack-mcp # preferred
35
- # or
36
34
  npm i -g @ashlr/stack ashlr-stack-mcp
35
+ # or use Bun as the package manager
36
+ bun add -g @ashlr/stack ashlr-stack-mcp
37
37
  ```
38
38
 
39
39
  Prerequisites:
40
40
 
41
- - [Bun](https://bun.sh) >= 1.2 for the published 0.1.1 CLI/MCP packages, including when launched with `npx`; npm does not supply Bun
41
+ - Node.js >= 20 for this npm package, including with `npx`; check your installed package manifest. Source development uses [Bun](https://bun.sh).
42
42
  - [Phantom Secrets](https://phm.dev/secrets) — installed and initialized for the intended project before writing setup flows
43
43
 
44
- This README describes source version 0.2.1. Registry metadata checked on October 14, 2026 reported CLI/MCP version 0.1.1. Verify your installed `stack --version` and command `--help`; source qualification is separate from publication and provider acceptance.
44
+ Verify your installed `stack --version` and command `--help`; available commands depend on the installed version. Package installation does not establish provider acceptance.
45
45
 
46
46
  ## Quickstart
47
47
 
@@ -72,7 +72,7 @@ stack exec -- bun dev
72
72
 
73
73
  ## Commands
74
74
 
75
- A cheat sheet for the current source interface:
75
+ A guide to common commands; check your installed version's help for availability:
76
76
 
77
77
  | Command | What it does |
78
78
  | --- | --- |
@@ -95,7 +95,7 @@ A cheat sheet for the current source interface:
95
95
  | `stack projects list|register|remove|where` | Cross-project registry; `projects list --json` prints `ashlr.stack.projects/v1` |
96
96
  | `stack ci init` | Inspect unavailable CI health workflow generation; exits nonzero without writing a workflow |
97
97
  | `stack completion <bash\|zsh\|fish>` | Emit a shell-completion script |
98
- | `stack upgrade` | Check npm for a newer `@ashlr/stack` release |
98
+ | `stack upgrade` | Check npm for a newer release; `--apply` upgrades an npm global CLI with rollback |
99
99
  | `stack login <provider>` | Refresh credentials for that provider; existing stored credentials are separate from setup staging |
100
100
  | `stack sync --platform <name>` | Push through Phantom to a configured Vercel, Railway or Fly target |
101
101
  | `stack onboard [--apply] [--undo]` | Detect Codex, Claude Code, Cursor and Gemini CLI and register the Phantom gateway (`ashlr-hub`) in each; plan only without `--apply`, existing config files backed up before writing; `--undo` restores them |
@@ -128,3 +128,33 @@ Full schema: [stack.ashlr.ai/docs/config](https://stack.ashlr.ai/docs/config).
128
128
  ## License
129
129
 
130
130
  MIT. See the repository [LICENSE](../../LICENSE).
131
+
132
+ ### Safe CLI upgrades
133
+
134
+ `stack upgrade` checks for a newer stable release without installing it. For an
135
+ existing npm global installation on macOS or Linux, run `stack upgrade --apply`.
136
+ Use `--apply --dry-run` to preview, or add `--json` for machine-readable output.
137
+ Bun, linked development installs, Windows, and other ecosystem components are
138
+ outside this first upgrade slice; use the manual installation hint for those.
139
+
140
+ The command checks the current package identity and CLI health, installs the exact
141
+ new version into a temporary prefix with lifecycle scripts disabled, and checks
142
+ its version and help output. It then replaces the package directory while keeping
143
+ the existing launcher. If either active health check fails, it restores the original
144
+ directory locally and verifies it, without downloading the previous version.
145
+ Failures exit nonzero, including a successfully rolled back upgrade. Successful
146
+ `--apply --json` reports have status `upgraded`; read-only reports retain the
147
+ existing `ashlr.stack.upgrade/v1` shape.
148
+
149
+ An exclusive lock prevents overlapping Stack upgrades. Do not run another package
150
+ manager against the same installation during an upgrade. Each npm operation has
151
+ a two-minute timeout and each CLI health check has a fifteen-second timeout.
152
+ These checks cover CLI startup, version, and command registration, not remote
153
+ service health. No provider resources or credentials are changed.
154
+
155
+ A process kill or power loss between directory renames requires manual recovery.
156
+ Recovery files live beside the installed package under `.stack-upgrade-*`, with
157
+ the original package in `previous`. Keep those files until the installation is
158
+ verified. If automatic recovery fails, the error identifies the retained directory.
159
+ Only remove a stale `.stack-upgrade-lock` after confirming no upgrade is running
160
+ and restoring/verifying the installation.