Expand description
This is an opinionated CLI library for beautiful and user-friendly terminal output. It aims to give the Rust ecosystem similar tooling as Rich for Python.
Note that the library is still very much a work in progress.
§Available utilies
§Enabling/disabling color
Most of the functions in this library include color in some fashion when printing to the terminal.
Color will be automatically disabled in any of these circumstances:
- The
NO_COLORenvironment variable is set - The
CLICOLORenvironment variable is set to0 std::io::Stdoutisn’t a TTY (i.e. when being piped or in a noninteractive terminal)
The above situations are ignored in any of these circumstances:
- The
CLICOLORenvironment variable is set to anything other than0 - The
CLICOLOR_FORCEenvironment variable is set
CLI coloring can also be manually set on and off through the show_color function.
Re-exports§
pub use colored::Colorize;pub use msg::debug;pub use msg::debugfmt;pub use msg::debugln;pub use msg::err;pub use msg::errfmt;pub use msg::errln;pub use msg::info;pub use msg::infofmt;pub use msg::infoln;pub use msg::warn;pub use msg::warnfmt;pub use msg::warnln;pub use colored;
Modules§
- msg
- Utilities for general CLI messaging.
Functions§
- show_
color - Whether coloring should be on or off.