Skip to content

A CLI utility installed as "ansi" to quickly get ANSI escape sequences. Supports the most basic ones, like colors and styles as bold or italic.

License

Notifications You must be signed in to change notification settings

phip1611/ansi-escape-sequences-cli

Repository files navigation

'ansi' - a CLI utility to quickly get ANSI escape codes

ansi-escape-sequences-cli provides an executable called ansi which can be used in a shell or in a shell script to easily colorize and style terminal output.

Usage

  • Add ansi to your PATH
  • Embed it in your shell scripts like this:
    # You need "-e" to let echo replace the escaped ESC symbol
    echo -e "$(ansi yellow bold)WARNING$(ansi reset): There was a problem"
    # Or use echo without "-e":
    echo "$(ansi yellow bold --escape-style=direct)WARNING$(ansi reset): There was a problem"
  • Type --help for more guidance!

Install

$ cargo install ansi-escape-sequences-cli (the binary is just called ansi!)

Supported Platforms

  • ✔️ Linux
  • ✔️ MacOS
  • ✔️ Windows

MSRV

Ths MSRV is 1.85.1.

About

A CLI utility installed as "ansi" to quickly get ANSI escape sequences. Supports the most basic ones, like colors and styles as bold or italic.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •