The future is (still) now
The premier UX of the 21st century just got a little better: With chafa
,
you can now view very, very reasonable approximations
of pictures and animations in the comfort of your
favorite terminal emulator. The power of ANSI X3.64 compels you!
Example
You can get fair results by using only U+2580 (upper half
block). Pixterm, catimg and a few other terminal graphics printers do this,
and so can Chafa with chafa --symbols vhalf
. However, Chafa
uses more symbols by default, greatly improving quality.
There are more examples in the gallery!
Features
- Supports most popular image formats, including animated GIFs.
- Outputs to all popular terminal graphics formats: Sixels, Kitty, iTerm2, Unicode mosaics.
- Combines Unicode symbols from multiple selectable ranges for optimal output.
- Fullwidth character support, e.g. Chinese, Japanese, Korean.
- Glyphs can be loaded from any font file supported by Freetype (TTF, OTF, PCF, etc).
- Multiple color modes, including Truecolor, 256-color, 16-color and simple FG/BG.
- RGB and DIN99d color spaces for improved color picking.
- Alpha transparency support in any color mode, including in animations.
- Works with most modern and classic terminals and terminal emulators.
- Documented, stable C API.
- Fast & lean: SIMD optimized, multithreaded.
- Suitable for terminal graphics, ANSI art composition and even black & white print.
Some of the features are discussed in a series of blog posts:
- Introducing Chafa
- The worst ANSI art renderer, except for all the others
- Chafa 1.2.0: Faster than ever, now with 75% more grit
- Chafa 1.4.0: Now with sixels
- Chafa 1.6.0: Wider
- Chafa 1.8: Terminal graphics with a side of everything
- Chafa 1.14: All-singing, all-dancing
Documentation
Chafa will print a help text if run without arguments, or with chafa --help
.
It also comes with a man page displayable with man chafa
.
The gallery contains examples of how command-line options can be used to tweak the output.
There is C API documentation for application developers.
Erica Ferrua Edwardsdóttir is developing Python bindings that allow Chafa to be used in Python programs. These are documented on their own site.
Héctor Molinero Fernández maintains JavaScript bindings that allow Chafa to be used in Node.js, web browsers, and more. These are documented on their own site.
Community
Please bring your questions to our secret business friendly Matrix chat. Stay a
while and listen, or talk about terminals, software or your choice of breakfast cereal. All
are welcome, but an appreciation for terminals, programming and/or computer graphics is
likely to enhance your experience.
Although the chat's history is hidden from non-members, this is a public forum, so if your ambition is to overthrow the government/megacorps by way of an underground network of refurbished Minitels, you may want to keep it under your hat. Furthermore, and hopefully obviously, we treat our fellow humans with respect. Have fun!