crossterm 0.17.7

An crossplatform terminal library for manipulating terminals.
Documentation
use crossterm::tty::IsTty;
use std::io::stdin;

pub fn main() {
    if stdin().is_tty() {
        println!("Is TTY");
    } else {
        println!("Is not TTY");
    }
}