GNU Teseq (the author pronounces it: "tea" + "seek") is a tool for analyzing files that contain control characters and terminal control sequences, by printing these control sequences and their meanings in readable English. It is intended to be useful for debugging terminal emulators, and programs that make heavy use of advanced terminal features such as cursor movement, coloring, and other effects.

Teseq is useful for:

creating animated, interactive demos to run on the terminal,

knowing the exact output of a program (Did it have spaces at the end of the line? Or maybe it contains invisible control characters?),

examining invisible control sequences within a text file, that affect graphical formatting or character encoding, and

debugging graphical terminal applications, and terminal emulators.

It takes input like the following, containing various invisible formatting codes:

Hi there, world

And spits out explanations of the controls it found, like:

Note that the special control sequences that tell the terminal to start and stop writing in boldface text are separated out on their own lines (prefixed with a colon ‘:’), and followed by an identification (prefixed with an ampersand ‘&’) and a description of what it does (prefixed with a quote character ‘"’).

The actual text appears in lines bracketed by pipe ‘|’ characters.

The series of single-character backspace controls appear on a line prefixed with a period ‘.’, identified by its identifying acronym (bs for backspace), and its control-key representation (Control-H).

The final word, “earth”, is followed by a period just after the closing pipe symbol; this indicates a following linefeed (or “newline”) character.

The included reseq command may be used to reverse the procedure, accepting the above input and printing out the original set of escape sequences that produced it.