@metatell/bot-cli 0.0.4 → 0.0.6

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
@@ -1,63 +1,89 @@
1
- # @metatell/cli
1
+ # @metatell/bot-cli
2
2
 
3
- CLI tool for Metatell bot development and testing.
3
+ MetaTell Bot 開発とテスト用の CLI ツール。
4
4
 
5
- ## Installation
5
+ ## 必要要件
6
+
7
+ - Node.js 20 以上(推奨: 22+)
8
+
9
+ ## インストール
6
10
 
7
11
  ```bash
8
- npm install -g @metatell/cli
9
- ```
12
+ # グローバルインストール
13
+ npm install -g @metatell/bot-cli
10
14
 
11
- ## Usage
15
+ # または npx で実行
16
+ npx @metatell/bot-cli <command>
12
17
 
13
- ### Interactive Mode (Default)
18
+ # または開発依存として
19
+ npm install --save-dev @metatell/bot-cli
20
+ ```
21
+
22
+ ## 使い方
14
23
 
15
24
  ```bash
16
- # 未ログインで入室
25
+ # インタラクティブモード(デフォルト)
17
26
  metatell-cli https://metatell.app/ROOM_ID
18
27
 
19
- # ログイン済みユーザーとして入室
28
+ # 認証トークン付き
20
29
  metatell-cli https://metatell.app/ROOM_ID -t "your-auth-token"
21
- ```
22
30
 
23
- Interactive mode provides:
24
- - Real-time event monitoring
25
- - Simple chat interface
26
- - Commands: `status`, `users`, `quit`
31
+ # カスタムボット名
32
+ metatell-cli https://metatell.app/ROOM_ID -n "MyBot"
27
33
 
28
- ### Connect Command
34
+ # デバッグログ有効
35
+ metatell-cli https://metatell.app/ROOM_ID -d
36
+ ```
37
+
38
+ ## コマンド
29
39
 
30
- Quick connection test:
40
+ ### インタラクティブモード
31
41
 
32
42
  ```bash
33
- # 未ログインで接続テスト
34
- metatell-cli connect https://metatell.app/ROOM_ID
43
+ metatell-cli https://metatell.app/ROOM_ID [options]
44
+ # または
45
+ metatell-cli interactive https://metatell.app/ROOM_ID [options]
35
46
  ```
36
47
 
37
- ### Inspect Command
48
+ **利用可能なコマンド:**
49
+ - `/say <message>` — チャットメッセージ送信
50
+ - `/move <x> <y> <z>` — アバター移動
51
+ - `/look <x> <y> <z>` または `/look @<username>` — 指定座標/ユーザーを見る
52
+ - `/nearby [radius]` — 近傍ユーザーを表示(既定 10m)
53
+ - `/users` — ルーム内の全ユーザーを表示
54
+ - `/status` — 接続状態を表示
55
+ - `/info` — ボット情報を表示
56
+ - `/avatar <id>` — アバターを変更
57
+ - `/assets` — 利用可能なアバター一覧
58
+ - `/anime <name>` または `/animation <name>` — アニメーション再生
59
+ - `/animations` — 利用可能なアニメーション一覧
60
+ - `/stop` — アニメーション停止(アイドルに戻す)
61
+ - `quit` / `exit` — 終了
62
+
63
+ ### 接続テストコマンド
64
+
65
+ ```bash
66
+ metatell-cli connect https://metatell.app/ROOM_ID [options]
67
+ ```
38
68
 
39
- Room inspection and monitoring:
69
+ ### ルーム検査コマンド
40
70
 
41
71
  ```bash
42
- # ルーム情報の確認
43
- metatell-cli inspect https://metatell.app/ROOM_ID
72
+ metatell-cli inspect https://metatell.app/ROOM_ID [options]
44
73
  ```
45
74
 
46
- ### Options
75
+ ## オプション
47
76
 
48
- - `-t, --token <token>`: Authentication token (optional - 未ログインでも入室可能)
49
- - `-n, --name <name>`: Bot display name (interactive mode)
50
- - `-d, --debug`: Enable debug logging
77
+ | オプション | エイリアス | 説明 | デフォルト |
78
+ |--------|-------|-------------|---------|
79
+ | `--token` | `-t` | 認証トークン(任意) | `METATELL_TOKEN` 環境変数 |
80
+ | `--name` | `-n` | ボット表示名 | "MetatellCLI" |
81
+ | `--debug` | `-d` | デバッグログ有効 | false |
51
82
 
