@ekkos/cli 0.2.0 → 0.2.2

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.
@@ -731,15 +731,54 @@ async function runWithSpawn(claudePath, args, options, state) {
731
731
  console.log('');
732
732
  let claude;
733
733
  if (isWindows) {
734
- // On Windows, spawn Claude directly (no script equivalent)
735
- // PTY features may be limited
736
- console.log(chalk_1.default.gray('Windows mode: running Claude directly'));
737
- claude = (0, child_process_1.spawn)(claudePath, args, {
738
- stdio: ['inherit', 'pipe', 'inherit'],
739
- cwd: process.cwd(),
740
- env: process.env,
741
- shell: true
742
- });
734
+ // On Windows, Node.js spawn doesn't provide proper TTY support
735
+ // Claude Code detects non-TTY and defaults to --print mode
736
+ // Solution: Use cmd.exe /c to run claude directly with proper console
737
+ if (claudePath === 'npx') {
738
+ console.log('');
739
+ console.log(chalk_1.default.red('═══════════════════════════════════════════════════════════════════'));
740
+ console.log(chalk_1.default.red(' Windows requires Claude Code to be installed globally'));
741
+ console.log(chalk_1.default.red('═══════════════════════════════════════════════════════════════════'));
742
+ console.log('');
743
+ console.log(chalk_1.default.yellow(' Run this command first:'));
744
+ console.log(chalk_1.default.cyan(' npm install -g @anthropic-ai/claude-code'));
745
+ console.log('');
746
+ console.log(chalk_1.default.yellow(' Then try again:'));
747
+ console.log(chalk_1.default.cyan(' ekkos run -b'));
748
+ console.log('');
749
+ process.exit(1);
750
+ }
751
+ console.log(chalk_1.default.gray('Windows mode: launching Claude with proper TTY...'));
752
+ // Build the full command
753
+ const fullCmd = args.length > 0
754
+ ? `"${claudePath}" ${args.join(' ')}`
755
+ : `"${claudePath}"`;
756
+ // Use cmd.exe /c to get proper console behavior
757
+ // This replaces the current process with claude
758
+ const { spawnSync } = require('child_process');
759
+ // First try: Direct exec replacement
760
+ try {
761
+ const result = spawnSync('cmd.exe', ['/c', fullCmd], {
762
+ stdio: 'inherit',
763
+ cwd: process.cwd(),
764
+ env: process.env,
765
+ windowsHide: false,
766
+ shell: false
767
+ });
768
+ // If we get here, claude exited
769
+ (0, state_1.clearAutoClearFlag)();
770
+ process.exit(result.status || 0);
771
+ }
772
+ catch (err) {
773
+ console.error(chalk_1.default.red('Failed to launch Claude:'), err.message);
774
+ console.log('');
775
+ console.log(chalk_1.default.yellow('Try running claude directly:'));
776
+ console.log(chalk_1.default.cyan(' claude'));
777
+ console.log('');
778
+ process.exit(1);
779
+ }
780
+ // This line won't be reached due to spawnSync + process.exit
781
+ return;
743
782
  }
744
783
  else {
745
784
  // Use script command for PTY on Unix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekkos/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {