Headless TTY
Description
A headless terminal emulator for native Windows that keeps isatty() returning
true for spawned processes while staying completely invisible — or tucked away
in the system tray. It creates a real pseudo-terminal through Windows ConPTY, so
output is captured programmatically, ANSI escape codes pass through correctly,
and no console window ever appears.
Why it matters
Plenty of CLI tools check isatty() to decide how to behave: Claude CLI
requires a TTY for interactive mode, Git only colours output on a TTY, and any
Node app built on the Ink TUI framework needs one. Hide a console the usual way
(redirected stdin/stdout) and all of that breaks. Headless TTY hides the
console without lying about the terminal.
Everyday uses
You don't have to be a C++ developer. Anywhere you'd build a bat-plus-vbs contraption to launch something console-free at startup, this is one command:
headless-tty.exe -- python main.py
headless-tty.exe -- powershell ".\myscript.ps1"
headless-tty.exe --sys-tray -- python -u main.pyThe --sys-tray mode (v2.5.0) runs a long-lived process hidden behind a tray
icon — right-click to show a full-colour console for logs when you want it, hide
it again when you don't. If the child process exits, the icon cleans itself up.
Install
winget install Revoconner.HeadlessTTY, or grab a build from the GitHub
releases. The ConPTY wrapper is also usable as a C++ library in your own
projects, with a small API for spawning, reading output via callback, resizing,
and lifecycle management. Needs Windows 10 1809 or newer.