opencode-remote-control 0.2.2 → 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.
Files changed (3) hide show
  1. package/README.md +10 -11
  2. package/dist/cli.js +4 -20
  3. 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
- ## Quick Start
29
+ ## Configuration
30
30
 
31
- ### Telegram Setup
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
- On first run, you'll be prompted for a Telegram bot token:
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
- Run the config command for Feishu:
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() {
@@ -81,6 +79,7 @@ async function promptToken() {
81
79
  process.stdout.write('Enter your bot token: ');
82
80
  // Read from stdin
83
81
  const token = await new Promise((resolve) => {
82
+ process.stdin.resume();
84
83
  process.stdin.setEncoding('utf8');
85
84
  const cleanup = () => {
86
85
  process.stdin.pause();
@@ -115,6 +114,7 @@ async function promptFeishuConfig() {
115
114
  const promptInput = async (promptText) => {
116
115
  process.stdout.write(promptText);
117
116
  return new Promise((resolve) => {
117
+ process.stdin.resume();
118
118
  process.stdin.setEncoding('utf8');
119
119
  const cleanup = () => {
120
120
  process.stdin.pause();
@@ -327,17 +327,6 @@ async function runConfig() {
327
327
  }
328
328
  process.exit(0);
329
329
  }
330
- async function runConfigFeishu() {
331
- printBanner();
332
- const { appId, appSecret } = await promptFeishuConfig();
333
- if (!appId || !appSecret) {
334
- console.log('\n❌ Invalid credentials. Please try again.');
335
- process.exit(1);
336
- }
337
- await saveFeishuConfig(appId, appSecret);
338
- console.log('\n🚀 Ready! Run `opencode-remote` to start the bot.');
339
- process.exit(0);
340
- }
341
330
  function hasTelegramConfig(config) {
342
331
  return !!(config.telegramBotToken?.trim());
343
332
  }
@@ -353,9 +342,7 @@ async function runStart() {
353
342
  const hasFeishu = hasFeishuConfig(config);
354
343
  if (!hasTelegram && !hasFeishu) {
355
344
  console.log('❌ No bots configured!');
356
- console.log('\nRun one of:');
357
- console.log(' opencode-remote config # Configure Telegram');
358
- console.log(' opencode-remote config-feishu # Configure Feishu');
345
+ console.log('\nRun: opencode-remote config');
359
346
  process.exit(1);
360
347
  }
361
348
  // Track shutdown state
@@ -423,7 +410,7 @@ async function runFeishuOnly() {
423
410
  const config = await getConfig();
424
411
  if (!hasFeishuConfig(config)) {
425
412
  console.log('❌ Feishu bot not configured!');
426
- console.log('\nRun: opencode-remote config-feishu');
413
+ console.log('\nRun: opencode-remote config');
427
414
  process.exit(1);
428
415
  }
429
416
  printBanner();
@@ -452,9 +439,6 @@ switch (command) {
452
439
  case 'config':
453
440
  runConfig();
454
441
  break;
455
- case 'config-feishu':
456
- runConfigFeishu();
457
- break;
458
442
  case 'help':
459
443
  case '--help':
460
444
  case '-h':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-remote-control",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Control OpenCode from anywhere via Telegram or Feishu",
5
5
  "type": "module",
6
6
  "bin": {