Yansi
A dead simple ANSI terminal color painting library.
In your Cargo.toml:
[dependencies]
yansi = "1.0"
In your source code:
use yansi::Paint;
println!("Testing, {}, {}, {}!",
"Ready".bold(),
"Set".black().on_yellow().invert().italic(),
"STOP".white().on_red().bright().underline().bold());
See the rustdocs for complete usage details.
Why yet another ANSI terminal coloring library? Here are some reasons:
use [Paint] and go!no_std], no-alloc, support with default-features = false.Style constructors are const]: store styles statically, even with
dynamic conditions!Style can be predicated on arbitrary conditions.{:x} and {:08b} are supported and preserved!yansi is pretty cool 😎.yansi is licensed under either of the following, at your option:
$ claude mcp add yansi \
-- python -m otcore.mcp_server <graph>