Registry / utility / atty
library0.2.14rscratesunverified

A simple interface for querying whether a stream is a terminal (TTY).

# Cargo.toml [dependencies] atty = "0.2.14"
INSTALL
IMPORT
SIG · ATTY
A
atty
utilityrustv0.2.14
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

is
use atty::is;

Check if stdout is connected to a terminal.

use atty::Stream; fn main() { if atty::is(Stream::Stdout) { println!("stdout is a terminal"); } }
Debug
Known issues
gotchaOn Windows, `atty` may return incorrect results in some environments (e.g., MSYS2, Cygwin).
fix
Consider using `is-terminal` crate for more reliable cross-platform detection.
affects: >=0.2.0
Upgrade
Version history
0.2.14latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
2
Meta
1
Resources
atty — cargo add atty · libregistry