Crate zolt

source ·
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_COLOR environment variable is set
  • The CLICOLOR environment variable is set to 0
  • std::io::Stdout isn’t a TTY (i.e. when being piped or in a noninteractive terminal)

The above situations are ignored in any of these circumstances:

  • The CLICOLOR environment variable is set to anything other than 0
  • The CLICOLOR_FORCE environment variable is set

CLI coloring can also be manually set on and off through the show_color function.

Re-exports

Modules

  • Utilities for general CLI messaging.

Functions