Update notifications for your CLI app
Overall
score
97%
A utility for managing terminal output in CLI applications that adapts behavior based on the execution environment.
Detect whether the application is running in an interactive terminal environment or in a non-interactive context (such as piped output or redirected streams).
Output messages to the appropriate stream based on message type and terminal environment.
@generates
/**
* Check if the application is running in an interactive terminal.
*
* @returns {boolean} true if running in a TTY, false otherwise
*/
export function isTTY();
/**
* Write a status message to the appropriate output stream.
* Only outputs in TTY environments. Messages are written to stderr.
*
* @param {string} message - The message to output
* @returns {boolean} true if message was written, false if suppressed
*/
export function writeStatus(message);A package that demonstrates TTY detection and terminal output handling patterns for CLI applications. Study its approach to environment-aware output control.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-update-notifierdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10