Mist and Weave: ANSI Styling and text formatting libraries
Mist
mist lets you safely use advanced styling options on the terminal. It offers you convenient methods to colorize and style your output, without you having to deal with all kinds of weird ANSI escape sequences and color conversions.https://github.com/thatstoasty/mist
Weave
weave is a collection of (ANSI-sequence aware) text reflow operations & algorithms. Includes text padding, margins, truncation, wrapping, word wrapping, indenting, and dedenting.https://github.com/thatstoasty/weave
eg
Both of these projects are used in
mog, but if you need something lightweight to apply some texting coloring/styling or simple ANSI aware formatting, you can use one of these libraries instead.