book
book copied to clipboard
Recommend crate to use for color in the CLI
CLI usually use color to output different log more visually, e.g. red for error.
Choosing a crate which provides this would be a good inclusion to https://github.com/rust-cli/book/blob/master/src/in-depth/human-communication.md
Agreed that we need to add more guidance around colored output.
I'd recommend using anstream as the basis for it. Because its "good enough" and cheap, I'd then probably use anstyle with it.
(anstream uses anstyle, as well as env_logger and clap so its a "common" dependency)