@chrysb/alphaclaw 0.1.1 → 0.1.2
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/alphaclaw.js +11 -0
- package/package.json +1 -1
package/bin/alphaclaw.js
CHANGED
|
@@ -13,16 +13,27 @@ const { execSync } = require("child_process");
|
|
|
13
13
|
const args = process.argv.slice(2);
|
|
14
14
|
const command = args.find((a) => !a.startsWith("-"));
|
|
15
15
|
|
|
16
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"));
|
|
17
|
+
|
|
18
|
+
if (args.includes("--version") || args.includes("-v") || command === "version") {
|
|
19
|
+
console.log(pkg.version);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
if (!command || command === "help" || args.includes("--help")) {
|
|
17
24
|
console.log(`
|
|
25
|
+
alphaclaw v${pkg.version}
|
|
26
|
+
|
|
18
27
|
Usage: alphaclaw <command> [options]
|
|
19
28
|
|
|
20
29
|
Commands:
|
|
21
30
|
start Start the AlphaClaw server (Setup UI + gateway manager)
|
|
31
|
+
version Print version
|
|
22
32
|
|
|
23
33
|
Options:
|
|
24
34
|
--root-dir <path> Persistent data directory (default: ~/.alphaclaw)
|
|
25
35
|
--port <number> Server port (default: 3000)
|
|
36
|
+
--version, -v Print version
|
|
26
37
|
--help Show this help message
|
|
27
38
|
`);
|
|
28
39
|
process.exit(0);
|