@hagicode/hagiscript 0.1.14-dev.89.1.f02e2ca → 0.1.15-dev.100.1.6114a75

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 (58) hide show
  1. package/README.md +248 -155
  2. package/dist/cli.js +4 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/manifest-commands.d.ts +2 -0
  5. package/dist/commands/manifest-commands.js +136 -0
  6. package/dist/commands/manifest-commands.js.map +1 -0
  7. package/dist/commands/npm-sync-commands.js +63 -6
  8. package/dist/commands/npm-sync-commands.js.map +1 -1
  9. package/dist/commands/server-commands.d.ts +2 -0
  10. package/dist/commands/server-commands.js +404 -0
  11. package/dist/commands/server-commands.js.map +1 -0
  12. package/dist/index.d.ts +7 -3
  13. package/dist/index.js +7 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/runtime/manifest-manager.d.ts +57 -0
  16. package/dist/runtime/manifest-manager.js +213 -0
  17. package/dist/runtime/manifest-manager.js.map +1 -0
  18. package/dist/runtime/npm-sync.d.ts +3 -1
  19. package/dist/runtime/npm-sync.js +31 -3
  20. package/dist/runtime/npm-sync.js.map +1 -1
  21. package/dist/runtime/pm2-manager.d.ts +5 -2
  22. package/dist/runtime/pm2-manager.js +181 -49
  23. package/dist/runtime/pm2-manager.js.map +1 -1
  24. package/dist/runtime/runtime-executor.d.ts +6 -0
  25. package/dist/runtime/runtime-executor.js +55 -0
  26. package/dist/runtime/runtime-executor.js.map +1 -1
  27. package/dist/runtime/runtime-manager.d.ts +9 -0
  28. package/dist/runtime/runtime-manager.js +146 -16
  29. package/dist/runtime/runtime-manager.js.map +1 -1
  30. package/dist/runtime/runtime-manifest.d.ts +5 -1
  31. package/dist/runtime/runtime-manifest.js +23 -8
  32. package/dist/runtime/runtime-manifest.js.map +1 -1
  33. package/dist/runtime/runtime-paths.d.ts +11 -1
  34. package/dist/runtime/runtime-paths.js +41 -5
  35. package/dist/runtime/runtime-paths.js.map +1 -1
  36. package/dist/runtime/server-config.d.ts +21 -0
  37. package/dist/runtime/server-config.js +169 -0
  38. package/dist/runtime/server-config.js.map +1 -0
  39. package/dist/runtime/server-manager.d.ts +107 -0
  40. package/dist/runtime/server-manager.js +928 -0
  41. package/dist/runtime/server-manager.js.map +1 -0
  42. package/dist/runtime/server-version-state.d.ts +43 -0
  43. package/dist/runtime/server-version-state.js +156 -0
  44. package/dist/runtime/server-version-state.js.map +1 -0
  45. package/dist/runtime/tool-sync-catalog.config.json +0 -18
  46. package/dist/runtime/tool-sync-catalog.js +1 -1
  47. package/dist/runtime/tool-sync-catalog.js.map +1 -1
  48. package/package.json +23 -2
  49. package/runtime/lib/runtime-script-lib.mjs +128 -69
  50. package/runtime/manifest.yaml +96 -81
  51. package/runtime/scripts/configure-code-server.mjs +14 -3
  52. package/runtime/scripts/configure-omniroute.mjs +15 -5
  53. package/runtime/scripts/install-code-server.mjs +20 -23
  54. package/runtime/scripts/install-omniroute.mjs +19 -22
  55. package/runtime/scripts/install-pm2.mjs +39 -0
  56. package/runtime/scripts/remove-pm2.mjs +25 -0
  57. package/runtime/templates/code-server-config.yaml +2 -2
  58. package/runtime/templates/omniroute-config.yaml +1 -1
