Detect the display
Choose a protocol automatically or force one with an environment variable.
Terminal image output · Ruby
Display RGBA images with half blocks, Kitty, iTerm2, or Sixel, and read keyboard and mouse input.
gem install termvas
Terminal protocols, frame fitting, and input parsing for interactive applications.
Choose a protocol automatically or force one with an environment variable.
Inspect images or play frame sequences with nearest-neighbor fitting.
Read split CSI, keyboard, wheel, and SGR mouse events.
A small first step
Install the gem, then follow the project guide for platform requirements and the full API.
termvas doctor
termvas view image.png
termvas play frames/*.png --fps 10
backend = Termvas::Backend.new(320, 180, protocol: :blocks)
# rgba_bytes contains top-down RGBA8 pixel data.
backend.set_pixels(rgba_bytes, 320, 180)
backend.close