chafa

terminal image viewer using character art

TLDR

Display image in terminal
$ chafa [image.png]
Specify output size
$ chafa -s [80x40] [image.jpg]
Use sixel graphics
$ chafa --format sixels [image.png]
Use kitty graphics protocol
$ chafa --format kitty [image.gif]
Limit colors
$ chafa --colors [256] [image.png]
Display animated GIF
$ chafa --animate [animation.gif]
ASCII only output
$ chafa --symbols ascii [image.jpg]

SYNOPSIS

chafa [options] image...

DESCRIPTION

chafa converts images to character art for display directly in the terminal. It uses Unicode block characters, braille patterns, and ASCII art to approximate images at the resolution of the terminal grid.For terminals with advanced graphics support, chafa can output using the Sixel, Kitty, or iTerm2 graphics protocols, producing much higher fidelity results. It handles a wide range of image formats including JPEG, PNG, GIF (with animation), AVIF, SVG, WebP, TIFF, and JPEG XL.Output can be tuned by adjusting size, color depth, symbol sets, and animation speed. chafa automatically detects terminal capabilities and selects the best available output mode.

PARAMETERS

-s, --size WxH

Output size in characters
-f, --format format
Output format: symbols, sixels, kitty, iterm
-c, --colors n
Color mode: none, 2, 8, 16, 256, full
--symbols set
Symbol set: all, ascii, block, braille
--fg color
Foreground color
--bg color
Background color
--animate
Enable animation for GIFs
--duration secs
Animation duration
--speed factor
Animation speed multiplier
-w, --watch
Watch file for changes
--font-ratio ratio
Font width/height ratio

SUPPORTED FORMATS

JPEG, PNG, GIF, AVIF, SVG, TIFF, WebP, JPEG XL, QOI, XWD

INSTALL

sudo apt install chafa
sudo dnf install chafa
sudo pacman -S chafa
sudo apk add chafa
sudo zypper install chafa
brew install chafa
nix profile install nixpkgs#chafa

CAVEATS

Output quality depends on terminal capabilities. Sixels require compatible terminal. Best results with Truecolor support.

SEE ALSO

catimg(1), timg(1), img2txt(1)

RESOURCES

Source code · Homepage