Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
/ termage Public archive

My first real Golang project. Browse images in the terminal.

License

Notifications You must be signed in to change notification settings

spenserblack/termage

Repository files navigation

termage

GitHub go.mod Go version CI CodeQL Go Report Card codecov

GitHub all releases

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

Viewing a PNG image

Animated GIF

Viewing an 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