session-steward 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/bin/session-steward.mjs +23 -2
- package/package.json +1 -1
package/bin/session-steward.mjs
CHANGED
|
@@ -9,15 +9,36 @@ import { findAvailableUpdate, formatUpdateNotice } from "../lib/update-check.mjs
|
|
|
9
9
|
|
|
10
10
|
assertSupportedNode();
|
|
11
11
|
|
|
12
|
-
const { startLocalServer } = await import("../lib/server.mjs");
|
|
13
|
-
|
|
14
12
|
const { values } = parseArgs({
|
|
13
|
+
allowPositionals: false,
|
|
15
14
|
options: {
|
|
16
15
|
"codex-home": { type: "string" },
|
|
16
|
+
help: { short: "h", type: "boolean" },
|
|
17
17
|
"no-open": { type: "boolean", default: false },
|
|
18
18
|
port: { type: "string" },
|
|
19
|
+
version: { short: "v", type: "boolean" },
|
|
19
20
|
},
|
|
20
21
|
});
|
|
22
|
+
|
|
23
|
+
if (values.help) {
|
|
24
|
+
process.stdout.write(`Usage: session-steward [options]
|
|
25
|
+
|
|
26
|
+
Options:
|
|
27
|
+
--codex-home <path> Use a custom Codex session folder
|
|
28
|
+
--port <number> Use a specific local port
|
|
29
|
+
--no-open Start without opening a browser
|
|
30
|
+
-h, --help Show this help
|
|
31
|
+
-v, --version Show the installed version
|
|
32
|
+
`);
|
|
33
|
+
process.exit(0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (values.version) {
|
|
37
|
+
process.stdout.write(`${packageMetadata.version}\n`);
|
|
38
|
+
process.exit(0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const { startLocalServer } = await import("../lib/server.mjs");
|
|
21
42
|
const port = values.port === undefined ? 0 : Number.parseInt(values.port, 10);
|
|
22
43
|
const availableUpdate = await findAvailableUpdate({ packageMetadata });
|
|
23
44
|
|