cl-ansi-term allows to print various primitives on ANSI-complaint terminals. It also supports coloration and effects. cl-ansi-term is not like ncurses, it works with primitives that you can output on your terminal, as well as redirect to a file without any loss.

cl-ansi-term can print the following things:

  • colorized text;
  • horizontal lines;
  • progress bars;
  • unordered lists;
  • ordered lists;
  • tables.
cl-ansi-term uses concept of style sheet to manage coloration of output. Define styles, give them names, specify foreground colors, background colors, and effects for every style.

cl-ansi-term provides hooks to give more control over the library.

cl-ansi-term is able to detect whether output goes to a terminal or to a file. If the latter case takes place, no escape sequences will get into the file. It's also possible to disable all effects and coloration.

GitHub repository:

You can install it via Quicklisp:

(ql:quickload "cl-ansi-term")

It's distributed under GNU GPL.

Relevant topics: text, console