@ashlr/stack 0.1.1 → 0.3.0
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.
- package/LICENSE +1 -1
- package/README.md +64 -28
- package/dist/index.js +19918 -0
- package/package.json +7 -6
- package/src/__tests__/apply.test.ts +0 -80
- package/src/__tests__/recommend.test.ts +0 -109
- package/src/commands/add.ts +0 -163
- package/src/commands/apply.ts +0 -244
- package/src/commands/ci.ts +0 -110
- package/src/commands/clone.ts +0 -113
- package/src/commands/completion.ts +0 -187
- package/src/commands/deps.ts +0 -79
- package/src/commands/doctor.ts +0 -192
- package/src/commands/env.ts +0 -87
- package/src/commands/exec.ts +0 -54
- package/src/commands/import.ts +0 -120
- package/src/commands/info.ts +0 -85
- package/src/commands/init.ts +0 -93
- package/src/commands/list.ts +0 -27
- package/src/commands/login.ts +0 -28
- package/src/commands/open.ts +0 -32
- package/src/commands/projects.ts +0 -92
- package/src/commands/providers.ts +0 -38
- package/src/commands/recommend.ts +0 -302
- package/src/commands/remove.ts +0 -124
- package/src/commands/scan.ts +0 -123
- package/src/commands/status.ts +0 -39
- package/src/commands/sync.ts +0 -37
- package/src/commands/templates.ts +0 -130
- package/src/commands/upgrade.ts +0 -66
- package/src/index.ts +0 -91
- package/src/ui.ts +0 -39
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @ashlr/stack
|
|
2
2
|
|
|
3
|
-
> The `stack` CLI —
|
|
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.
|
|
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
|
|
|
@@ -9,12 +9,12 @@ Part of [Ashlr Stack](https://stack.ashlr.ai). See the monorepo at [ashlrai/ashl
|
|
|
9
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:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
stack init --template nextjs-supabase-posthog
|
|
12
|
+
stack init --template nextjs-supabase-posthog
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Run from your application's directory. Stack writes configuration, uses provider-specific authentication, provisions where supported, and stores selected credentials through [Phantom Secrets](https://phm.dev/secrets). Vercel prompts for an existing personal access token. Setup does not generate application code or automatically write `.env`; `stack env export --example` separately writes an empty `KEY=` skeleton to `.env.example`.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Stack handles credentials in memory during setup. `.stack.toml` stores the service shape; per-developer IDs belong in the gitignored `.stack.local.toml`. Review project configuration and MCP output before sharing them; the CLI is not a general redaction boundary.
|
|
18
18
|
|
|
19
19
|
## Install
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ One-liner (recommended):
|
|
|
25
25
|
curl -fsSL stack.ashlr.ai/install.sh | bash
|
|
26
26
|
|
|
27
27
|
# Windows (PowerShell)
|
|
28
|
-
irm stack.ashlr.ai/install.ps1 | iex
|
|
28
|
+
irm https://stack.ashlr.ai/install.ps1 | iex
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Or install manually from the registry:
|
|
@@ -38,19 +38,21 @@ npm i -g @ashlr/stack ashlr-stack-mcp
|
|
|
38
38
|
|
|
39
39
|
Prerequisites:
|
|
40
40
|
|
|
41
|
-
- [Bun](https://bun.sh) >= 1.2
|
|
42
|
-
- [Phantom Secrets](https://
|
|
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
|
|
42
|
+
- [Phantom Secrets](https://phm.dev/secrets) — installed and initialized for the intended project before writing setup flows
|
|
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.
|
|
43
45
|
|
|
44
46
|
## Quickstart
|
|
45
47
|
|
|
46
48
|
```bash
|
|
47
49
|
stack init # interactive template picker
|
|
48
|
-
stack add supabase #
|
|
50
|
+
stack add supabase # provider authentication → setup → vault/config/MCP
|
|
49
51
|
stack add # no arg = interactive provider picker
|
|
50
|
-
stack doctor #
|
|
52
|
+
stack doctor # inspect the configured-service health report
|
|
51
53
|
stack doctor --all # run across every registered project
|
|
52
54
|
stack list # show this project's stack at a glance
|
|
53
|
-
stack providers #
|
|
55
|
+
stack providers # catalog registered in your installed release
|
|
54
56
|
```
|
|
55
57
|
|
|
56
58
|
Bring Stack to an existing repo:
|
|
@@ -59,7 +61,7 @@ Bring Stack to an existing repo:
|
|
|
59
61
|
stack scan # detect providers already in the code
|
|
60
62
|
stack scan --auto # scans, then runs `stack add` for each
|
|
61
63
|
stack import # inhale an existing .env into Phantom
|
|
62
|
-
stack clone github.com/org/repo # clone + scan someone else's project
|
|
64
|
+
stack clone https://github.com/your-org/your-repo # clone + scan someone else's project
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
Run your app with secrets injected by Phantom:
|
|
@@ -70,35 +72,39 @@ stack exec -- bun dev
|
|
|
70
72
|
|
|
71
73
|
## Commands
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
A cheat sheet for the current source interface:
|
|
74
76
|
|
|
75
77
|
| Command | What it does |
|
|
76
78
|
| --- | --- |
|
|
77
|
-
| `stack init [--template]` |
|
|
79
|
+
| `stack init [--template]` | Write Stack configuration in the current directory; optionally provision preset services |
|
|
78
80
|
| `stack add [service]` | Add a provider (OAuth + provision + write secrets) |
|
|
79
|
-
| `stack remove <service>` |
|
|
80
|
-
| `stack list` | Show services wired into this project |
|
|
81
|
+
| `stack remove <service>` | Remove local vault entries, MCP wiring and configuration (or use `--all`); this CLI does not deprovision upstream resources |
|
|
82
|
+
| `stack list [--json]` | Show services wired into this project; `--json` prints `ashlr.stack.list/v1` |
|
|
81
83
|
| `stack info <service>` | Deep-dive on one service (resource, region, docs, MCP name) |
|
|
82
|
-
| `stack
|
|
84
|
+
| `stack status [--json]` | Phantom, services and config at a glance; `--json` prints a stable report (schema `ashlr.stack.status/v1`, secret names only) |
|
|
85
|
+
| `stack doctor [--all] [--fix] [--json]` | Inspect health reports; `--fix` attempts supported repair, `--json` formats the report. Without `--all`, a directory with no `.stack.toml` is an error, not a healthy report |
|
|
83
86
|
| `stack scan [--auto]` | Detect providers from package manifests, configs, `.env.example` |
|
|
84
87
|
| `stack import [--from <file>]` | Migrate an existing `.env` into Phantom + `.stack.toml` |
|
|
85
|
-
| `stack clone <
|
|
86
|
-
| `stack providers` | Browse
|
|
87
|
-
| `stack templates` | List starter templates |
|
|
88
|
-
| `stack deps` | ASCII tree of this stack grouped by category |
|
|
88
|
+
| `stack clone <git-url> [dir]` | git-clone + scan + next-steps |
|
|
89
|
+
| `stack providers [--json]` | Browse your installed provider catalog; `--json` prints `ashlr.stack.providers/v1` |
|
|
90
|
+
| `stack templates list [--json]` | List starter provider presets; `--json` prints `ashlr.stack.templates/v1` with each template's services |
|
|
91
|
+
| `stack deps [--json]` | ASCII tree of this stack grouped by category; `--json` prints `ashlr.stack.deps/v1` |
|
|
89
92
|
| `stack env show` / `stack env diff` | Effective env-var surface vs vault vs config |
|
|
90
|
-
| `stack env
|
|
91
|
-
| `stack exec -- <cmd>` |
|
|
92
|
-
| `stack projects list|register|remove|where` | Cross-project registry |
|
|
93
|
-
| `stack ci init` |
|
|
93
|
+
| `stack env export --example` | Write a separate `.env.example` with empty values; `--stdout` previews it |
|
|
94
|
+
| `stack exec -- <cmd>` | Forward to the installed `phantom exec` runtime |
|
|
95
|
+
| `stack projects list|register|remove|where` | Cross-project registry; `projects list --json` prints `ashlr.stack.projects/v1` |
|
|
96
|
+
| `stack ci init` | Inspect unavailable CI health workflow generation; exits nonzero without writing a workflow |
|
|
94
97
|
| `stack completion <bash\|zsh\|fish>` | Emit a shell-completion script |
|
|
95
|
-
| `stack upgrade` | Check npm for a newer
|
|
98
|
+
| `stack upgrade` | Check npm for a newer release; `--apply` upgrades an npm global CLI with rollback |
|
|
99
|
+
| `stack login <provider>` | Refresh credentials for that provider; existing stored credentials are separate from setup staging |
|
|
100
|
+
| `stack sync --platform <name>` | Push through Phantom to a configured Vercel, Railway or Fly target |
|
|
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 |
|
|
96
102
|
|
|
97
103
|
Full reference with flags, subcommands, and examples: **[stack.ashlr.ai/docs/cli](https://stack.ashlr.ai/docs/cli)**.
|
|
98
104
|
|
|
99
105
|
## MCP integration
|
|
100
106
|
|
|
101
|
-
`stack add` writes to
|
|
107
|
+
Where supported, `stack add` writes a provider entry to the project's `.mcp.json`; client and provider setup still require verification. See [ashlr-stack-mcp](https://www.npmjs.com/package/ashlr-stack-mcp) for Stack's own server (19 declared tools and up to 3 project resources). Tools are a subset of CLI commands; use the advertised input schemas. Results contain CLI text and `isError`, not a universal structured JSON receipt or sandbox guarantee.
|
|
102
108
|
|
|
103
109
|
## Configuration
|
|
104
110
|
|
|
@@ -107,7 +113,7 @@ Stack splits config into two files:
|
|
|
107
113
|
- `.stack.toml` — **committed**. Service names, secret slots, MCP wirings.
|
|
108
114
|
- `.stack.local.toml` — **gitignored**. `project_id`, `resource_id`, timestamps. Unique per clone.
|
|
109
115
|
|
|
110
|
-
Teammates
|
|
116
|
+
Teammates can inspect `stack doctor` and use `stack doctor --fix` for supported remediation. Existing vault names can skip repair; name presence is not credential validity or provider acceptance.
|
|
111
117
|
|
|
112
118
|
Full schema: [stack.ashlr.ai/docs/config](https://stack.ashlr.ai/docs/config).
|
|
113
119
|
|
|
@@ -121,4 +127,34 @@ Full schema: [stack.ashlr.ai/docs/config](https://stack.ashlr.ai/docs/config).
|
|
|
121
127
|
|
|
122
128
|
## License
|
|
123
129
|
|
|
124
|
-
MIT. See [LICENSE](
|
|
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.
|