opencode-remote-control 0.2.3 → 0.2.4
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 +10 -11
- package/dist/cli.js +2 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,11 +26,17 @@ pnpm install -g opencode-remote-control
|
|
|
26
26
|
bun install -g opencode-remote-control
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Configuration
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Run the config command to set up your preferred channel:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
opencode-remote config
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Select **Telegram** or **Feishu** and follow the interactive guide.
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
### Telegram Setup
|
|
34
40
|
|
|
35
41
|
1. Open Telegram, search **@BotFather**
|
|
36
42
|
2. Send `/newbot` and follow instructions
|
|
@@ -40,13 +46,7 @@ Token is saved to `~/.opencode-remote/.env`
|
|
|
40
46
|
|
|
41
47
|
### Feishu Setup
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
opencode-remote config-feishu
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Follow the interactive guide to configure your Feishu bot. For detailed setup instructions, see [Feishu Setup Guide](./docs/FEISHU_SETUP_EN.md) or [飞书配置指南](./docs/FEISHU_SETUP.md).
|
|
49
|
+
For detailed Feishu setup instructions, see [Feishu Setup Guide](./docs/FEISHU_SETUP_EN.md) or [飞书配置指南](./docs/FEISHU_SETUP.md).
|
|
50
50
|
|
|
51
51
|
## Usage
|
|
52
52
|
|
|
@@ -56,7 +56,6 @@ opencode-remote start # Start all configured bots
|
|
|
56
56
|
opencode-remote telegram # Start Telegram bot only
|
|
57
57
|
opencode-remote feishu # Start Feishu bot only
|
|
58
58
|
opencode-remote config # Configure a channel (interactive)
|
|
59
|
-
opencode-remote config-feishu # Configure Feishu directly
|
|
60
59
|
opencode-remote help # Show help
|
|
61
60
|
```
|
|
62
61
|
|
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,6 @@ Commands:
|
|
|
24
24
|
telegram Start Telegram bot only
|
|
25
25
|
feishu Start Feishu bot only
|
|
26
26
|
config Configure a channel (interactive selection)
|
|
27
|
-
config-feishu Configure Feishu bot directly
|
|
28
27
|
help Show this help message
|
|
29
28
|
|
|
30
29
|
Examples:
|
|
@@ -33,7 +32,6 @@ Examples:
|
|
|
33
32
|
opencode-remote telegram # Start Telegram only
|
|
34
33
|
opencode-remote feishu # Start Feishu only
|
|
35
34
|
opencode-remote config # Interactive channel selection
|
|
36
|
-
opencode-remote config-feishu # Configure Feishu directly
|
|
37
35
|
`);
|
|
38
36
|
}
|
|
39
37
|
async function promptChannel() {
|
|
@@ -329,17 +327,6 @@ async function runConfig() {
|
|
|
329
327
|
}
|
|
330
328
|
process.exit(0);
|
|
331
329
|
}
|
|
332
|
-
async function runConfigFeishu() {
|
|
333
|
-
printBanner();
|
|
334
|
-
const { appId, appSecret } = await promptFeishuConfig();
|
|
335
|
-
if (!appId || !appSecret) {
|
|
336
|
-
console.log('\n❌ Invalid credentials. Please try again.');
|
|
337
|
-
process.exit(1);
|
|
338
|
-
}
|
|
339
|
-
await saveFeishuConfig(appId, appSecret);
|
|
340
|
-
console.log('\n🚀 Ready! Run `opencode-remote` to start the bot.');
|
|
341
|
-
process.exit(0);
|
|
342
|
-
}
|
|
343
330
|
function hasTelegramConfig(config) {
|
|
344
331
|
return !!(config.telegramBotToken?.trim());
|
|
345
332
|
}
|
|
@@ -355,9 +342,7 @@ async function runStart() {
|
|
|
355
342
|
const hasFeishu = hasFeishuConfig(config);
|
|
356
343
|
if (!hasTelegram && !hasFeishu) {
|
|
357
344
|
console.log('❌ No bots configured!');
|
|
358
|
-
console.log('\nRun
|
|
359
|
-
console.log(' opencode-remote config # Configure Telegram');
|
|
360
|
-
console.log(' opencode-remote config-feishu # Configure Feishu');
|
|
345
|
+
console.log('\nRun: opencode-remote config');
|
|
361
346
|
process.exit(1);
|
|
362
347
|
}
|
|
363
348
|
// Track shutdown state
|
|
@@ -425,7 +410,7 @@ async function runFeishuOnly() {
|
|
|
425
410
|
const config = await getConfig();
|
|
426
411
|
if (!hasFeishuConfig(config)) {
|
|
427
412
|
console.log('❌ Feishu bot not configured!');
|
|
428
|
-
console.log('\nRun: opencode-remote config
|
|
413
|
+
console.log('\nRun: opencode-remote config');
|
|
429
414
|
process.exit(1);
|
|
430
415
|
}
|
|
431
416
|
printBanner();
|
|
@@ -454,9 +439,6 @@ switch (command) {
|
|
|
454
439
|
case 'config':
|
|
455
440
|
runConfig();
|
|
456
441
|
break;
|
|
457
|
-
case 'config-feishu':
|
|
458
|
-
runConfigFeishu();
|
|
459
|
-
break;
|
|
460
442
|
case 'help':
|
|
461
443
|
case '--help':
|
|
462
444
|
case '-h':
|