CliAI started on Linux and macOS, where the assumption is bash or zsh and a Unix-style fork-exec for handoff. The Windows path is genuinely different: there is no $SHELL, the shell launcher comes from $COMSPEC (or your terminal explicitly opens pwsh.exe), and the commands themselves are different. We treated parity as a real product goal, not a checkbox.
What "parity" means here
It does not mean translating Unix commands to Windows. It means the same English prompt produces the right command for whichever shell you're standing in. Ask for "list listening ports" on Linux and you'll see ss -ltnp; ask the same on Windows in PowerShell and you'll see Get-NetTCPConnection.
PS C:\> clai list listening TCP ports with the process name→ Get-NetTCPConnection -State Listen ` | Select-Object LocalAddress, LocalPort, @{N='Process';E={(Get-Process -Id $_.OwningProcess).ProcessName}}LocalAddress LocalPort Process0.0.0.0 80 nginx0.0.0.0 443 nginx
Three more PowerShell examples
Find files larger than 100 MB
PS C:\> clai find files larger than 100 MB under D:\projects→ Get-ChildItem -Path D:\projects -Recurse -File ` | Where-Object { $_.Length -gt 100MB } ` | Sort-Object Length -Descending ` | Select-Object FullName, Length
Kill the process holding a port
PS C:\> clai kill the process listening on port 8080→ Stop-Process -Id (Get-NetTCPConnection -LocalPort 8080).OwningProcess -Force[Safety: CAUTION] — sends SIGKILL equivalent.
Tail a log file
PS C:\> clai tail the last 100 lines of C:\app\error.log and follow→ Get-Content -Path C:\app\error.log -Tail 100 -Wait
What's different under the hood
When you press Enter to run, CliAI:
- Reads
$COMSPEC(defaults tocmd.exe) on Windows, falls back topwsh.exeif you're in a PowerShell host. - Spawns the shell with the generated command as an argument — there's no
fork/execmodel on Windows. - The command runs in your current console, with your environment, working directory, and PSReadLine history.
What still doesn't work the same
- Stdin piping into clai itself has minor differences; in particular, ANSI color stripping behaves differently in legacy
cmd. Use Windows Terminal or pwsh for the smoothest experience. - Path expansion. Drag-and-dropped paths with spaces still need quoting. CliAI quotes the generated command but you should pass the source path quoted.
See also
- Introducing CliAI — install on any platform.
- The download page for the Windows-native installer.