LinuxCommandLibrary

toilet

Print large, rendered text to the terminal

TLDR

Generate ASCII art for a given text

$ toilet [input_text]
copy

Generate ASCII art using a custom font file
$ toilet [input_text] [[-f|--font]] [font_filename]
copy

Generate ASCII art using a filter
$ toilet [input_text] [[-F|--filter]] [filter_name]
copy

Show available toilet filters
$ toilet [[-F|--filter]] list
copy

SYNOPSIS

toilet [ OPTIONS ] [ STRING... ]

PARAMETERS

-f, --font <fontfile>
    Specifies the font file to use. Fonts are usually found in /usr/share/toilet/fonts/ or /usr/share/figlet/fonts/.

-F, --filter <filters>
    Applies one or more special effects to the output. Common filters include metal, rainbow, crop, flip, flop, and gay (a rainbow effect).

-E, --export <format>
    Exports the output in a specified format. Supported formats include html, ansi, utf8, svg, tga, irc, and json.

-o, --output <file>
    Writes the generated output to the specified file instead of printing to standard output.

-W, --width <width>
    Sets the maximum width of the output in characters. This is useful for fitting text within specific terminal dimensions.

-C, --color <colors>
    Defines custom colors for the output. Can be a single color name, RGB values (e.g., r,g,b), or a comma-separated list for gradients.

-t, --truecolor
    Enables 24-bit true color output, allowing for a much wider range of colors if the terminal supports it.

-L, --loop
    Enables an animation loop for dynamic filters like rain, continuously updating the display.

-h, --help
    Displays a help message with available options and exits.

-v, --version
    Shows the version information of the toilet command and exits.

DESCRIPTION

The toilet command (TOIlet - The Other Internet Text) is a powerful and versatile console utility designed to render large, stylized text using characters. It serves as a feature-rich successor to the popular figlet command, significantly expanding upon its capabilities.

Unlike figlet, toilet natively supports a wide array of features including different colors (including 24-bit true colors), various artistic filters (such as metal, rainbow, crop), and multiple export formats (like HTML, SVG, ANSI, and UTF-8). It can utilize both standard fonts and existing Figlet fonts, offering immense flexibility for text art generation.

Commonly used for creating impressive terminal banners, artistic text displays, or decorative output in scripts, toilet transforms plain text into visually striking ASCII or Unicode art, making it an excellent tool for enhancing command-line interfaces and creative projects.

CAVEATS

Output quality, especially color and special effects, heavily depends on the capabilities of the terminal emulator being used. Older terminals or those with limited color support may not display toilet's full range of features accurately. Complex filters or very large text inputs can be resource-intensive, potentially causing delays or high CPU usage.

FONTS AND FILTERS

toilet's strength lies in its extensive collection of fonts and filters. Users can discover available fonts by listing files in /usr/share/toilet/fonts/ and experiment with different filter combinations to achieve unique visual effects. Running toilet --filter list will show all available filters.

HISTORY

toilet was created as a modern and more feature-rich alternative to the traditional figlet program. While figlet popularized ASCII art text generation, it lacked support for colors, advanced filters, and diverse output formats. toilet was developed to address these limitations, providing native capabilities for colorful and dynamic text rendering, making it a popular choice for contemporary terminal art and scripting.

SEE ALSO

figlet(6), banner(1), lolcat(1)

Copied to clipboard