Skip to content

Add Windows ConPTY support#208

Closed
TerryHowe wants to merge 3 commits into
creack:masterfrom
TerryHowe:windows-support
Closed

Add Windows ConPTY support#208
TerryHowe wants to merge 3 commits into
creack:masterfrom
TerryHowe:windows-support

Conversation

@TerryHowe

@TerryHowe TerryHowe commented Sep 30, 2025

Copy link
Copy Markdown

This adds full Windows support using ConPTY (Windows Pseudo Console API). Key changes include:

  • New Pty and Tty interfaces to abstract Unix *os.File and Windows handles
  • Windows-specific implementation using ConPTY API
  • Updated API to return interfaces instead of concrete *os.File types
  • Cross-platform window size management
  • Process lifecycle management for Windows

I have rebased and squashed the commits to one commit and listed the other authors as co-authors. This will make future rebases easier.

Closes: #161
Closes: #95
Closes: #155

This adds full Windows support using ConPTY (Windows Pseudo Console API).
Key changes include:

- New Pty and Tty interfaces to abstract Unix *os.File and Windows handles
- Windows-specific implementation using ConPTY API
- Updated API to return interfaces instead of concrete *os.File types
- Cross-platform window size management
- Process lifecycle management for Windows
- Updated golangci-lint configuration to version 2 format
- Modernized Go version support (1.21.5)

Co-Authored-By: Nathan Rijksen <nathanr@activestate.com>
Co-Authored-By: photostorm <eephoto45@gmail.com>
Co-Authored-By: Larry Clapp <larry@theclapp.org>
Co-Authored-By: Guillaume J. Charmes <git+guillaume@charmes.net>
@photostorm

Copy link
Copy Markdown

Have you had a chance to find the mistake I had in the code where we're getting an invalid handler when we're trying to set the size because I haven't had the time to actually look into the issue fully? I think it's just a simple mistake I have somewhere.

@TerryHowe TerryHowe marked this pull request as draft September 30, 2025 19:46
@TerryHowe

Copy link
Copy Markdown
Author

Converted to draft for now, I need to fix somethings according to my testing.

@adrivn

adrivn commented Oct 21, 2025

Copy link
Copy Markdown

Nice!! Thank you for taking the time to work on this

@TerryHowe

Copy link
Copy Markdown
Author

There are other projects that have windows support

@TerryHowe TerryHowe closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can I use it on Windows? Support Windows through conpty

3 participants