sessioncast-cli 2.0.8 → 2.0.9

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
@@ -26,6 +26,20 @@ Expand-Archive -Path "$env:TEMP\itmux.zip" -DestinationPath "C:\itmux" -Force
26
26
  npm install -g sessioncast-cli
27
27
  ```
28
28
 
29
+ #### Use PowerShell in tmux sessions (recommended)
30
+
31
+ By default, itmux opens sessions with bash. Sessions created by SessionCast automatically use PowerShell, but if you also want PowerShell when using itmux manually:
32
+
33
+ ```powershell
34
+ # Create tmux config to use PowerShell as default shell
35
+ $tmuxConf = "C:\itmux\home\$env:USERNAME\.tmux.conf"
36
+ New-Item -Path $tmuxConf -ItemType File -Force
37
+ Add-Content -Path $tmuxConf -Value 'set-option -g default-command "powershell.exe"'
38
+
39
+ # For PowerShell 7+ (pwsh), use this instead:
40
+ # Add-Content -Path $tmuxConf -Value 'set-option -g default-command "pwsh.exe"'
41
+ ```
42
+
29
43
  ## Quick Start
30
44
 
31
45
  ### 1. Login
@@ -117,7 +117,11 @@ class AgentRunner {
117
117
  ' Invoke-WebRequest -Uri "https://github.com/itefixnet/itmux/releases/download/v1.1.0/itmux_1.1.0_x64_free.zip" -OutFile "$env:TEMP\\itmux.zip"\n' +
118
118
  ' Expand-Archive -Path "$env:TEMP\\itmux.zip" -DestinationPath "C:\\itmux" -Force\n\n' +
119
119
  ' Or with Chocolatey:\n' +
120
- ' choco install itmux';
120
+ ' choco install itmux\n\n' +
121
+ ' PowerShell as default shell (recommended):\n' +
122
+ ' Sessions created by SessionCast automatically use PowerShell.\n' +
123
+ ' For manual itmux sessions, add to C:\\itmux\\home\\<username>\\.tmux.conf:\n' +
124
+ ' set-option -g default-command "powershell.exe"';
121
125
  }
122
126
  else if (platform === 'darwin') {
123
127
  installHint = ' Install: brew install tmux';
@@ -70,6 +70,10 @@ export declare class WindowsTmuxExecutor implements TmuxExecutor {
70
70
  getVersion(): string | null;
71
71
  getActivePane(session: string): string | null;
72
72
  getPaneCwd(session: string, paneId?: string): string | null;
73
+ /**
74
+ * Detect the best Windows shell available (PowerShell 7 > Windows PowerShell > bash).
75
+ */
76
+ private detectWindowsShell;
73
77
  private escapeSession;
74
78
  private windowsToCygwinPath;
75
79
  /**
@@ -368,6 +368,11 @@ class WindowsTmuxExecutor {
368
368
  else {
369
369
  cmd = `tmux new-session -d -s '${sanitized}'`;
370
370
  }
371
+ // Use PowerShell as default shell for Windows sessions
372
+ const shell = this.detectWindowsShell();
373
+ if (shell) {
374
+ cmd += ` '${shell}'`;
375
+ }
371
376
  this.executeCommand(cmd);
372
377
  return true;
373
378
  }
@@ -414,6 +419,18 @@ class WindowsTmuxExecutor {
414
419
  return null;
415
420
  }
416
421
  }
422
+ /**
423
+ * Detect the best Windows shell available (PowerShell 7 > Windows PowerShell > bash).
424
+ */
425
+ detectWindowsShell() {
426
+ // Prefer PowerShell 7+ (pwsh.exe), then Windows PowerShell (powershell.exe)
427
+ for (const shell of ['pwsh.exe', 'powershell.exe']) {
428
+ const result = this.executeCommand(`command -v ${shell} 2>/dev/null`);
429
+ if (result)
430
+ return shell;
431
+ }
432
+ return null;
433
+ }
417
434
  escapeSession(session) {
418
435
  return session.replace(/'/g, "'\\''");
419
436
  }
@@ -500,6 +517,11 @@ function createTmuxExecutor() {
500
517
  ' Quick install (PowerShell):\n' +
501
518
  ' Invoke-WebRequest -Uri "https://github.com/itefixnet/itmux/releases/download/v1.1.0/itmux_1.1.0_x64_free.zip" -OutFile "$env:TEMP\\itmux.zip"\n' +
502
519
  ' Expand-Archive -Path "$env:TEMP\\itmux.zip" -DestinationPath "C:\\itmux" -Force\n\n' +
520
+ ' PowerShell as default shell (recommended):\n' +
521
+ ' SessionCast automatically uses PowerShell for new sessions.\n' +
522
+ ' To also use PowerShell when opening itmux manually, create\n' +
523
+ ' C:\\itmux\\home\\<username>\\.tmux.conf with:\n' +
524
+ ' set-option -g default-command "powershell.exe"\n\n' +
503
525
  '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
504
526
  }
505
527
  return new WindowsTmuxExecutor(itmuxPath);
package/dist/index.js CHANGED
@@ -143,6 +143,10 @@ function showWelcome() {
143
143
  if (isWindows) {
144
144
  console.log(chalk_1.default.gray(' Install itmux: https://github.com/itefixnet/itmux'));
145
145
  console.log(chalk_1.default.gray(' Or: choco install itmux'));
146
+ console.log('');
147
+ console.log(chalk_1.default.gray(' Use PowerShell in itmux sessions:'));
148
+ console.log(chalk_1.default.gray(' Add to C:\\itmux\\home\\<username>\\.tmux.conf:'));
149
+ console.log(chalk_1.default.gray(' set-option -g default-command "powershell.exe"'));
146
150
  }
147
151
  else if (os.platform() === 'darwin') {
148
152
  console.log(chalk_1.default.gray(' Install: brew install tmux'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sessioncast-cli",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "SessionCast CLI - Control your agents from anywhere",
5
5
  "main": "dist/index.js",
6
6
  "bin": {