A modern, high-performance GIF viewer for your terminal
  • Go 79.9%
  • Shell 15.1%
  • Makefile 5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-12-07 19:21:32 +04:00
.github Fix gosec configuration to use exclude flag 2025-12-07 18:27:03 +04:00
cmd/jif init 2025-12-07 18:12:47 +04:00
core Fix CI/CD security scanner and unchecked error 2025-12-07 18:24:38 +04:00
demo feat: add demo gif 2025-12-07 19:21:32 +04:00
internal init 2025-12-07 18:12:47 +04:00
testdata init 2025-12-07 18:12:47 +04:00
.gitignore init 2025-12-07 18:12:47 +04:00
.goreleaser.yml Disable Homebrew and AUR publishing until credentials are configured 2025-12-07 18:36:30 +04:00
CITATION.cff init 2025-12-07 18:12:47 +04:00
demo.sh init 2025-12-07 18:12:47 +04:00
go.mod init 2025-12-07 18:12:47 +04:00
go.sum init 2025-12-07 18:12:47 +04:00
install.sh init 2025-12-07 18:12:47 +04:00
LICENSE init 2025-12-07 18:12:47 +04:00
Makefile init 2025-12-07 18:12:47 +04:00
README.md feat: add demo gif 2025-12-07 19:21:32 +04:00
SECURITY.md init 2025-12-07 18:12:47 +04:00
test.sh fix: update CI/CD for modular package structure 2025-12-07 18:19:02 +04:00

JIF - Terminal GIF Viewer

A modern, high-performance GIF viewer for your terminal built with Bubbletea and Lipgloss.

jif-demo

Installation

Quick Install (Linux/macOS)

curl -sSL https://raw.githubusercontent.com/Gaurav-Gosain/jif/main/install.sh | bash

Download Pre-built Binary

Download the latest release for your platform from the releases page.

# Extract and run
tar xzf jif_*.tar.gz
./jif animation.gif

Go Install

go install github.com/Gaurav-Gosain/jif/cmd/jif@latest

Build from Source

git clone https://github.com/Gaurav-Gosain/jif
cd jif
make build
./bin/jif animation.gif

Usage

# View a local GIF
jif animation.gif

# View a remote GIF
jif https://example.com/animation.gif

# Show help
jif --help

# Show version
jif --version

Keybindings

Key Action
Space Pause/Resume
n / Next frame
p / Previous frame
? Toggle help
q / Ctrl+C Quit

Press ? while viewing to see the help overlay.

Features

  • Halfblock rendering for 2x vertical resolution
  • High-quality Lanczos3 image scaling
  • Progressive loading animation
  • Proper GIF disposal method handling
  • Remote URL support (HTTP/HTTPS)
  • Automatic terminal resize handling
  • Full-screen alternate buffer mode

Technical Details

Rendering

Uses Unicode halfblock characters (▀ and ▄) to achieve double vertical resolution. Each terminal cell displays two pixels vertically:

  • Top pixel: foreground color
  • Bottom pixel: background color

GIF Support

Properly handles all GIF disposal methods:

  • DisposalNone (0): Keep previous frame
  • DisposalBackground (1): Clear to background
  • DisposalPrevious (2): Restore previous state

This ensures accurate rendering of complex animated GIFs.

Development

Run Tests

make test

Build Binary

make build

Generate Test Data

make generate-testdata

License

MIT License - see LICENSE file for details

Author

@Gaurav-Gosain