Problem
Windows users cannot currently install and run Ourocode from PowerShell using the documented release path.
The public quick start only documents:
curl -fsSL https://raw.githubusercontent.com/Q00/ourocode/release/bootstrap/install.sh | bash
That path assumes a Unix shell and Unix release layout. On Windows PowerShell, the install and launch path needs a native convention: a Windows release zip, a PowerShell installer/bootstrap, a .cmd command shim, and an explicit Erlang/OTP prerequisite check until runtime bundling is designed.
This is not asking for a fully self-contained Windows executable as the first step. The first milestone should make a normal PowerShell install and basic ourocode startup work, with interactive TUI parity tracked separately where needed.
Current evidence
Installer and release packaging:
install.sh requires Bash, uname, tar, chmod, ~/.local/ourocode, and ~/.local/bin.
install.sh only maps darwin and linux; Windows exits as unsupported.
scripts/package.sh creates .tar.gz release artifacts only.
- README and the docs site advertise
curl ... install.sh | bash as the install path.
Escript launch behavior:
mix.exs builds an escript with escript: [main_module: Ourocode.CLI].
- On Windows, an escript should be invoked through
escript.exe <script> or through a Windows-safe release entrypoint, rather than assumed to be directly executable like a Unix script.
TUI helper behavior:
rust/ourocode_ipc/src/bin/ourocode_tty.rs uses Unix-only APIs including libc::termios, tcsetattr, sigaction, ioctl, and TIOCGWINSZ.
- A Windows build of the helper fails around those Unix-only
libc APIs.
lib/ourocode/terminal/tty_driver.ex searches for ourocode_tty paths and relies on OUROCODE_TTY injection for installed layouts; Windows should account for ourocode_tty.exe and graceful fallback.
Desired UX
A Windows user should be able to install from PowerShell without Git Bash or WSL:
iwr https://raw.githubusercontent.com/Q00/ourocode/release/bootstrap/install.ps1 -UseB | iex
ourocode --detect
ourocode --help
A first pass can require Erlang/OTP on PATH, but the installer should detect that prerequisite and fail with clear instructions when erl / escript.exe is missing.
Interactive TUI startup should either work in Windows Terminal / PowerShell or fall back gracefully until a Windows terminal backend is implemented.
Proposed scope
Add a Windows-native install and launch convention:
- Produce a Windows release zip, for example
ourocode-v<version>-windows-x64.zip.
- Include a Windows command shim such as
bin/ourocode.cmd.
- Add a PowerShell installer/bootstrap that:
- resolves release metadata,
- downloads the Windows zip,
- verifies SHA256 with
Get-FileHash,
- installs into
%LOCALAPPDATA%\Ourocode\<version>,
- creates or updates a stable
%LOCALAPPDATA%\Ourocode\bin shim,
- updates the user PATH through
[Environment]::SetEnvironmentVariable, avoiding setx PATH truncation issues,
- checks for
erl / escript.exe and prints prerequisite guidance.
- Make the launcher invoke
escript.exe <script> or an equivalent Windows-safe release entrypoint.
- Split
ourocode_tty by platform with cfg(unix) / cfg(windows).
- For Windows TUI support, prefer a
crossterm-based backend first; use windows-sys only where direct console APIs are needed.
- Ensure missing or unsupported TUI helper behavior degrades to a plain renderer instead of crashing.
Acceptance criteria
- A Windows release asset exists as
ourocode-v<version>-windows-x64.zip.
- The zip contains a Windows launcher, for example
bin/ourocode.cmd.
- A PowerShell installer can install the zip into
%LOCALAPPDATA%\Ourocode\<version>.
- The installer verifies the downloaded asset with SHA256.
- The installer creates or updates a stable user PATH shim under
%LOCALAPPDATA%\Ourocode\bin.
ourocode runs from a fresh PowerShell session after install.
- The launcher invokes
escript.exe <script> or an equivalent Windows-safe release entrypoint.
- Missing Erlang/OTP produces a clear prerequisite message with installation guidance.
ourocode_tty.exe is either built with a Windows backend or the app falls back gracefully without crashing.
- Manual QA evidence is captured for PowerShell, Windows Terminal, and cmd.exe.
Non-goals for the first PR
- Shipping a single self-contained Windows executable.
- Bundling Erlang/OTP before the package size and runtime update story are designed.
- Supporting Scoop, winget, Chocolatey, or MSIX before the GitHub Release zip path works.
- Replacing the Unix installer or changing the macOS/Linux release flow.
- Implementing full ConPTY/process-hosting behavior unless the simpler console backend is insufficient.
Related files
install.sh
scripts/package.sh
README.md
docs/site/index.html
mix.exs
lib/ourocode/terminal/tty_driver.ex
rust/ourocode_ipc/src/bin/ourocode_tty.rs
Problem
Windows users cannot currently install and run Ourocode from PowerShell using the documented release path.
The public quick start only documents:
curl -fsSL https://raw.githubusercontent.com/Q00/ourocode/release/bootstrap/install.sh | bashThat path assumes a Unix shell and Unix release layout. On Windows PowerShell, the install and launch path needs a native convention: a Windows release zip, a PowerShell installer/bootstrap, a
.cmdcommand shim, and an explicit Erlang/OTP prerequisite check until runtime bundling is designed.This is not asking for a fully self-contained Windows executable as the first step. The first milestone should make a normal PowerShell install and basic
ourocodestartup work, with interactive TUI parity tracked separately where needed.Current evidence
Installer and release packaging:
install.shrequires Bash,uname,tar,chmod,~/.local/ourocode, and~/.local/bin.install.shonly mapsdarwinandlinux; Windows exits as unsupported.scripts/package.shcreates.tar.gzrelease artifacts only.curl ... install.sh | bashas the install path.Escript launch behavior:
mix.exsbuilds an escript withescript: [main_module: Ourocode.CLI].escript.exe <script>or through a Windows-safe release entrypoint, rather than assumed to be directly executable like a Unix script.TUI helper behavior:
rust/ourocode_ipc/src/bin/ourocode_tty.rsuses Unix-only APIs includinglibc::termios,tcsetattr,sigaction,ioctl, andTIOCGWINSZ.libcAPIs.lib/ourocode/terminal/tty_driver.exsearches forourocode_ttypaths and relies onOUROCODE_TTYinjection for installed layouts; Windows should account forourocode_tty.exeand graceful fallback.Desired UX
A Windows user should be able to install from PowerShell without Git Bash or WSL:
A first pass can require Erlang/OTP on
PATH, but the installer should detect that prerequisite and fail with clear instructions whenerl/escript.exeis missing.Interactive TUI startup should either work in Windows Terminal / PowerShell or fall back gracefully until a Windows terminal backend is implemented.
Proposed scope
Add a Windows-native install and launch convention:
ourocode-v<version>-windows-x64.zip.bin/ourocode.cmd.Get-FileHash,%LOCALAPPDATA%\Ourocode\<version>,%LOCALAPPDATA%\Ourocode\binshim,[Environment]::SetEnvironmentVariable, avoidingsetxPATH truncation issues,erl/escript.exeand prints prerequisite guidance.escript.exe <script>or an equivalent Windows-safe release entrypoint.ourocode_ttyby platform withcfg(unix)/cfg(windows).crossterm-based backend first; usewindows-sysonly where direct console APIs are needed.Acceptance criteria
ourocode-v<version>-windows-x64.zip.bin/ourocode.cmd.%LOCALAPPDATA%\Ourocode\<version>.%LOCALAPPDATA%\Ourocode\bin.ourocoderuns from a fresh PowerShell session after install.escript.exe <script>or an equivalent Windows-safe release entrypoint.ourocode_tty.exeis either built with a Windows backend or the app falls back gracefully without crashing.Non-goals for the first PR
Related files
install.shscripts/package.shREADME.mddocs/site/index.htmlmix.exslib/ourocode/terminal/tty_driver.exrust/ourocode_ipc/src/bin/ourocode_tty.rs