cli-truncate cleverly shortens strings to fit a specific terminal column width while preserving readability. It respects word boundaries and handles ANSI escape codes correctly, ensuring visually clean output even with styled text. This package is ideal for command-line interfaces needing to display information within limited space constraints without abruptly cutting off words or breaking terminal formatting. It allows customizing the truncation indicator (e.g., ellipsis) for a polished user experience.