CLI & text · real, tested code

Colorize Terminal Output in Larzscript

Add ANSI colors to terminal output, with automatic NO_COLOR support so piped output stays clean.

Every color function returns plain text once color.set_enabled(false) is called (or NO_COLOR is set in the environment) - a disabled run is genuinely pipe-safe, not just visually blank.

larzscript pkg install color

Code

import "color" as c

print(c.green("ok"), c.red("error"), c.bold(c.cyan("title")))
Output
ok error title