"""Platform-specific utilities and input handling.
This module provides platform-independent abstractions for terminal operations
and user input handling.
"""
# Standard library imports
import sys
# Third-party imports
import typer
[docs]
def is_interactive_terminal() -> bool:
"""Check if running in an interactive terminal.
Returns:
True if stdin is a TTY (interactive terminal)
"""
return sys.stdin.isatty()
[docs]
def getch() -> str:
"""Get a single character from stdin without pressing enter.
Uses typer's built-in cross-platform getchar() function.
Returns:
Single character string or escape sequence
"""
return typer.getchar()