Port pexc (the TUI) to Windows. No GUI port: on the Windows desktop, Sysinternals Process Explorer and System Informer already own that space — a pex GUI would add nothing. What does not exist on Windows is a good terminal process explorer (htop-class or better) for SSH sessions, Server Core, headless admin, and Windows Terminal users. That is the niche: pexc.exe with the full feature set — tree + network + history + Top Consumers + find-open-handle — in a console.
The architecture is ready for this: pex_core (DataStore, HistoryStore, Settings, viewmodels) is OS-agnostic; the work is one new src/platform/windows/ backend behind the existing three interfaces, portability shims in core, and a TUI technology decision.
Plan
Phase 0 — scaffolding & core portability
Phase 1 — "htop for Windows" (documented APIs only)
Phase 2 — the Process-Explorer features
Phase 3 — free
History, Top Consumers, CSV export, settings persistence all live in pex_core and arrive with the port.
TUI technology (decision pending)
| Option |
Reuse of existing TUI |
Notes |
| PDCursesMod (curses API for Windows) |
~95% — existing src/ui/tui compiles nearly as-is |
Maintained; WinCon + VT backends; mouse, colors, ACS lines all supported. Fastest path. |
| Native Win32 Console API (what FAR Manager uses) |
0% — full TUI rewrite, Windows-only fork of the UI layer |
Richest input model (key up/down, modifiers), but FAR's "richness" comes from its widget framework, not the API; two TUI codebases forever |
| FTXUI (modern C++ TUI framework) |
0% — rewrite, but ONE new TUI could replace ncurses on all platforms later |
Attractive as a future unified-TUI project; out of scope for the port itself |
| Turbo Vision (magiblot/tvision port) |
0% — rewrite into an app framework that owns the main loop |
The genuine FAR/Borland feel; biggest paradigm shift |
| ImTui (ImGui-to-terminal backend) |
reuses the GUI code instead |
Clever, but stale upstream and chunky rendering; risky foundation |
Recommendation: PDCursesMod for the port (the existing TUI already has the right design and look); revisit FTXUI later only if a unified richer TUI across all platforms becomes a goal.
🤖 Generated with Claude Code
Port pexc (the TUI) to Windows. No GUI port: on the Windows desktop, Sysinternals Process Explorer and System Informer already own that space — a pex GUI would add nothing. What does not exist on Windows is a good terminal process explorer (htop-class or better) for SSH sessions, Server Core, headless admin, and Windows Terminal users. That is the niche: pexc.exe with the full feature set — tree + network + history + Top Consumers + find-open-handle — in a console.
The architecture is ready for this:
pex_core(DataStore, HistoryStore, Settings, viewmodels) is OS-agnostic; the work is one newsrc/platform/windows/backend behind the existing three interfaces, portability shims in core, and a TUI technology decision.Plan
Phase 0 — scaffolding & core portability
PEX_PLATFORM=windowsin CMake (TUI-only;BUILD_GUIforced off)WSAStartup,getnameinfo),localtime_r->localtime_s,HOME->USERPROFILE/APPDATAin Settings/exports; excludesingle_instance(GUI-only) from the Windows buildwindows-latestjob in the multi-platform workflowPhase 1 — "htop for Windows" (documented APIs only)
CreateToolhelp32Snapshot(+ parent-PID with creation-time guard against PID reuse)GetProcessTimes(CPU),GetProcessMemoryInfo(working set / private bytes),QueryFullProcessImageName, user viaOpenProcessToken/LookupAccountSid, threads via ToolhelpGetSystemTimes/NtQuerySystemInformation(SystemProcessorPerformanceInformation)for per-CPU,GlobalMemoryStatusExGetProcessIoCounters(simpler than Linux)GetExtendedTcpTable/GetExtendedUdpTable— per-PID with real TCP states (nicer than the procfs inode dance)TerminateProcess+ Toolhelp parent walkNtQueryInformationProcess+ remote PEB read (needsSeDebugPrivilegefor foreign processes; degrade gracefully)SeDebugPrivilege, run-as-Administrator notes)Phase 2 — the Process-Explorer features
NtQuerySystemInformation(SystemHandleInformation)+NtQueryObjectwith the worker-thread-timeout trick (NtQueryObject can hang on some pipe handles); drives the Files tab and find-open-fileVirtualQueryEx; modules/libraries:EnumProcessModulesPhase 3 — free
History, Top Consumers, CSV export, settings persistence all live in
pex_coreand arrive with the port.TUI technology (decision pending)
src/ui/tuicompiles nearly as-isRecommendation: PDCursesMod for the port (the existing TUI already has the right design and look); revisit FTXUI later only if a unified richer TUI across all platforms becomes a goal.
🤖 Generated with Claude Code