🎉 Happy News! The new website is out :-) Google

term

term

ANSI terminal escape codes made easy. Colors, styles, cursor movement and spinner animations — all in one small library.

Installation

bpkg install clibs/term

Usage

source bpkg_modules/term/term.sh

echo "$(term_red)Error:$(term_reset) file not found"
echo "$(term_bold)$(term_green)Success!$(term_reset)"

term_spinner_start "Loading..."
sleep 2
term_spinner_stop

Color functions

term_black, term_red, term_green, term_yellow, term_blue, term_magenta, term_cyan, term_white

Each has a term_bg_* variant for background colors.

Style functions

term_bold, term_dim, term_underline, term_blink, term_reverse, term_reset