termage

(My first real Golang project) Browse images (including animated GIFs!) in the terminal

MIT License

Stars
4

termage

Browse images in the terminal with support for animated GIFs 🎉

⚠️ Archival Notice

So this tool, while fun to make, was poorly written IMO. Rather than work on it, I'm going to archive it. If you stumble on this repository and are interested in a way to render images in the terminal, there are plenty of other options. Personally, I'll be using viu.

Examples

PNG image

Animated GIF

Installation

The following commands simplify installing from the latest release.

Linux/MacOS

curl https://raw.githubusercontent.com/spenserblack/termage/HEAD/install.sh | bash

PowerShell

Invoke-WebRequest "https://raw.githubusercontent.com/spenserblack/termage/HEAD/install.ps1" | Invoke-Expression

Usage

Help

termage --help

Browse all images in a directory

Starting from first image in directory

termage path/to/dir/

Starting from a specific image

termage path/to/dir/image

Browse a specific subset of images

termage path/to/image1 path/to/image2 # ...

Controls

  • n: Next image
  • N: Previous image
  • z: Increase zoom by 10 percentiles
  • Z: Decrease zoom by 10 percentiles
  • f: Fit to screen
  • h: Scroll left one pixel
  • H: Scroll left 10%
  • j: Scroll down one pixel
  • J: Scroll down 10%
  • k: Scroll up one pixel
  • K: Scroll up 10%
  • l: Scroll right one pixel
  • L: Scroll right 10%
  • Esc: Exit application

Supported Formats

  • PNG
  • JPEG
  • GIF