@vclawhub/vclaw 0.2.5 → 0.2.7

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 CHANGED
@@ -156,11 +156,7 @@ Detects your OS/arch, downloads NATS server, pi.dev CLI, vclaw binary, and the `
156
156
 
157
157
  ### Option B: From source
158
158
 
159
- ```bash
160
- git clone https://github.com/chatek/vclaw-agent.git
161
- cd vclaw-agent
162
- ./install.sh
163
- ```
159
+ Source will be published at `https://github.com/chatek` — check back soon.
164
160
 
165
161
  ### Option C: Manual component install
166
162
 
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+
4
+ // src/cli.bun.ts
5
+ var {$ } = globalThis.Bun;
6
+ var PROJECT_ROOT = import.meta.dirname + "/..";
7
+ var HELP = `
8
+ VClaw Agent \u2014 Local Agentic Mesh Wrapper
9
+
10
+ Usage:
11
+ bunx @vclawhub/vclaw install Install the full stack
12
+ bunx @vclawhub/vclaw up Launch NATS + pi-web.dev
13
+ bunx @vclawhub/vclaw up --onboard <email> Launch + join vchat.email
14
+ bunx @vclawhub/vclaw up --uninstall Remove everything
15
+ bunx @vclawhub/vclaw onboard <email> Join the vchat.email network
16
+ bunx @vclawhub/vclaw help Show this message
17
+
18
+ Examples:
19
+ bunx @vclawhub/vclaw install
20
+ bunx @vclawhub/vclaw up
21
+ bunx @vclawhub/vclaw up --onboard alice@example.com
22
+ `;
23
+ var cmd = process.argv[2]?.toLowerCase();
24
+ switch (cmd) {
25
+ case "install": {
26
+ const localScript = `${PROJECT_ROOT}/install.sh`;
27
+ const { exitCode } = await $`test -f ${localScript}`.quiet();
28
+ if (exitCode === 0) {
29
+ console.log("\uD83D\uDCE6 Running local install.sh...");
30
+ await $`bash ${localScript}`;
31
+ } else {
32
+ console.log("\uD83D\uDCE6 Fetching installer from vclawhub.com...");
33
+ await $`curl -fsSL https://vclawhub.com/install | sh`;
34
+ }
35
+ break;
36
+ }
37
+ case "up": {
38
+ const onboardFlag = process.argv.indexOf("--onboard");
39
+ let email = "";
40
+ if (onboardFlag !== -1 && process.argv[onboardFlag + 1]) {
41
+ email = process.argv[onboardFlag + 1];
42
+ }
43
+ const localScript = `${PROJECT_ROOT}/vclaw-up`;
44
+ const uninstallFlag = process.argv.indexOf("--uninstall");
45
+ const { exitCode } = await $`test -f ${localScript}`.quiet();
46
+ if (exitCode === 0 && uninstallFlag !== -1) {
47
+ console.log("\uD83E\uDDF9 Uninstalling VClaw Hub...");
48
+ await $`bash ${localScript} --uninstall`;
49
+ process.exit(0);
50
+ } else if (exitCode === 0 && email) {
51
+ console.log("\uD83D\uDE80 Launching stack and joining vchat.email network...");
52
+ await $`bash ${localScript} --onboard ${email}`;
53
+ } else if (exitCode === 0) {
54
+ console.log("\uD83D\uDE80 Launching local agentic mesh...");
55
+ await $`bash ${localScript}`;
56
+ } else if (email) {
57
+ console.log("\uD83D\uDE80 Starting NATS server...");
58
+ const natsServer = Bun.which("nats-server");
59
+ if (!natsServer) {
60
+ console.error("\u274C nats-server not found. Run 'vclaw-agent install' first.");
61
+ process.exit(1);
62
+ }
63
+ const dataDir = `${process.env.HOME}/.local/share/vclaw`;
64
+ await $`mkdir -p ${dataDir}/nats-data`;
65
+ await $`nats-server --port 4222 --jetstream --store_dir ${dataDir}/nats-data > ${dataDir}/nats-server.log 2>&1 &`.quiet();
66
+ console.log(" \u2714 NATS server started on 127.0.0.1:4222");
67
+ const piUrl = "https://pi-web.dev/?connect=127.0.0.1:4222";
68
+ await $`bunx open ${piUrl}`.quiet().catch(() => {});
69
+ console.log(` \u2714 Browser opened to ${piUrl}`);
70
+ console.log(`
71
+ \uD83D\uDCE1 Onboarding to vchat.email...`);
72
+ await $`bunx @vchatemail/agent ensoul --email ${email}`;
73
+ } else {
74
+ console.error("\u274C vclaw-up not found. Run 'vclaw-agent install' first.");
75
+ process.exit(1);
76
+ }
77
+ break;
78
+ }
79
+ case "onboard": {
80
+ const email = process.argv[3];
81
+ if (!email) {
82
+ console.error("\u274C Usage: bunx @vclawhub/vclaw onboard <email>");
83
+ process.exit(1);
84
+ }
85
+ console.log(`\uD83D\uDCE1 Joining vchat.email network as ${email}...`);
86
+ await $`bunx @vchatemail/agent ensoul --email ${email}`;
87
+ break;
88
+ }
89
+ case "help":
90
+ case "--help":
91
+ case "-h":
92
+ default:
93
+ console.log(HELP);
94
+ break;
95
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vclawhub/vclaw",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "VClaw Agent — one-command setup for pi.dev + pi-web.dev + NATS leaf node + vchat.email network",
@@ -17,7 +17,7 @@
17
17
  "license": "MIT",
18
18
  "repository": {
19
19
  "type": "git",
20
- "url": "git+https://github.com/chatek/vclaw-agent.git"
20
+ "url": "git+https://github.com/chatek.git"
21
21
  },
22
22
  "bugs": {
23
23
  "url": "https://github.com/chatek/vclaw-agent/issues"
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "files": [
30
30
  "dist/cli.js",
31
+ "dist/cli.bun.js",
31
32
  "install.sh",
32
33
  "vclaw-up",
33
34
  "config/nats-leaf.conf",