A modern, high-performance GIF viewer for your terminal
- Go 79.9%
- Shell 15.1%
- Makefile 5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| cmd/jif | ||
| core | ||
| demo | ||
| internal | ||
| testdata | ||
| .gitignore | ||
| .goreleaser.yml | ||
| CITATION.cff | ||
| demo.sh | ||
| go.mod | ||
| go.sum | ||
| install.sh | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| SECURITY.md | ||
| test.sh | ||
JIF - Terminal GIF Viewer
A modern, high-performance GIF viewer for your terminal built with Bubbletea and Lipgloss.
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
