@hagicode/hagiscript 0.1.14 → 0.1.15-dev.101.1.3738e96
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/README.md +248 -155
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/manifest-commands.d.ts +2 -0
- package/dist/commands/manifest-commands.js +136 -0
- package/dist/commands/manifest-commands.js.map +1 -0
- package/dist/commands/npm-sync-commands.js +63 -6
- package/dist/commands/npm-sync-commands.js.map +1 -1
- package/dist/commands/server-commands.d.ts +2 -0
- package/dist/commands/server-commands.js +404 -0
- package/dist/commands/server-commands.js.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/runtime/manifest-manager.d.ts +57 -0
- package/dist/runtime/manifest-manager.js +213 -0
- package/dist/runtime/manifest-manager.js.map +1 -0
- package/dist/runtime/npm-sync.d.ts +3 -1
- package/dist/runtime/npm-sync.js +31 -3
- package/dist/runtime/npm-sync.js.map +1 -1
- package/dist/runtime/pm2-manager.d.ts +5 -2
- package/dist/runtime/pm2-manager.js +181 -49
- package/dist/runtime/pm2-manager.js.map +1 -1
- package/dist/runtime/runtime-executor.d.ts +6 -0
- package/dist/runtime/runtime-executor.js +55 -0
- package/dist/runtime/runtime-executor.js.map +1 -1
- package/dist/runtime/runtime-manager.d.ts +9 -0
- package/dist/runtime/runtime-manager.js +146 -16
- package/dist/runtime/runtime-manager.js.map +1 -1
- package/dist/runtime/runtime-manifest.d.ts +5 -1
- package/dist/runtime/runtime-manifest.js +23 -8
- package/dist/runtime/runtime-manifest.js.map +1 -1
- package/dist/runtime/runtime-paths.d.ts +11 -1
- package/dist/runtime/runtime-paths.js +41 -5
- package/dist/runtime/runtime-paths.js.map +1 -1
- package/dist/runtime/server-config.d.ts +21 -0
- package/dist/runtime/server-config.js +169 -0
- package/dist/runtime/server-config.js.map +1 -0
- package/dist/runtime/server-manager.d.ts +107 -0
- package/dist/runtime/server-manager.js +928 -0
- package/dist/runtime/server-manager.js.map +1 -0
- package/dist/runtime/server-version-state.d.ts +43 -0
- package/dist/runtime/server-version-state.js +156 -0
- package/dist/runtime/server-version-state.js.map +1 -0
- package/dist/runtime/tool-sync-catalog.config.json +0 -18
- package/dist/runtime/tool-sync-catalog.js +1 -1
- package/dist/runtime/tool-sync-catalog.js.map +1 -1
- package/package.json +23 -2
- package/runtime/lib/runtime-script-lib.mjs +128 -69
- package/runtime/manifest.yaml +96 -81
- package/runtime/scripts/configure-code-server.mjs +14 -3
- package/runtime/scripts/configure-omniroute.mjs +15 -5
- package/runtime/scripts/install-code-server.mjs +20 -23
- package/runtime/scripts/install-omniroute.mjs +19 -22
- package/runtime/scripts/install-pm2.mjs +39 -0
- package/runtime/scripts/remove-pm2.mjs +25 -0
- package/runtime/templates/code-server-config.yaml +2 -2
- package/runtime/templates/omniroute-config.yaml +1 -1
package/README.md
CHANGED
|
@@ -4,286 +4,379 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@hagicode/hagiscript)
|
|
5
5
|
[](./LICENSE)
|
|
6
6
|
|
|
7
|
-
`@hagicode/hagiscript` is the
|
|
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
|
-
|
|
15
|
+
Check the installed version:
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
39
|
+
If you are working with a custom manifest or runtime root, use the same flow with explicit paths:
|
|
21
40
|
|
|
22
|
-
|
|
41
|
+
```bash
|
|
42
|
+
hagiscript runtime install \
|
|
43
|
+
--from-manifest ./runtime/manifest.yaml \
|
|
44
|
+
--runtime-root ~/.hagicode/runtime
|
|
23
45
|
|
|
24
|
-
|
|
46
|
+
hagiscript server install \
|
|
47
|
+
--from-manifest ./runtime/manifest.yaml \
|
|
48
|
+
--runtime-root ~/.hagicode/runtime
|
|
25
49
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
55
|
+
## What Hagiscript Manages
|
|
56
|
+
|
|
57
|
+
The packaged runtime manifest defines these default components:
|
|
41
58
|
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
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
|
|
65
|
+
The managed runtime layout separates immutable program files from mutable data:
|
|
46
66
|
|
|
47
|
-
- `
|
|
48
|
-
- `
|
|
49
|
-
- `server
|
|
50
|
-
- `
|
|
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
|
-
|
|
72
|
+
By default, the packaged manifest installs into `~/.hagicode/runtime`, but you can override that with `--runtime-root`.
|
|
54
73
|
|
|
55
|
-
##
|
|
74
|
+
## Runtime Basics
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
Create a standalone editable manifest from Hagiscript's packaged default:
|
|
58
77
|
|
|
59
78
|
```bash
|
|
60
|
-
hagiscript
|
|
79
|
+
hagiscript manifest init ./hagiscript.manifest.yaml
|
|
61
80
|
```
|
|
62
81
|
|
|
63
|
-
|
|
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
|
-
|
|
92
|
+
Update an existing manifest after initialization:
|
|
66
93
|
|
|
67
94
|
```bash
|
|
68
|
-
hagiscript
|
|
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
|
-
|
|
101
|
+
Print the current manifest summary in a friendlier format:
|
|
72
102
|
|
|
73
103
|
```bash
|
|
74
|
-
hagiscript
|
|
75
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 --
|
|
96
|
-
hagiscript runtime
|
|
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
|
-
|
|
171
|
+
## Runtime Install Workflow
|
|
172
|
+
|
|
173
|
+
The typical runtime flow is:
|
|
100
174
|
|
|
101
175
|
```bash
|
|
102
|
-
|
|
176
|
+
hagiscript runtime install
|
|
177
|
+
hagiscript runtime state
|
|
178
|
+
hagiscript runtime update
|
|
103
179
|
```
|
|
104
180
|
|
|
105
|
-
|
|
181
|
+
If you want a clean rebuild:
|
|
106
182
|
|
|
107
|
-
|
|
183
|
+
```bash
|
|
184
|
+
hagiscript runtime remove --purge
|
|
185
|
+
hagiscript runtime install
|
|
186
|
+
```
|
|
108
187
|
|
|
109
|
-
|
|
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
|
-
|
|
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
|
-
|
|
192
|
+
Install the server from the default source:
|
|
119
193
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
4. Operate services through `hagiscript pm2 ...`
|
|
194
|
+
```bash
|
|
195
|
+
hagiscript server install
|
|
196
|
+
```
|
|
124
197
|
|
|
125
|
-
|
|
198
|
+
Install the server against an explicit runtime manifest and root:
|
|
126
199
|
|
|
127
|
-
|
|
200
|
+
```bash
|
|
201
|
+
hagiscript server install \
|
|
202
|
+
--from-manifest ./runtime/manifest.yaml \
|
|
203
|
+
--runtime-root ~/.hagicode/runtime
|
|
204
|
+
```
|
|
128
205
|
|
|
129
|
-
|
|
206
|
+
Install from a local archive:
|
|
130
207
|
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
208
|
+
```bash
|
|
209
|
+
hagiscript server install --archive ./hagicode-server.zip
|
|
210
|
+
```
|
|
134
211
|
|
|
135
|
-
|
|
212
|
+
Install from a specific index version:
|
|
136
213
|
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
- `status`
|
|
141
|
-
- `env`
|
|
214
|
+
```bash
|
|
215
|
+
hagiscript server install --index-version 0.1.0-beta.60
|
|
216
|
+
```
|
|
142
217
|
|
|
143
|
-
|
|
218
|
+
List installed server versions and the active version:
|
|
144
219
|
|
|
145
220
|
```bash
|
|
146
|
-
hagiscript
|
|
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
|
-
|
|
224
|
+
Switch the active version:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
hagiscript server use 0.1.0-beta.60
|
|
228
|
+
```
|
|
157
229
|
|
|
158
|
-
|
|
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
|
-
|
|
232
|
+
```bash
|
|
233
|
+
hagiscript server remove 0.1.0-beta.60
|
|
234
|
+
```
|
|
164
235
|
|
|
165
|
-
|
|
236
|
+
## Server Lifecycle
|
|
166
237
|
|
|
167
|
-
|
|
238
|
+
Start the managed server:
|
|
168
239
|
|
|
169
|
-
```
|
|
170
|
-
|
|
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
|
-
|
|
244
|
+
Stop it:
|
|
178
245
|
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
.pm2/
|
|
182
|
-
pm2-runtime/
|
|
246
|
+
```bash
|
|
247
|
+
hagiscript server stop
|
|
183
248
|
```
|
|
184
249
|
|
|
185
|
-
|
|
250
|
+
Restart it:
|
|
186
251
|
|
|
187
|
-
|
|
252
|
+
```bash
|
|
253
|
+
hagiscript server restart
|
|
254
|
+
```
|
|
188
255
|
|
|
189
|
-
|
|
256
|
+
Check status:
|
|
190
257
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
- `PATH` - rebuilt so managed Node, managed npm, and managed wrappers come first
|
|
258
|
+
```bash
|
|
259
|
+
hagiscript server status
|
|
260
|
+
```
|
|
195
261
|
|
|
196
|
-
|
|
262
|
+
Show the startup environment:
|
|
197
263
|
|
|
198
|
-
|
|
264
|
+
```bash
|
|
265
|
+
hagiscript server env
|
|
266
|
+
```
|
|
199
267
|
|
|
200
|
-
|
|
268
|
+
Emit JSON for status or environment:
|
|
201
269
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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
|
-
|
|
275
|
+
Override the PM2 instance name used for namespaced app names:
|
|
216
276
|
|
|
217
|
-
|
|
277
|
+
```bash
|
|
278
|
+
hagiscript server start --instance myruntime
|
|
279
|
+
```
|
|
218
280
|
|
|
219
|
-
|
|
281
|
+
## Server Configuration
|
|
220
282
|
|
|
221
|
-
|
|
283
|
+
Read the effective managed server config:
|
|
222
284
|
|
|
223
285
|
```bash
|
|
224
|
-
hagiscript
|
|
225
|
-
hagiscript install-node --target /opt/hagiscript/node22 --version 22
|
|
286
|
+
hagiscript server config get
|
|
226
287
|
```
|
|
227
288
|
|
|
228
|
-
|
|
289
|
+
Update host and port:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
hagiscript server config set --host 127.0.0.1 --port 39150
|
|
293
|
+
```
|
|
229
294
|
|
|
230
|
-
|
|
295
|
+
Read the config as JSON:
|
|
231
296
|
|
|
232
297
|
```bash
|
|
233
|
-
hagiscript
|
|
298
|
+
hagiscript server config get --json
|
|
234
299
|
```
|
|
235
300
|
|
|
236
|
-
|
|
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
|
-
|
|
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 --
|
|
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
|
-
|
|
313
|
+
Sync npm packages declared in a runtime manifest:
|
|
247
314
|
|
|
248
|
-
|
|
315
|
+
```bash
|
|
316
|
+
hagiscript npm-sync --from-manifest ./runtime/manifest.yaml
|
|
317
|
+
```
|
|
249
318
|
|
|
250
|
-
|
|
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
|
-
|
|
321
|
+
If you want to change the npm tool versions captured in a manifest, update the manifest first:
|
|
253
322
|
|
|
254
323
|
```bash
|
|
255
|
-
|
|
256
|
-
npm
|
|
257
|
-
npm
|
|
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
|
-
|
|
329
|
+
Use an explicit managed Node runtime and prefix:
|
|
262
330
|
|
|
263
331
|
```bash
|
|
264
|
-
npm
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
338
|
+
Force re-sync even if installed versions already satisfy the requested target:
|
|
270
339
|
|
|
271
340
|
```bash
|
|
272
|
-
npm
|
|
341
|
+
hagiscript npm-sync --from-manifest ./runtime/manifest.yaml --force
|
|
273
342
|
```
|
|
274
343
|
|
|
275
|
-
|
|
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
|
-
|
|
349
|
+
hagiscript runtime install
|
|
350
|
+
hagiscript server install
|
|
351
|
+
hagiscript server start
|
|
352
|
+
hagiscript server status
|
|
279
353
|
```
|
|
280
354
|
|
|
281
|
-
|
|
355
|
+
If you also want the manifest-declared npm tools:
|
|
282
356
|
|
|
283
357
|
```bash
|
|
284
|
-
|
|
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,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACv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