I'm writing a program that reads input from stdin, manipulates the input, and writes output to stdout. However, many programs check whether stdin is a terminal or a pipe (by calling a function like isatty ), and generate output differently. How do I have my program pretend to be a TTY?

The solution should work on both Linux and macOS. Any programming language that generates a standalone binary is acceptable, but Go is preferred.