Skip to content

Windows support via ConPTY #4

Description

@sudiptadeb

Context

termulaa currently builds for linux/{amd64,arm64} and darwin/{amd64,arm64}. Windows is deliberately not supported — creack/pty (the PTY library we depend on) is POSIX-only.

Windows' modern console API is ConPTY, available via libraries like UserExistsError/conpty or photostorm/pty (a creack/pty fork claiming Windows support). Neither is as battle-tested as creack/pty on POSIX.

Scope of the work

Non-trivial. Minimum viable port:

  • Abstract session.go's spawn / resize / read / write surface behind an interface.
  • Add a session_windows.go implementation that uses ConPTY.
  • Revisit shell detection (no \$SHELL; probably default to pwsh then cmd).
  • Revisit cwd tracking — no /proc or lsof; use GetCurrentDirectory via NtQueryInformationProcess, or poll the child process's working dir differently.
  • Add windows/amd64 (and windows/arm64?) to build/build.sh and the release workflow.
  • Test terminfo behavior under cmd.exe / `pwsh`.

Not in scope (explicit)

  • Packaging as a Windows Service / installer.
  • Signed binaries / WinGet distribution.

Status

Deferred. Filing this as a tracking issue; happy to take PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions