#ansi-escapes #ansi-term #vt100 #terminal

app ansi-escape-sequences-cli

CLI tool for generating and applying ANSI escape sequences to colorize and style terminal output — ideal for scripts, prompts, and debugging

5 releases

Uses new Rust 2024

0.2.2 May 19, 2025
0.2.1 May 13, 2025
0.1.4 May 2, 2021

#214 in Command line utilities

Download history

455 downloads per month

MIT license

19KB
258 lines

'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.

Dependencies

~3–16MB
~168K SLoC