Snap to total, write final newline (TTY) or full line (non-TTY)
stop()
Abort without finishing; clears the current line
.current / .total / .isComplete
Read-only state getters
TTY vs non-TTY
In a TTY, the bar redraws in place using cursorTo(0) + clearLine(1). In a non-TTY stream (CI, piped, captured), tick/update are silent — only done() writes a single line with the final rendered template. This keeps CI logs scannable and prevents megabytes of garbled redraws.
Composing with spinner
If you don’t know the total up front (downloading from a streaming API, walking a directory of unknown size), start with a spinner and switch once you do: