The ht (headless terminal) command line program wraps other binaries with a VT100 style terminal interface, allowing programmatic access to input and output via JSON. Built in Rust, it works on MacOS and Linux. Installation involves downloading the binary for your architecture or building from source using Rust and Cargo. The default virtual terminal window size is 120×40 but can be adjusted with the –size argument. Communication with ht is through stdin, stdout, and stderr using a JSON-based protocol. While designed for programmatic use, ht can also be interacted with using a desktop terminal emulator. The code is licensed under Apache License, Version 2.0.
https://github.com/andyk/ht