Documentation
¶
Overview ¶
Package ui provides small terminal-interaction primitives the tyche CLI uses to detect TTY state and read single-line interactive input. The package is intentionally minimal — no TUI framework, no colour library, no escape codes — because every command that uses it is short-lived and not a long-running process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
IsTerminal reports whether f is connected to a character device (a TTY). Commands that prompt should refuse to do so when this returns false so a non-interactive invocation in CI or a script does not hang on stdin.
Types ¶
type Prompt ¶
Prompt is a tiny single-line input helper. It writes a question to Out and reads one trimmed line from In. The zero value is fine: it uses stdout and stdin.
Prompt is deliberately not a TUI. If you find yourself wanting bubbles or huh here, you have probably outgrown this command and should be writing a script or using a real TUI.