Basics

echo "hello, world" | lolcat
lolcat++ example output

Options

FlagDefaultDescription
-p, --spread3.0Rainbow spread
-F, --freq0.1Rainbow frequency
-S, --seed0Rainbow seed (0 = random)
-a, --animateoffEnable animation
-d, --duration12Animation duration
-s, --speed300.0Animation speed
-i, --invertoffInvert colors (color the background)
-t, --truecoloroffForce 24-bit truecolor mode
-f, --forceoffForce color output (e.g. when piping)
-h, --helpN/AShow help
-v, --versionN/AShow version

Examples

# pipe anything
ls -la | lolcat

# rainbow several files
lolcat README.md LICENSE

# tighter rainbow
echo "hello" | lolcat --spread 1.0 --freq 0.3

# animate
echo "hello, world" | lolcat -a -d 5

# invert (color the background, not the text)
echo "hello" | lolcat --invert

# force color when piping into less
ls --color=always | lolcat -f | less -R

Why C++?

The original lolcat is a Ruby script. lolcat++ aims to be drop-in compatible while being faster — nice when you want to use it in init scripts, motd output, or anywhere the Ruby startup time becomes noticeable.

Also, why not?