Preview images and animated GIFs directly in a terminal without opening a GUI image viewer.
Add image-to-text art conversion to a web app using the WebAssembly port that runs in the browser or Node.js.
Integrate the C library into a custom application to render images as terminal art programmatically via the public API.
Chafa is a command-line tool that converts images into text-based art you can display inside a terminal window. You point it at an image file, including animated GIFs, and it outputs a version made of colored text characters that approximates what the image looks like. The result can range from rough block-character representations suitable for old-style terminals to detailed Unicode art on modern terminal emulators, depending on what the terminal supports. The project is built around a C library with a public API, meaning other programs can use the same conversion engine without going through the command-line tool. Python and JavaScript bindings are available through separate community-maintained projects, including a WebAssembly port that works in web browsers and Node.js. Chafa is packaged in most major Linux distributions, so for most users installation is a single package manager command. Building from source requires GCC and a handful of standard development libraries. Optional dependencies like libjpeg, librsvg, libtiff, and libwebp extend the range of input formats the tool can read. The project is licensed under the Lesser GPL, version 3 or later, which allows the library to be used in projects with other licenses under certain conditions. The README is brief and points to the project website for a gallery of example outputs and more detailed documentation. The C API reference is also hosted online for developers who want to integrate the library into their own applications.
← hpjansson on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.