
Chafa
Command-line utility that converts images and animated GIFs into ANSI/Unicode character art or terminal graphics formats, built on a C library.
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
entr
Runs arbitrary commands when files change using kqueue or inotify to avoid polling
radare2
Command-line reverse engineering framework for disassembling, analyzing, emulating, debugging and patching binaries across many architectures and file formats.
FFmpeg
Collection of libraries and command-line tools (ffmpeg, ffplay, ffprobe) for converting, streaming, playing and inspecting audio, video and subtitles.
freeze
Generate PNG, SVG, and WebP images of code and terminal output with syntax highlighting and customizable styling.
Azure CLI
Microsoft's cross-platform command-line interface for managing Azure resources with az group/subgroup/command syntax, JMESPath queries, and tab completion.
add a badge to your README
Maintain Chafa? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/chafa?utm_source=badge)<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>