viu

A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer. It uses either iTerm or Kitty graphics protocol, if supported. If not, lower half blocks ( or \u2584) are displayed instead.

Based on the value of $TERM, viuer decides which protocol to use. For half blocks, $COLORTERM is inspected. If it contains either truecolor or 24bit, truecolor (16 million colors) will be used. If not, it will fallback to using only ansi256. A nice explanation can be found in this gist.

Features

  • Native iTerm and Kitty support
  • Animated GIF support
  • Accept media through stdin
  • Custom dimensions
  • Transparency
  • Experimental Sixel support (behind the sixel feature flag)

Options

Usage: viu [OPTIONS] [file]...

OptionDescription
-w, --width <width>Resize the image to a provided width
-h, --height <height>Resize the image to a provided height
-x <x>X offset [default: 0]
-y <y>Y offset [default: 0]
-a, --absolute-offsetMake the x and y offset be relative to the top left terminal corner. If not set, they are relative to the cursor’s position.
-r, --recursiveRecurse down directories if passed one
-b, --blocksForce block output
-n, --nameOutput the name of the file before displaying
-t, --transparentDisplay transparent images with transparent background
-f, --frame-rate <frames-per-second>Play the gif at a given frame rate
-1, --onceLoop only once through the gif
-s, --staticShow only the first frame of the gif