@dmsdc-ai/aigentry-telepty 0.0.11 → 0.0.12

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 +3 -3
  2. package/cli.js +39 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  `telepty` (Tele-Prompt) is a lightweight background daemon that bridges the gap between the network and interactive AI command-line interfaces. It allows you to seamlessly share, attach to, and inject commands into terminal sessions across different machines.
6
6
 
7
- ## One-Click Installation
7
+ ## One-Click Installation & Update
8
8
 
9
- To install and set up `telepty` on any machine (macOS, Linux, or Windows). These scripts will automatically install Node.js if it is missing from your system.
9
+ To install or update `telepty` on any machine (macOS, Linux, or Windows), just run the command for your OS. (Node.js will be automatically installed if you don't have it).
10
10
 
11
11
  ### For macOS and Linux (Ubuntu, CentOS, etc.)
12
12
  Open your terminal and run:
@@ -15,7 +15,7 @@ curl -fsSL https://raw.githubusercontent.com/dmsdc-ai/aigentry-telepty/main/inst
15
15
  ```
16
16
 
17
17
  ### For Windows (PowerShell)
18
- Open PowerShell and run:
18
+ Open PowerShell as Administrator and run:
19
19
  ```powershell
20
20
  iwr -useb https://raw.githubusercontent.com/dmsdc-ai/aigentry-telepty/main/install.ps1 | iex
21
21
  ```
package/cli.js CHANGED
@@ -93,10 +93,27 @@ async function manageInteractive() {
93
93
  { title: '➕ Create a new room (Spawn session)', value: 'spawn' },
94
94
  { title: '💬 Send message to a room (Inject command)', value: 'inject' },
95
95
  { title: '📋 View all open rooms (List sessions)', value: 'list' },
96
+ { title: '🔄 Update telepty to latest version', value: 'update' },
96
97
  { title: '❌ Exit', value: 'exit' }
97
98
  ]
98
99
  });
99
100
 
101
+ if (response.action === 'update') {
102
+ console.log('\n\x1b[36m🔄 Updating telepty to the latest version...\x1b[0m');
103
+ try {
104
+ execSync('npm install -g @dmsdc-ai/aigentry-telepty@latest', { stdio: 'inherit' });
105
+ console.log('\n\x1b[32m✅ Update complete! Restarting daemon...\x1b[0m');
106
+ try {
107
+ const os = require('os');
108
+ if (os.platform() === 'win32') execSync('taskkill /IM node.exe /FI "WINDOWTITLE eq telepty daemon*" /F', { stdio: 'ignore' });
109
+ else execSync('pkill -f "telepty daemon"', { stdio: 'ignore' });
110
+ } catch(e) {}
111
+ } catch (e) {
112
+ console.error('\n❌ Update failed.\n');
113
+ }
114
+ process.exit(0);
115
+ }
116
+
100
117
  if (!response.action || response.action === 'exit') {
101
118
  console.log('Goodbye!');
102
119
  process.exit(0);
@@ -226,7 +243,27 @@ async function main() {
226
243
  return manageInteractive();
227
244
  }
228
245
 
229
- if (cmd === 'mcp') {
246
+ if (cmd === 'update') {
247
+ console.log('\x1b[36m🔄 Updating telepty to the latest version...\x1b[0m');
248
+ try {
249
+ execSync('npm install -g @dmsdc-ai/aigentry-telepty@latest', { stdio: 'inherit' });
250
+ console.log('\n\x1b[32m✅ Update complete! Restarting daemon...\x1b[0m');
251
+
252
+ // Kill local daemon if running, so it auto-restarts on next command
253
+ try {
254
+ if (os.platform() === 'win32') {
255
+ execSync('taskkill /IM node.exe /FI "WINDOWTITLE eq telepty daemon*" /F', { stdio: 'ignore' });
256
+ } else {
257
+ execSync('pkill -f "telepty daemon"', { stdio: 'ignore' });
258
+ }
259
+ } catch (e) {} // Ignore if not running
260
+
261
+ console.log('🎉 You are now using the latest version.');
262
+ } catch (e) {
263
+ console.error('\n❌ Update failed. Please try running: npm install -g @dmsdc-ai/aigentry-telepty@latest');
264
+ }
265
+ return;
266
+ }
230
267
  require('./mcp.js');
231
268
  return;
232
269
  }
@@ -424,6 +461,7 @@ Usage:
424
461
  telepty inject <id> "<prompt>" Inject text into a single session
425
462
  telepty multicast <id1,id2> "<prompt>" Inject text into multiple specific sessions
426
463
  telepty broadcast "<prompt>" Inject text into ALL active sessions
464
+ telepty update Update telepty to the latest version
427
465
  telepty mcp Start the MCP stdio server
428
466
  `);
429
467
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aigentry-telepty",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "main": "daemon.js",
5
5
  "bin": {
6
6
  "telepty": "cli.js",