Chafa logo

Chafa

Command-line utility that converts images and animated GIFs into ANSI/Unicode character art or terminal graphics formats, built on a C library.

install

Chafa is a command-line utility that converts image data, including animated GIFs, into graphics formats or ANSI/Unicode character art for display in a terminal. According to the README, it supports a wide range of output targets, from historical teleprinters to current terminal emulators.

The core functionality lives in a C library with a public, documented API, and the chafa command-line tool is a frontend to it. Building the tool can use optional libraries for input formats: FreeType2 (required for the CLI), plus libavif, libheif (1.12 or later), libjpeg, libjxl, librsvg, libtiff and libwebp. libdeflate is optional and speeds up PNG decoding. Both library and tools are licensed under LGPLv3+.

Bindings are maintained by third parties: Python bindings by Erica Ferrua Edwardsdóttir, and JavaScript bindings by Héctor Molinero Fernández built on a WebAssembly port, available from NPM for Node.js and browsers. Likely users are developers and terminal users who want to display images or animations in a terminal, or embed the library in their own programs.

Installation

# via Build from source
git clone https://github.com/hpjansson/chafa.git
cd chafa
./autogen.sh
make
sudo make install

Alternatives & related tools

add a badge to your README

Maintain Chafa? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/chafa.svg)](https://www.trmn.sh/tools/chafa?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/chafa?utm_source=badge"><img src="https://www.trmn.sh/badge/chafa.svg" alt="Featured on trmn" height="20"></a>