# Windows Setup

## Install and run

Install Node.js 22.19.0 or newer, then run this in PowerShell or Command Prompt:

```powershell
npm install -g @selesai/code
sai
```

npm installs both `sai` and `selesai`, including `.cmd` launchers for Command Prompt and `.ps1` launchers for PowerShell. Both commands use the same options, settings, and sessions; no manual alias is required.

```powershell
sai -c
sai -p "Review this diff"
selesai --version
sai --version
```

The alias is available after installing a version containing it. To try a source checkout before publication, run `npm install -g .` from the repository root.

If PowerShell blocks `sai.ps1` because of its execution policy, use `sai.cmd` instead. This does not require changing your execution policy.

If the command is not found, ensure the global npm prefix (shown by `npm prefix -g`, normally `%APPDATA%\npm`) is on your user `PATH`, then reopen your terminal.

## Bash shell

Selesai requires a bash shell for its bash tool on Windows. Checked locations (in order):

1. Custom path from `~/.selesai/agent/settings.json`
2. Git Bash (`C:\Program Files\Git\bin\bash.exe`)
3. `bash.exe` on PATH (Cygwin, MSYS2, WSL)

For most users, [Git for Windows](https://git-scm.com/download/win) is sufficient.

### Custom shell path

```json
{
  "shellPath": "C:\\cygwin64\\bin\\bash.exe"
}
```