package/README.md CHANGED
@@ -4,286 +4,379 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/%40hagicode%2Fhagiscript?logo=npm&color=2d8cf0)](https://www.npmjs.com/package/@hagicode/hagiscript)
5
5
  [![license](https://img.shields.io/badge/license-MIT-ffd43b)](./LICENSE)
6
6
 
7
- `@hagicode/hagiscript` is the runtime management CLI behind the `hagicode-runtime` contract. Use it to install, inspect, update, remove, and operate a managed HagiCode runtime without depending on system Node.js, system PM2, or host-global npm packages.
7
+ `@hagicode/hagiscript` is the CLI used to install and operate a managed HagiCode runtime. It manages the runtime layout, bundled services, managed npm tools, and the released backend server from a manifest-driven workflow.
8
8
 
9
- ## Install
9
+ ## Install The CLI
10
10
 
11
11
  ```bash
12
12
  npm install -g @hagicode/hagiscript
13
13
  ```
14
14
 
15
- Primary entrypoints:
15
+ Check the installed version:
16
16
 
17
- - `hagiscript`
18
- - `hagicode-runtime` (`hagiscript runtime ...` wrapper)
17
+ ```bash
18
+ hagiscript --version
19
+ ```
20
+
21
+ ## Quick Start
22
+
23
+ For a first-time setup, run these commands in order:
24
+
25
+ ```bash
26
+ npm install -g @hagicode/hagiscript
27
+ hagiscript runtime install
28
+ hagiscript server install
29
+ hagiscript server start
30
+ hagiscript server status
31
+ ```
32
+
33
+ If you also want the npm tools declared in your runtime manifest:
34
+
35
+ ```bash
36
+ hagiscript npm-sync --runtime-root ~/.hagicode/runtime
37
+ ```
19
38
 
20
- Node.js 20 or newer is required to run the package itself.
39
+ If you are working with a custom manifest or runtime root, use the same flow with explicit paths:
21
40
 
22
- ## Runtime Model
41
+ ```bash
42
+ hagiscript runtime install \
43
+ --from-manifest ./runtime/manifest.yaml \
44
+ --runtime-root ~/.hagicode/runtime
23
45
 
24
- By default, Hagiscript loads `runtime/manifest.yaml` and manages the runtime under `~/.hagicode/runtime`.
46
+ hagiscript server install \
47
+ --from-manifest ./runtime/manifest.yaml \
48
+ --runtime-root ~/.hagicode/runtime
25
49
 
26
- ```text
27
- <runtime-root>/
28
- program/
29
- bin/
30
- npm/
31
- components/
32
- runtime-data/
33
- config/
34
- logs/
35
- data/
36
- components/
37
- state.json
50
+ hagiscript server start \
51
+ --from-manifest ./runtime/manifest.yaml \
52
+ --runtime-root ~/.hagicode/runtime
38
53
  ```
39
54
 
40
- The split is intentional:
55
+ ## What Hagiscript Manages
56
+
57
+ The packaged runtime manifest defines these default components:
41
58
 
42
- - `program/` holds managed executables, vendored payloads, wrappers, and the managed npm prefix.
43
- - `runtime-data/` holds mutable config, logs, state, PM2 data, and component-specific writable files.
59
+ - `node`: managed Node.js runtime
60
+ - `dotnet`: managed .NET runtime
61
+ - `omniroute`: bundled PM2-managed service
62
+ - `code-server`: bundled PM2-managed service
63
+ - `server`: released backend service package
44
64
 
45
- The packaged manifest currently manages:
65
+ The managed runtime layout separates immutable program files from mutable data:
46
66
 
47
- - `node` - managed Node.js runtime
48
- - `dotnet` - managed .NET and ASP.NET Core runtime
49
- - `server` - released backend package metadata and PM2 launch assets for `lib/PCode.Web.dll`
50
- - `omniroute` - vendored bundled runtime
51
- - `code-server` - vendored bundled runtime
67
+ - `program/`: installed runtime payloads, wrappers, bundled executables
68
+ - `runtime-data/`: mutable config, logs, PM2 state, managed npm packages
69
+ - `server/`: installed released server versions
70
+ - `server-data/`: server config, logs, PM2 runtime files, version state
52
71
 
53
- The runtime layout still reserves `program/npm/` as the managed npm prefix, but package inventory inside that prefix is not part of the runtime component manifest. Tool installation there is handled separately through `hagiscript npm-sync` or external provisioning.
72
+ By default, the packaged manifest installs into `~/.hagicode/runtime`, but you can override that with `--runtime-root`.
54
73
 
55
- ## Core Runtime Commands
74
+ ## Runtime Basics
56
75
 
57
- Install the full runtime:
76
+ Create a standalone editable manifest from Hagiscript's packaged default:
58
77
 
59
78
  ```bash
60
- hagiscript runtime install
79
+ hagiscript manifest init ./hagiscript.manifest.yaml
61
80
  ```
62
81
 
63
- Runtime installs reuse a shared download cache by default. Disable it with `--no-download-cache`, or relocate it with `--download-cache-dir <path>`.
82
+ Generate a manifest and set the managed layout at the same time:
83
+
84
+ ```bash
85
+ hagiscript manifest init ./hagiscript.manifest.yaml \
86
+ --runtime-home program \
87
+ --runtime-data-root runtime-data \
88
+ --server-program-root server \
89
+ --server-data-root server-data
90
+ ```
64
91
 
65
- Install selected components only:
92
+ Update an existing manifest after initialization:
66
93
 
67
94
  ```bash
68
- hagiscript runtime install --components node,omniroute
95
+ hagiscript manifest set ./hagiscript.manifest.yaml \
96
+ --npm-package-version pm2=7.0.2 \
97
+ --npm-package-version @openai/codex=0.126.0 \
98
+ --server-active-version 0.1.0-beta.60
69
99
  ```
70
100
 
71
- Preview planned changes without mutating files:
101
+ Print the current manifest summary in a friendlier format:
72
102
 
73
103
  ```bash
74
- hagiscript runtime install --dry-run
75
- hagiscript runtime update --check-only
104
+ hagiscript manifest get ./hagiscript.manifest.yaml
105
+ ```
106
+
107
+ Install the default runtime:
108
+
109
+ ```bash
110
+ hagiscript runtime install
111
+ ```
112
+
113
+ Install from an explicit manifest into a specific root:
114
+
115
+ ```bash
116
+ hagiscript runtime install \
117
+ --from-manifest ./runtime/manifest.yaml \
118
+ --runtime-root ~/.hagicode/runtime
76
119
  ```
77
120
 
78
- Inspect the canonical runtime state:
121
+ Show the current runtime state:
79
122
 
80
123
  ```bash
81
124
  hagiscript runtime state
125
+ ```
126
+
127
+ Show machine-readable state:
128
+
129
+ ```bash
82
130
  hagiscript runtime state --json
83
131
  ```
84
132
 
85
- Update or remove managed components:
133
+ Preview what would be installed without changing files:
134
+
135
+ ```bash
136
+ hagiscript runtime install --dry-run
137
+ ```
138
+
139
+ Update installed components:
86
140
 
87
141
  ```bash
88
142
  hagiscript runtime update
89
- hagiscript runtime remove --components code-server --purge
90
143
  ```
91
144
 
92
- Override the runtime root or manifest when needed:
145
+ Only check whether updates are needed:
146
+
147
+ ```bash
148
+ hagiscript runtime update --check-only
149
+ ```
150
+
151
+ Remove the runtime but keep retained data where supported:
152
+
153
+ ```bash
154
+ hagiscript runtime remove
155
+ ```
156
+
157
+ Purge runtime data as well:
158
+
159
+ ```bash
160
+ hagiscript runtime remove --purge
161
+ ```
162
+
163
+ Operate on selected components only:
93
164
 
94
165
  ```bash
95
- hagiscript runtime install --runtime-root /srv/hagicode/runtime
96
- hagiscript runtime state --from-manifest /path/to/runtime-manifest.yaml --json
166
+ hagiscript runtime install --components node,dotnet
167
+ hagiscript runtime update --components code-server,omniroute
168
+ hagiscript runtime remove --components code-server --purge
97
169
  ```
98
170
 
99
- If you prefer the runtime-oriented wrapper:
171
+ ## Runtime Install Workflow
172
+
173
+ The typical runtime flow is:
100
174
 
101
175
  ```bash
102
- hagicode-runtime install --runtime-root /srv/hagicode/runtime
176
+ hagiscript runtime install
177
+ hagiscript runtime state
178
+ hagiscript runtime update
103
179
  ```
104
180
 
105
- ## Runtime State and Maintenance
181
+ If you want a clean rebuild:
106
182
 
107
- `hagiscript runtime state --json` is the canonical inspection surface for automation. It reports:
183
+ ```bash
184
+ hagiscript runtime remove --purge
185
+ hagiscript runtime install
186
+ ```
108
187
 
109
- - resolved runtime root
110
- - `program/` and `runtime-data/` locations
111
- - per-component install status
112
- - per-component runtime data homes
113
- - derived PM2 homes for managed services
114
- - program/data path separation
188
+ ## Server Install And Management
115
189
 
116
- Use it before and after maintenance work to confirm the expected component set and writable paths.
190
+ The managed server is installed separately from the core runtime. `hagiscript server install` ensures runtime dependencies are available, resolves a released server package, and makes that version active.
117
191
 
118
- Typical maintenance flow:
192
+ Install the server from the default source:
119
193
 
120
- 1. Check current state: `hagiscript runtime state --json`
121
- 2. Apply changes: `hagiscript runtime install`, `update`, or `remove`
122
- 3. Re-check state to confirm the final layout
123
- 4. Operate services through `hagiscript pm2 ...`
194
+ ```bash
195
+ hagiscript server install
196
+ ```
124
197
 
125
- Lifecycle commands print the resolved manifest, managed root, changed component count, skipped entries, and log file path when a log is generated.
198
+ Install the server against an explicit runtime manifest and root:
126
199
 
127
- ## Managed PM2 Services
200
+ ```bash
201
+ hagiscript server install \
202
+ --from-manifest ./runtime/manifest.yaml \
203
+ --runtime-root ~/.hagicode/runtime
204
+ ```
128
205
 
129
- Hagiscript manages runtime-scoped PM2 services for:
206
+ Install from a local archive:
130
207
 
131
- - `server`
132
- - `omniroute`
133
- - `code-server`
208
+ ```bash
209
+ hagiscript server install --archive ./hagicode-server.zip
210
+ ```
134
211
 
135
- Supported actions:
212
+ Install from a specific index version:
136
213
 
137
- - `start`
138
- - `restart`
139
- - `stop`
140
- - `status`
141
- - `env`
214
+ ```bash
215
+ hagiscript server install --index-version 0.1.0-beta.60
216
+ ```
142
217
 
143
- Examples:
218
+ List installed server versions and the active version:
144
219
 
145
220
  ```bash
146
- hagiscript pm2 server start
147
- hagiscript pm2 server restart
148
- hagiscript pm2 server status
149
- hagiscript pm2 server env
150
- hagiscript pm2 server env --json
151
- hagiscript pm2 omniroute status
152
- hagiscript pm2 omniroute start
153
- hagiscript pm2 code-server stop
221
+ hagiscript server list
154
222
  ```
155
223
 
156
- The PM2 flow is runtime-scoped:
224
+ Switch the active version:
225
+
226
+ ```bash
227
+ hagiscript server use 0.1.0-beta.60
228
+ ```
157
229
 
158
- - PM2 is resolved from the managed npm prefix, not the host environment.
159
- - Hagiscript resolves the runtime manifest before every PM2 action.
160
- - PM2 runs with the managed Node runtime and managed PATH ordering.
161
- - `PM2_HOME` is derived from the managed runtime layout, so service state stays inside the runtime data boundary.
230
+ Remove an installed version:
162
231
 
163
- This means maintenance scripts should call `hagiscript pm2 ...` instead of a system `pm2` binary, and should ensure `pm2` has been installed into the managed npm prefix beforehand.
232
+ ```bash
233
+ hagiscript server remove 0.1.0-beta.60
234
+ ```
164
235
 
165
- ### Released backend `server` contract
236
+ ## Server Lifecycle
166
237
 
167
- The packaged runtime manifest treats `server` as a `released-service` component. The managed runtime expects a published backend package staged under:
238
+ Start the managed server:
168
239
 
169
- ```text
170
- <runtime-root>/program/components/server/current/
171
- lib/PCode.Web.dll
172
- lib/PCode.Web.deps.json
173
- lib/PCode.Web.runtimeconfig.json
174
- start.sh (or the platform equivalent from the release package)
240
+ ```bash
241
+ hagiscript server start
175
242
  ```
176
243
 
177
- Hagiscript keeps mutable launch state for that service under:
244
+ Stop it:
178
245
 
179
- ```text
180
- <runtime-root>/runtime-data/components/services/server/
181
- .pm2/
182
- pm2-runtime/
246
+ ```bash
247
+ hagiscript server stop
183
248
  ```
184
249
 
185
- `hagiscript runtime install --components server` prepares the runtime-owned launch assets and reports whether the published payload is already staged. `hagiscript pm2 server start` then generates the final PM2 ecosystem/env files under `pm2-runtime/` and launches the released backend through the managed `dotnet` runtime. Use `hagiscript pm2 server env` to print the exact resolved working directory, PATH ordering, and environment variables that HagiScript will use for that startup flow.
250
+ Restart it:
186
251
 
187
- ## Runtime Environment Contract
252
+ ```bash
253
+ hagiscript server restart
254
+ ```
188
255
 
189
- Runtime lifecycle scripts and managed services receive a stable environment contract:
256
+ Check status:
190
257
 
191
- - `HAGICODE_RUNTIME_HOME` - runtime program home
192
- - `HAGICODE_RUNTIME_DATA_HOME` - writable runtime data home for the current component
193
- - `PM2_HOME` - PM2 state directory for the current managed service
194
- - `PATH` - rebuilt so managed Node, managed npm, and managed wrappers come first
258
+ ```bash
259
+ hagiscript server status
260
+ ```
195
261
 
196
- This contract is what keeps installs, updates, wrappers, and PM2-managed services aligned to the same runtime root.
262
+ Show the startup environment:
197
263
 
198
- ## Manifest Customization
264
+ ```bash
265
+ hagiscript server env
266
+ ```
199
267
 
200
- `runtime/manifest.yaml` controls the runtime shape. Common override points:
268
+ Emit JSON for status or environment:
201
269
 
202
- - `paths.runtimeRoot`
203
- - `paths.runtimeHome`
204
- - `paths.runtimeDataRoot`
205
- - `paths.componentDataRoot`
206
- - `paths.defaultPm2Home`
207
- - component `runtimeDataDir`
208
- - service `pm2.appName`
209
- - service `pm2.cwd`
210
- - service `pm2.script`
211
- - service `pm2.args`
212
- - service `pm2.env`
213
- - service `pm2.pm2Home`
270
+ ```bash
271
+ hagiscript server status --json
272
+ hagiscript server env --json
273
+ ```
214
274
 
215
- For deployment-specific behavior, keep the packaged manifest as the baseline and pass `--from-manifest` with an override manifest rather than mutating the installed package in place.
275
+ Override the PM2 instance name used for namespaced app names:
216
276
 
217
- ## Related Runtime Tooling
277
+ ```bash
278
+ hagiscript server start --instance myruntime
279
+ ```
218
280
 
219
- ### Managed Node Runtime
281
+ ## Server Configuration
220
282
 
221
- Install a standalone managed Node.js runtime:
283
+ Read the effective managed server config:
222
284
 
223
285
  ```bash
224
- hagiscript install-node --target /opt/hagiscript/node
225
- hagiscript install-node --target /opt/hagiscript/node22 --version 22
286
+ hagiscript server config get
226
287
  ```
227
288
 
228
- Standalone Node installs also reuse the shared download cache by default. Pass `--no-download-cache` to force a fresh download, or `--download-cache-dir <path>` to share a custom cache location across installs.
289
+ Update host and port:
290
+
291
+ ```bash
292
+ hagiscript server config set --host 127.0.0.1 --port 39150
293
+ ```
229
294
 
230
- Validate an existing managed Node.js runtime:
295
+ Read the config as JSON:
231
296
 
232
297
  ```bash
233
- hagiscript check-node --target /opt/hagiscript/node
298
+ hagiscript server config get --json
234
299
  ```
235
300
 
236
- ### Managed npm Package Sync
301
+ ## Managed NPM Tool Sync
302
+
303
+ The runtime manifest can also declare managed npm packages under `npmSync`. These packages are installed into the managed npm prefix under `runtime-data/npm`, not into `program/`.
237
304
 
238
- Sync npm global packages into the managed npm prefix instead of the host environment:
305
+ If the managed runtime has already been installed, `npm-sync` can read `runtime-data/state.json` under the selected runtime and automatically reuse the recorded `manifestPath` and managed npm prefix. In that case you do not need to pass `--from-manifest`.
306
+
307
+ Sync npm packages by pointing at the runtime root:
239
308
 
240
309
  ```bash
241
- hagiscript npm-sync --manifest ./manifest.json
242
- hagiscript npm-sync --runtime /opt/hagiscript/node --manifest ./manifest.json
243
- hagiscript npm-sync --managed-runtime ~/.hagicode/runtime/program/components/node/runtime --prefix ~/.hagicode/runtime/program/npm --manifest ./manifest.json
310
+ hagiscript npm-sync --runtime-root ~/.hagicode/runtime
244
311
  ```
245
312
 
246
- When `npm-sync` has to provision a managed Node runtime first, it uses the same shared download cache by default.
313
+ Sync npm packages declared in a runtime manifest:
247
314
 
248
- This is the path for installing `pm2` and any other scenario-specific global tools. The package list is data, not a built-in runtime component.
315
+ ```bash
316
+ hagiscript npm-sync --from-manifest ./runtime/manifest.yaml
317
+ ```
249
318
 
250
- ## Development
319
+ `npm-sync` does not define its own program/data/server root layout. It reads the runtime manifest associated with the selected runtime root and follows that manifest's `npmSync` definition.
251
320
 
252
- Run from `repos/hagiscript/`:
321
+ If you want to change the npm tool versions captured in a manifest, update the manifest first:
253
322
 
254
323
  ```bash
255
- npm install
256
- npm test
257
- npm run build
258
- npm run pack:check
324
+ hagiscript manifest set ./hagiscript.manifest.yaml \
325
+ --npm-package-version pm2=7.0.2 \
326
+ --npm-package-version @openai/codex=0.126.0
259
327
  ```
260
328
 
261
- Useful runtime-focused checks:
329
+ Use an explicit managed Node runtime and prefix:
262
330
 
263
331
  ```bash
264
- npm run integration:runtime-management
265
- npm run integration:runtime-key-path
266
- npm run integration:installed-runtime
332
+ hagiscript npm-sync \
333
+ --from-manifest ./runtime/manifest.yaml \
334
+ --managed-runtime ~/.hagicode/runtime/program/components/node/runtime \
335
+ --prefix ~/.hagicode/runtime/runtime-data/npm
267
336
  ```
268
337
 
269
- The dedicated runtime key-path flow validates the critical production sequence with real network downloads: runtime install for fixed components, npm-sync for scenario-specific tools in the managed npm prefix, and PM2 lifecycle commands resolved from that managed prefix. Run the base flow with:
338
+ Force re-sync even if installed versions already satisfy the requested target:
270
339
 
271
340
  ```bash
272
- npm run integration:runtime-key-path
341
+ hagiscript npm-sync --from-manifest ./runtime/manifest.yaml --force
273
342
  ```
274
343
 
275
- The release-oriented key-path mode additionally stages the latest public backend package from GitHub Releases and validates the same managed PM2 contract for `server`:
344
+ ## Common End-To-End Flow
345
+
346
+ For a fresh machine or a new runtime root, this is the usual sequence:
276
347
 
277
348
  ```bash
278
- HAGISCRIPT_ENABLE_RELEASED_SERVER_TEST=1 npm run integration:runtime-key-path
349
+ hagiscript runtime install
350
+ hagiscript server install
351
+ hagiscript server start
352
+ hagiscript server status
279
353
  ```
280
354
 
281
- The broader runtime-management integration path remains available for the existing end-to-end runtime assertions, including the corresponding released-server mode:
355
+ If you also want the manifest-declared npm tools:
282
356
 
283
357
  ```bash
284
- HAGISCRIPT_ENABLE_RELEASED_SERVER_TEST=1 npm run integration:runtime-management
358
+ hagiscript npm-sync --runtime-root ~/.hagicode/runtime
285
359
  ```
286
360
 
361
+ ## Useful Flags
362
+
363
+ - `manifest init [path]`: generate an editable manifest from the packaged default
364
+ - `manifest get [path]`: print a readable summary of the current manifest
365
+ - `manifest set <path>`: update manifest paths, npmSync package versions, or server defaults
366
+ - `--from-manifest <path>`: use a specific runtime manifest YAML
367
+ - `--runtime-root <path>`: change the managed runtime root
368
+ - `--runtime-home <path>`: set the manifest's program root
369
+ - `--runtime-data-root <path>`: set the manifest's runtime-data root
370
+ - `--server-program-root <path>`: set the manifest's server program root
371
+ - `--server-data-root <path>`: set the manifest's server data root
372
+ - `--npm-package-version <package=version>`: update a manifest npmSync package entry
373
+ - `--server-active-version <version>`: set the manifest's preferred managed server version
374
+ - `--components <list>`: target specific runtime components
375
+ - `--dry-run`: print the plan without mutating files
376
+ - `--force`: force reinstall or update where supported
377
+ - `--purge`: remove retained mutable data during runtime removal
378
+ - `--json`: emit machine-readable output for `manifest get`, state, status, env, and config commands
379
+
287
380
  ## License
288
381
 
289
382
  MIT. See [LICENSE](./LICENSE).
package/dist/cli.js CHANGED
@@ -3,10 +3,12 @@ import { realpathSync } from "node:fs";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { Command } from "commander";
5
5
  import { createRuntimeInfo, packageVersion } from "./index.js";
6
+ import { registerManifestCommands } from "./commands/manifest-commands.js";
6
7
  import { registerNpmSyncCommand } from "./commands/npm-sync-commands.js";
7
8
  import { registerNodeRuntimeCommands } from "./commands/node-runtime-commands.js";
8
9
  import { registerPm2Commands } from "./commands/pm2-commands.js";
9
10
  import { registerRuntimeCommands } from "./commands/runtime-commands.js";
11
+ import { registerServerCommands } from "./commands/server-commands.js";
10
12
  export function createCli() {
11
13
  const program = new Command();
12
14
  program
@@ -21,9 +23,11 @@ export function createCli() {
21
23
  process.stdout.write(`${JSON.stringify(info, null, 2)}\n`);
22
24
  });
23
25
  registerNodeRuntimeCommands(program);
26
+ registerManifestCommands(program);
24
27
  registerNpmSyncCommand(program);
25
28
  registerPm2Commands(program);
26
29
  registerRuntimeCommands(program);
30
+ registerServerCommands(program);
27
31
  program.action(() => {
28
32
  program.outputHelp();
29
33
  });
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,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