52
- ### Environment Variables
83
+ ## 環境変数
53
84
 
54
- - `METATELL_TOKEN`: Default authentication token (optional)
85
+ - `METATELL_TOKEN` デフォルト認証トークン(任意)
55
86
 
56
- ## Features
87
+ ## License
57
88
 
58
- - Simple connection testing
59
- - Room state inspection
60
- - Interactive command-line interface
61
- - User presence monitoring
62
- - Message activity tracking
63
- - Clean implementation using SDK facade API
89
+ MIT
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,qBAAa,aAAa;IAClB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAuD5E,OAAO,CAAC,QAAQ;YAuBF,GAAG;YAWH,IAAI;YAkBJ,IAAI;YAwCJ,MAAM;YAiBN,SAAS;IASvB,OAAO,CAAC,UAAU;YAYJ,QAAQ;YAWR,YAAY;YAWZ,UAAU;YAWV,aAAa;YAuBb,aAAa;YAeb,cAAc;CAW7B"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,qBAAa,aAAa;IAClB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAuD5E,OAAO,CAAC,QAAQ;YAuBF,GAAG;YAWH,IAAI;YAkBJ,IAAI;YAwCJ,MAAM;YAiBN,SAAS;IASvB,OAAO,CAAC,UAAU;YAYJ,QAAQ;YAWR,YAAY;YAoBZ,UAAU;YAWV,aAAa;YAuBb,aAAa;YAeb,cAAc;CAW7B"}
@@ -247,7 +247,7 @@ var CommandParser = /** @class */ (function () {
247
247
  };
248
248
  CommandParser.prototype.changeAvatar = function (args, client) {
249
249
  return __awaiter(this, void 0, void 0, function () {
250
- var avatarId;
250
+ var avatarId, error_1, errorMessage;
251
251
  return __generator(this, function (_a) {
252
252
  switch (_a.label) {
253
253
  case 0:
@@ -255,11 +255,23 @@ var CommandParser = /** @class */ (function () {
255
255
  return [2 /*return*/, { success: false, message: 'Usage: /avatar <id>' }];
256
256
  }
257
257
  avatarId = args[0];
258
- return [4 /*yield*/, client.avatar.select(avatarId)];
258
+ _a.label = 1;
259
259
  case 1:
260
+ _a.trys.push([1, 3, , 4]);
261
+ return [4 /*yield*/, client.avatar.select(avatarId)];
262
+ case 2:
260
263
  _a.sent();
261
264
  console.log("[Avatar changed to] ".concat(avatarId));
262
265
  return [2 /*return*/, { success: true }];
266
+ case 3:
267
+ error_1 = _a.sent();
268
+ errorMessage = error_1 instanceof Error ? error_1.message : 'Unknown error';
269
+ console.error('[Error]', errorMessage);
270
+ return [2 /*return*/, {
271
+ success: false,
272
+ message: "Failed to change avatar: ".concat(errorMessage),
273
+ }];
274
+ case 4: return [2 /*return*/];
263
275
  }
264
276
  });
265
277
  });
@@ -283,7 +295,7 @@ var CommandParser = /** @class */ (function () {
283
295
  };
284
296
  CommandParser.prototype.playAnimation = function (args, client) {
285
297
  return __awaiter(this, void 0, void 0, function () {
286
- var animationName, error_1;
298
+ var animationName, error_2;
287
299
  return __generator(this, function (_a) {
288
300
  switch (_a.label) {
289
301
  case 0:
@@ -304,10 +316,10 @@ var CommandParser = /** @class */ (function () {
304
316
  console.log("[Playing animation] ".concat(animationName));
305
317
  return [2 /*return*/, { success: true }];
306
318
  case 3:
307
- error_1 = _a.sent();
319
+ error_2 = _a.sent();
308
320
  return [2 /*return*/, {
309
321
  success: false,
310
- message: "Failed to play animation: ".concat(error_1 instanceof Error ? error_1.message : 'Unknown error'),
322
+ message: "Failed to play animation: ".concat(error_2 instanceof Error ? error_2.message : 'Unknown error'),
311
323
  }];
312
324
  case 4: return [2 /*return*/];
313
325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metatell/bot-cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "CLI tool for Metatell bot development and testing",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,7 @@
20
20
  "commander": "^12.0.0",
21
21
  "ink": "^5.0.1",
22
22
  "react": "^18.3.1",
23
- "@metatell/bot-sdk": "0.0.4"
23
+ "@metatell/bot-sdk": "0.0.6"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^22.0.0",