@hla4ts/create-spacekit 0.1.0 → 0.1.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.
package/src/cli.ts CHANGED
@@ -1,364 +1,364 @@
1
- #!/usr/bin/env bun
2
- import readline from "node:readline/promises";
3
- import { stdin, stdout } from "node:process";
4
- import path from "node:path";
5
- import {
6
- DEFAULT_TEMPLATE,
7
- TEMPLATE_DESCRIPTIONS,
8
- listTemplates,
9
- scaffoldApp,
10
- type TemplateId,
11
- type TemplateValues,
12
- } from "./scaffold.ts";
13
-
14
- interface CliOptions {
15
- targetDir?: string;
16
- template: TemplateId;
17
- workspaceDeps: boolean;
18
- yes: boolean;
19
- values: Partial<TemplateValues>;
20
- listTemplates: boolean;
21
- help: boolean;
22
- }
23
-
24
- try {
25
- await main();
26
- } catch (error) {
27
- const message = error instanceof Error ? error.message : String(error);
28
- console.error(message);
29
- process.exit(1);
30
- }
31
-
32
- async function main(): Promise<void> {
33
- const options = parseArgs(process.argv.slice(2));
34
-
35
- if (options.help) {
36
- printHelp();
37
- return;
38
- }
39
-
40
- if (options.listTemplates) {
41
- for (const template of listTemplates()) {
42
- console.log(`${template.id}\t${template.description}`);
43
- }
44
- return;
45
- }
46
-
47
- if (!options.targetDir) {
48
- printHelp("Target directory is required.");
49
- process.exit(1);
50
- }
51
-
52
- if (!isTemplateId(options.template)) {
53
- throw new Error(`Unknown template "${options.template}". Run --list-templates to inspect choices.`);
54
- }
55
-
56
- const usePrompts = stdin.isTTY && stdout.isTTY && !options.yes;
57
- const values = usePrompts
58
- ? await promptForMissingValues(options.targetDir, options.template, options.values)
59
- : options.values;
60
- if (options.workspaceDeps) {
61
- values.spacekitDependency = "workspace:*";
62
- }
63
-
64
- const result = await scaffoldApp({
65
- targetDir: options.targetDir,
66
- template: options.template,
67
- values,
68
- });
69
-
70
- const relativeTarget = path.relative(process.cwd(), result.targetDir) || ".";
71
- const displayTarget =
72
- relativeTarget === "." || (!relativeTarget.startsWith("..") && !path.isAbsolute(relativeTarget))
73
- ? relativeTarget
74
- : result.targetDir;
75
- console.log(`Created ${result.template} app in ${result.targetDir}`);
76
- console.log("");
77
- console.log("Next steps:");
78
- console.log(` cd ${displayTarget}`);
79
- console.log(" bun install");
80
- console.log(" bun run start");
81
- console.log("");
1
+ #!/usr/bin/env bun
2
+ import readline from "node:readline/promises";
3
+ import { stdin, stdout } from "node:process";
4
+ import path from "node:path";
5
+ import {
6
+ DEFAULT_TEMPLATE,
7
+ TEMPLATE_DESCRIPTIONS,
8
+ listTemplates,
9
+ scaffoldApp,
10
+ type TemplateId,
11
+ type TemplateValues,
12
+ } from "./scaffold.ts";
13
+
14
+ interface CliOptions {
15
+ targetDir?: string;
16
+ template: TemplateId;
17
+ workspaceDeps: boolean;
18
+ yes: boolean;
19
+ values: Partial<TemplateValues>;
20
+ listTemplates: boolean;
21
+ help: boolean;
22
+ }
23
+
24
+ try {
25
+ await main();
26
+ } catch (error) {
27
+ const message = error instanceof Error ? error.message : String(error);
28
+ console.error(message);
29
+ process.exit(1);
30
+ }
31
+
32
+ async function main(): Promise<void> {
33
+ const options = parseArgs(process.argv.slice(2));
34
+
35
+ if (options.help) {
36
+ printHelp();
37
+ return;
38
+ }
39
+
40
+ if (options.listTemplates) {
41
+ for (const template of listTemplates()) {
42
+ console.log(`${template.id}\t${template.description}`);
43
+ }
44
+ return;
45
+ }
46
+
47
+ if (!options.targetDir) {
48
+ printHelp("Target directory is required.");
49
+ process.exit(1);
50
+ }
51
+
52
+ if (!isTemplateId(options.template)) {
53
+ throw new Error(`Unknown template "${options.template}". Run --list-templates to inspect choices.`);
54
+ }
55
+
56
+ const usePrompts = stdin.isTTY && stdout.isTTY && !options.yes;
57
+ const values = usePrompts
58
+ ? await promptForMissingValues(options.targetDir, options.template, options.values)
59
+ : options.values;
60
+ if (options.workspaceDeps) {
61
+ values.spacekitDependency = "workspace:*";
62
+ }
63
+
64
+ const result = await scaffoldApp({
65
+ targetDir: options.targetDir,
66
+ template: options.template,
67
+ values,
68
+ });
69
+
70
+ const relativeTarget = path.relative(process.cwd(), result.targetDir) || ".";
71
+ const displayTarget =
72
+ relativeTarget === "." || (!relativeTarget.startsWith("..") && !path.isAbsolute(relativeTarget))
73
+ ? relativeTarget
74
+ : result.targetDir;
75
+ console.log(`Created ${result.template} app in ${result.targetDir}`);
76
+ console.log("");
77
+ console.log("Next steps:");
78
+ console.log(` cd ${displayTarget}`);
79
+ console.log(" bun install");
80
+ console.log(" bun run start");
81
+ console.log("");
82
82
  console.log(
83
83
  "This package is bunx-ready, but the one-line zero-clone flow still depends on npm publication:"
84
84
  );
85
85
  console.log(` bunx @hla4ts/create-spacekit ${path.basename(result.targetDir)}`);
86
86
  }
87
-
88
- function parseArgs(argv: string[]): CliOptions {
89
- const options: CliOptions = {
90
- template: DEFAULT_TEMPLATE,
91
- workspaceDeps: false,
92
- yes: false,
93
- values: {},
94
- listTemplates: false,
95
- help: false,
96
- };
97
-
98
- for (let index = 0; index < argv.length; index += 1) {
99
- const arg = argv[index];
100
- if (!arg) continue;
101
-
102
- if (arg === "--help" || arg === "-h") {
103
- options.help = true;
104
- continue;
105
- }
106
- if (arg === "--list-templates") {
107
- options.listTemplates = true;
108
- continue;
109
- }
110
- if (arg === "--yes" || arg === "-y") {
111
- options.yes = true;
112
- continue;
113
- }
114
- if (arg === "--workspace-deps") {
115
- options.workspaceDeps = true;
116
- continue;
117
- }
118
- if (arg === "--template") {
119
- options.template = readValue(argv, ++index, arg) as TemplateId;
120
- continue;
121
- }
122
- if (arg === "--federation-name") {
123
- options.values.federationName = readValue(argv, ++index, arg);
124
- continue;
125
- }
126
- if (arg === "--federate-name") {
127
- options.values.federateName = readValue(argv, ++index, arg);
128
- continue;
129
- }
130
- if (arg === "--federate-type") {
131
- options.values.federateType = readValue(argv, ++index, arg);
132
- continue;
133
- }
134
- if (arg === "--rti-host") {
135
- options.values.rtiHost = readValue(argv, ++index, arg);
136
- continue;
137
- }
138
- if (arg === "--rti-port") {
139
- options.values.rtiPort = readValue(argv, ++index, arg);
140
- continue;
141
- }
142
- if (arg === "--rti-use-tls") {
143
- options.values.rtiUseTls = "true";
144
- continue;
145
- }
146
- if (arg === "--parent-reference-frame") {
147
- options.values.parentReferenceFrame = readValue(argv, ++index, arg);
148
- continue;
149
- }
150
- if (arg === "--rover-name") {
151
- options.values.roverName = readValue(argv, ++index, arg);
152
- continue;
153
- }
154
- if (arg === "--rover-type") {
155
- options.values.roverType = readValue(argv, ++index, arg);
156
- continue;
157
- }
158
- if (arg === "--rover-speed-mps") {
159
- options.values.roverSpeedMps = readValue(argv, ++index, arg);
160
- continue;
161
- }
162
- if (arg === "--lookahead-micros") {
163
- options.values.lookaheadMicros = readValue(argv, ++index, arg);
164
- continue;
165
- }
166
- if (arg === "--update-period-micros") {
167
- options.values.updatePeriodMicros = readValue(argv, ++index, arg);
168
- continue;
169
- }
170
- if (arg === "--reference-frame-timeout-ms") {
171
- options.values.referenceFrameTimeoutMs = readValue(argv, ++index, arg);
172
- continue;
173
- }
174
- if (arg === "--reference-frame-missing-mode") {
175
- options.values.referenceFrameMissingMode = readValue(argv, ++index, arg);
176
- continue;
177
- }
178
-
179
- if (arg.startsWith("--")) {
180
- throw new Error(`Unknown flag: ${arg}`);
181
- }
182
-
183
- if (!options.targetDir) {
184
- options.targetDir = arg;
185
- continue;
186
- }
187
-
188
- throw new Error(`Unexpected argument: ${arg}`);
189
- }
190
-
191
- return options;
192
- }
193
-
194
- async function promptForMissingValues(
195
- targetDir: string,
196
- template: TemplateId,
197
- values: Partial<TemplateValues>
198
- ): Promise<Partial<TemplateValues>> {
199
- const rl = readline.createInterface({ input: stdin, output: stdout });
200
- const defaults = {
201
- federationName: "SpaceFederation",
202
- federateName: "LunarRover-1",
203
- federateType: "LunarRover",
204
- rtiHost: "localhost",
205
- rtiPort: "15164",
206
- rtiUseTls: "false",
207
- parentReferenceFrame: "AitkenBasinLocalFixed",
208
- roverName: "LunarRover-1",
209
- roverType: "LunarRover",
210
- roverSpeedMps: "0.5",
211
- lookaheadMicros: "1000000",
212
- updatePeriodMicros: "1000000",
213
- referenceFrameTimeoutMs: "30000",
214
- referenceFrameMissingMode: "continue",
215
- } satisfies Partial<TemplateValues>;
216
-
217
- try {
218
- console.log(`Scaffolding template "${template}" into ${path.resolve(targetDir)}`);
219
- console.log(TEMPLATE_DESCRIPTIONS[template]);
220
- console.log("");
221
-
222
- const federationName = await ask(
223
- rl,
224
- "Federation name",
225
- values.federationName ?? defaults.federationName
226
- );
227
- const federateName = await ask(
228
- rl,
229
- "Federate name",
230
- values.federateName ?? defaults.federateName
231
- );
232
- const federateType = await ask(
233
- rl,
234
- "Federate type",
235
- values.federateType ?? defaults.federateType
236
- );
237
- const rtiHost = await ask(rl, "RTI host", values.rtiHost ?? defaults.rtiHost);
238
- const rtiPort = await ask(rl, "RTI port", values.rtiPort ?? defaults.rtiPort);
239
- const rtiUseTls = await askBool(rl, "Use TLS", values.rtiUseTls ?? defaults.rtiUseTls);
240
- const parentReferenceFrame = await ask(
241
- rl,
242
- "Parent reference frame",
243
- values.parentReferenceFrame ?? defaults.parentReferenceFrame
244
- );
245
- const roverName = await ask(
246
- rl,
247
- "Rover object name",
248
- values.roverName ?? federateName ?? defaults.roverName
249
- );
250
- const roverType = await ask(
251
- rl,
252
- "Rover type",
253
- values.roverType ?? federateType ?? defaults.roverType
254
- );
255
- const roverSpeedMps = await ask(
256
- rl,
257
- "Rover speed (m/s)",
258
- values.roverSpeedMps ?? defaults.roverSpeedMps
259
- );
260
- const lookaheadMicros = await ask(
261
- rl,
262
- "Lookahead (micros)",
263
- values.lookaheadMicros ?? defaults.lookaheadMicros
264
- );
265
- const updatePeriodMicros = await ask(
266
- rl,
267
- "Update period (micros)",
268
- values.updatePeriodMicros ?? defaults.updatePeriodMicros
269
- );
270
- const referenceFrameTimeoutMs = await ask(
271
- rl,
272
- "Reference frame timeout (ms)",
273
- values.referenceFrameTimeoutMs ?? defaults.referenceFrameTimeoutMs
274
- );
275
- const referenceFrameMissingMode = await ask(
276
- rl,
277
- "Missing frame mode (error/continue)",
278
- values.referenceFrameMissingMode ?? defaults.referenceFrameMissingMode
279
- );
280
-
281
- return {
282
- ...values,
283
- federationName,
284
- federateName,
285
- federateType,
286
- rtiHost,
287
- rtiPort,
288
- rtiUseTls,
289
- parentReferenceFrame,
290
- roverName,
291
- roverType,
292
- roverSpeedMps,
293
- lookaheadMicros,
294
- updatePeriodMicros,
295
- referenceFrameTimeoutMs,
296
- referenceFrameMissingMode,
297
- };
298
- } finally {
299
- rl.close();
300
- }
301
- }
302
-
303
- async function ask(
304
- rl: readline.Interface,
305
- label: string,
306
- fallback: string | undefined
307
- ): Promise<string> {
308
- const resolvedFallback = fallback ?? "";
309
- const response = await rl.question(`${label} (${resolvedFallback}): `);
310
- return response.trim() === "" ? resolvedFallback : response.trim();
311
- }
312
-
313
- async function askBool(
314
- rl: readline.Interface,
315
- label: string,
316
- fallback: string | undefined
317
- ): Promise<string> {
318
- const response = await ask(rl, `${label} [y/N]`, fallback === "true" ? "y" : "n");
319
- const normalized = response.toLowerCase();
320
- return ["y", "yes", "true", "1"].includes(normalized) ? "true" : "false";
321
- }
322
-
323
- function readValue(argv: string[], index: number, flag: string): string {
324
- const value = argv[index];
325
- if (!value) {
326
- throw new Error(`Missing value for ${flag}`);
327
- }
328
- return value;
329
- }
330
-
331
- function isTemplateId(value: string): value is TemplateId {
332
- return value in TEMPLATE_DESCRIPTIONS;
333
- }
334
-
335
- function printHelp(errorMessage?: string): void {
336
- if (errorMessage) {
337
- console.error(errorMessage);
338
- console.error("");
339
- }
340
-
341
- console.log("Usage:");
87
+
88
+ function parseArgs(argv: string[]): CliOptions {
89
+ const options: CliOptions = {
90
+ template: DEFAULT_TEMPLATE,
91
+ workspaceDeps: false,
92
+ yes: false,
93
+ values: {},
94
+ listTemplates: false,
95
+ help: false,
96
+ };
97
+
98
+ for (let index = 0; index < argv.length; index += 1) {
99
+ const arg = argv[index];
100
+ if (!arg) continue;
101
+
102
+ if (arg === "--help" || arg === "-h") {
103
+ options.help = true;
104
+ continue;
105
+ }
106
+ if (arg === "--list-templates") {
107
+ options.listTemplates = true;
108
+ continue;
109
+ }
110
+ if (arg === "--yes" || arg === "-y") {
111
+ options.yes = true;
112
+ continue;
113
+ }
114
+ if (arg === "--workspace-deps") {
115
+ options.workspaceDeps = true;
116
+ continue;
117
+ }
118
+ if (arg === "--template") {
119
+ options.template = readValue(argv, ++index, arg) as TemplateId;
120
+ continue;
121
+ }
122
+ if (arg === "--federation-name") {
123
+ options.values.federationName = readValue(argv, ++index, arg);
124
+ continue;
125
+ }
126
+ if (arg === "--federate-name") {
127
+ options.values.federateName = readValue(argv, ++index, arg);
128
+ continue;
129
+ }
130
+ if (arg === "--federate-type") {
131
+ options.values.federateType = readValue(argv, ++index, arg);
132
+ continue;
133
+ }
134
+ if (arg === "--rti-host") {
135
+ options.values.rtiHost = readValue(argv, ++index, arg);
136
+ continue;
137
+ }
138
+ if (arg === "--rti-port") {
139
+ options.values.rtiPort = readValue(argv, ++index, arg);
140
+ continue;
141
+ }
142
+ if (arg === "--rti-use-tls") {
143
+ options.values.rtiUseTls = "true";
144
+ continue;
145
+ }
146
+ if (arg === "--parent-reference-frame") {
147
+ options.values.parentReferenceFrame = readValue(argv, ++index, arg);
148
+ continue;
149
+ }
150
+ if (arg === "--rover-name") {
151
+ options.values.roverName = readValue(argv, ++index, arg);
152
+ continue;
153
+ }
154
+ if (arg === "--rover-type") {
155
+ options.values.roverType = readValue(argv, ++index, arg);
156
+ continue;
157
+ }
158
+ if (arg === "--rover-speed-mps") {
159
+ options.values.roverSpeedMps = readValue(argv, ++index, arg);
160
+ continue;
161
+ }
162
+ if (arg === "--lookahead-micros") {
163
+ options.values.lookaheadMicros = readValue(argv, ++index, arg);
164
+ continue;
165
+ }
166
+ if (arg === "--update-period-micros") {
167
+ options.values.updatePeriodMicros = readValue(argv, ++index, arg);
168
+ continue;
169
+ }
170
+ if (arg === "--reference-frame-timeout-ms") {
171
+ options.values.referenceFrameTimeoutMs = readValue(argv, ++index, arg);
172
+ continue;
173
+ }
174
+ if (arg === "--reference-frame-missing-mode") {
175
+ options.values.referenceFrameMissingMode = readValue(argv, ++index, arg);
176
+ continue;
177
+ }
178
+
179
+ if (arg.startsWith("--")) {
180
+ throw new Error(`Unknown flag: ${arg}`);
181
+ }
182
+
183
+ if (!options.targetDir) {
184
+ options.targetDir = arg;
185
+ continue;
186
+ }
187
+
188
+ throw new Error(`Unexpected argument: ${arg}`);
189
+ }
190
+
191
+ return options;
192
+ }
193
+
194
+ async function promptForMissingValues(
195
+ targetDir: string,
196
+ template: TemplateId,
197
+ values: Partial<TemplateValues>
198
+ ): Promise<Partial<TemplateValues>> {
199
+ const rl = readline.createInterface({ input: stdin, output: stdout });
200
+ const defaults = {
201
+ federationName: "SpaceFederation",
202
+ federateName: "LunarRover-1",
203
+ federateType: "LunarRover",
204
+ rtiHost: "localhost",
205
+ rtiPort: "15164",
206
+ rtiUseTls: "false",
207
+ parentReferenceFrame: "AitkenBasinLocalFixed",
208
+ roverName: "LunarRover-1",
209
+ roverType: "LunarRover",
210
+ roverSpeedMps: "0.5",
211
+ lookaheadMicros: "1000000",
212
+ updatePeriodMicros: "1000000",
213
+ referenceFrameTimeoutMs: "30000",
214
+ referenceFrameMissingMode: "continue",
215
+ } satisfies Partial<TemplateValues>;
216
+
217
+ try {
218
+ console.log(`Scaffolding template "${template}" into ${path.resolve(targetDir)}`);
219
+ console.log(TEMPLATE_DESCRIPTIONS[template]);
220
+ console.log("");
221
+
222
+ const federationName = await ask(
223
+ rl,
224
+ "Federation name",
225
+ values.federationName ?? defaults.federationName
226
+ );
227
+ const federateName = await ask(
228
+ rl,
229
+ "Federate name",
230
+ values.federateName ?? defaults.federateName
231
+ );
232
+ const federateType = await ask(
233
+ rl,
234
+ "Federate type",
235
+ values.federateType ?? defaults.federateType
236
+ );
237
+ const rtiHost = await ask(rl, "RTI host", values.rtiHost ?? defaults.rtiHost);
238
+ const rtiPort = await ask(rl, "RTI port", values.rtiPort ?? defaults.rtiPort);
239
+ const rtiUseTls = await askBool(rl, "Use TLS", values.rtiUseTls ?? defaults.rtiUseTls);
240
+ const parentReferenceFrame = await ask(
241
+ rl,
242
+ "Parent reference frame",
243
+ values.parentReferenceFrame ?? defaults.parentReferenceFrame
244
+ );
245
+ const roverName = await ask(
246
+ rl,
247
+ "Rover object name",
248
+ values.roverName ?? federateName ?? defaults.roverName
249
+ );
250
+ const roverType = await ask(
251
+ rl,
252
+ "Rover type",
253
+ values.roverType ?? federateType ?? defaults.roverType
254
+ );
255
+ const roverSpeedMps = await ask(
256
+ rl,
257
+ "Rover speed (m/s)",
258
+ values.roverSpeedMps ?? defaults.roverSpeedMps
259
+ );
260
+ const lookaheadMicros = await ask(
261
+ rl,
262
+ "Lookahead (micros)",
263
+ values.lookaheadMicros ?? defaults.lookaheadMicros
264
+ );
265
+ const updatePeriodMicros = await ask(
266
+ rl,
267
+ "Update period (micros)",
268
+ values.updatePeriodMicros ?? defaults.updatePeriodMicros
269
+ );
270
+ const referenceFrameTimeoutMs = await ask(
271
+ rl,
272
+ "Reference frame timeout (ms)",
273
+ values.referenceFrameTimeoutMs ?? defaults.referenceFrameTimeoutMs
274
+ );
275
+ const referenceFrameMissingMode = await ask(
276
+ rl,
277
+ "Missing frame mode (error/continue)",
278
+ values.referenceFrameMissingMode ?? defaults.referenceFrameMissingMode
279
+ );
280
+
281
+ return {
282
+ ...values,
283
+ federationName,
284
+ federateName,
285
+ federateType,
286
+ rtiHost,
287
+ rtiPort,
288
+ rtiUseTls,
289
+ parentReferenceFrame,
290
+ roverName,
291
+ roverType,
292
+ roverSpeedMps,
293
+ lookaheadMicros,
294
+ updatePeriodMicros,
295
+ referenceFrameTimeoutMs,
296
+ referenceFrameMissingMode,
297
+ };
298
+ } finally {
299
+ rl.close();
300
+ }
301
+ }
302
+
303
+ async function ask(
304
+ rl: readline.Interface,
305
+ label: string,
306
+ fallback: string | undefined
307
+ ): Promise<string> {
308
+ const resolvedFallback = fallback ?? "";
309
+ const response = await rl.question(`${label} (${resolvedFallback}): `);
310
+ return response.trim() === "" ? resolvedFallback : response.trim();
311
+ }
312
+
313
+ async function askBool(
314
+ rl: readline.Interface,
315
+ label: string,
316
+ fallback: string | undefined
317
+ ): Promise<string> {
318
+ const response = await ask(rl, `${label} [y/N]`, fallback === "true" ? "y" : "n");
319
+ const normalized = response.toLowerCase();
320
+ return ["y", "yes", "true", "1"].includes(normalized) ? "true" : "false";
321
+ }
322
+
323
+ function readValue(argv: string[], index: number, flag: string): string {
324
+ const value = argv[index];
325
+ if (!value) {
326
+ throw new Error(`Missing value for ${flag}`);
327
+ }
328
+ return value;
329
+ }
330
+
331
+ function isTemplateId(value: string): value is TemplateId {
332
+ return value in TEMPLATE_DESCRIPTIONS;
333
+ }
334
+
335
+ function printHelp(errorMessage?: string): void {
336
+ if (errorMessage) {
337
+ console.error(errorMessage);
338
+ console.error("");
339
+ }
340
+
341
+ console.log("Usage:");
342
342
  console.log(" spacekit <target-dir> [options]");
343
- console.log("");
344
- console.log("Options:");
345
- console.log(" --template <name> Template to use (default: lunar-rover)");
346
- console.log(" --list-templates Print the available templates");
347
- console.log(" --federation-name <name> Default federation name in .env");
348
- console.log(" --federate-name <name> Default federate name in .env");
349
- console.log(" --federate-type <type> Default federate type in .env");
350
- console.log(" --rti-host <host> Default RTI host in .env");
351
- console.log(" --rti-port <port> Default RTI port in .env");
352
- console.log(" --rti-use-tls Enable TLS in .env");
353
- console.log(" --parent-reference-frame <name> Parent frame for the rover entity");
354
- console.log(" --rover-name <name> Rover object instance name");
355
- console.log(" --rover-type <type> Rover object type");
356
- console.log(" --rover-speed-mps <value> Rover speed along the X axis");
357
- console.log(" --lookahead-micros <value> Spacekit lookahead");
358
- console.log(" --update-period-micros <value> Spacekit tick period");
359
- console.log(" --reference-frame-timeout-ms <ms> How long to wait for the frame tree");
360
- console.log(" --reference-frame-missing-mode <m> error | continue");
361
- console.log(" --workspace-deps Use workspace:* for @hla4ts/spacekit");
362
- console.log(" --yes, -y Skip prompts and use defaults/flags");
363
- console.log(" --help, -h Show this help text");
364
- }
343
+ console.log("");
344
+ console.log("Options:");
345
+ console.log(" --template <name> Template to use (default: lunar-rover)");
346
+ console.log(" --list-templates Print the available templates");
347
+ console.log(" --federation-name <name> Default federation name in .env");
348
+ console.log(" --federate-name <name> Default federate name in .env");
349
+ console.log(" --federate-type <type> Default federate type in .env");
350
+ console.log(" --rti-host <host> Default RTI host in .env");
351
+ console.log(" --rti-port <port> Default RTI port in .env");
352
+ console.log(" --rti-use-tls Enable TLS in .env");
353
+ console.log(" --parent-reference-frame <name> Parent frame for the rover entity");
354
+ console.log(" --rover-name <name> Rover object instance name");
355
+ console.log(" --rover-type <type> Rover object type");
356
+ console.log(" --rover-speed-mps <value> Rover speed along the X axis");
357
+ console.log(" --lookahead-micros <value> Spacekit lookahead");
358
+ console.log(" --update-period-micros <value> Spacekit tick period");
359
+ console.log(" --reference-frame-timeout-ms <ms> How long to wait for the frame tree");
360
+ console.log(" --reference-frame-missing-mode <m> error | continue");
361
+ console.log(" --workspace-deps Use workspace:* for @hla4ts/spacekit");
362
+ console.log(" --yes, -y Skip prompts and use defaults/flags");
363
+ console.log(" --help, -h Show this help text");
364
+ }