GifGrep

Search GIF providers (Tenor/Giphy) with CLI/TUI, download results, and extract stills/sheets.

gifgrep is a Go-based CLI and TUI for searching GIF providers (Tenor and Giphy) directly from your terminal. Built by Peter Steinberger (steipete), it takes the simple concept of 'find a GIF' and makes it delightfully powerful with scriptable output, inline terminal previews, and a full interactive browser. The tool operates in two modes: a scriptable CLI that outputs plain text URLs (perfect for pipes and automation), and an interactive TUI with inline GIF previews using the Kitty graphics protocol. The TUI shows animated previews right in your terminal — no browser needed. It supports Kitty, Ghostty (with software playback), and iTerm2 (via OSC 1337). Beyond search, gifgrep includes `still` and `sheet` commands for extracting frames from GIF files. `still` extracts a single frame at a specific timestamp, while `sheet` creates a PNG grid of frames — perfect for creating contact sheets or thumbnails. Download GIFs directly to ~/Downloads with `--download`, and reveal them in Finder with `--reveal`. Provider selection is automatic: gifgrep prefers Giphy when GIPHY_API_KEY is set, otherwise falls back to Tenor (which works with a public demo key out of the box). This means it works immediately without any API key setup — just install and search. For OpenClaw users, gifgrep adds personality to your AI assistant. Need a reaction GIF for a Discord message? `gifgrep 'mind blown' --max 1 --format url` gives you a URL instantly. The JSON output mode (`--json`) provides full metadata including dimensions, tags, and preview URLs for more sophisticated integrations. Best suited for: anyone who wants GIFs from the terminal, OpenClaw users wanting to add GIF reactions to conversations, developers building GIF-powered bots, content creators needing quick GIF searches and frame extraction.

Tags: gif, search, media, fun

Category: Media

Use Cases

  • Find reaction GIFs for chat messages without leaving the terminal
  • Download GIFs for social media posts or presentations
  • Create contact sheets from GIF files for documentation
  • Extract specific frames from GIFs as PNG stills
  • Pipe GIF URLs into other tools for automated workflows
  • Browse GIFs interactively with the TUI when you're not sure what you want

Tips

  • Use `--format url` for pipe-friendly output: `gifgrep 'thumbs up' --max 1 --format url`
  • The TUI mode (`gifgrep tui`) is great for browsing — arrow keys to navigate, 'd' to download
  • Use `--json` for full metadata including dimensions, tags, and preview URLs
  • Create contact sheets from GIFs: `gifgrep sheet clip.gif --frames 9 --cols 3 -o sheet.png`
  • Set GIPHY_API_KEY for better search results — Giphy's index is larger than Tenor's
  • Use `--thumbs` in CLI mode for quick inline previews without entering TUI
  • Pipe to other tools: `gifgrep 'celebration' --format url --max 1 | xargs curl -sL -o party.gif`

Known Issues & Gotchas

  • Inline previews only work in Kitty, Ghostty, or iTerm2 — other terminals show text-only output
  • Giphy requires an API key (GIPHY_API_KEY) — Tenor works out of the box with a demo key
  • Tenor's demo key has rate limits — set TENOR_API_KEY for heavier use
  • Animated TUI previews may consume significant bandwidth for long GIFs
  • The `still` and `sheet` commands work on local GIF files, not URLs — download first
  • Ghostty uses software playback (gifgrep sends frames on a timer) — less smooth than native Kitty support
  • GIF downloads go to ~/Downloads by default — no configurable download path yet

Alternatives

  • Tenor GIF for CLI (Google)
  • gifsicle
  • imgcat (iTerm2)
  • Giphy API direct

Community Feedback

gifgrep — Grep the GIF. Stick the landing. Search Giphy/Tenor from your terminal with inline previews. Because sometimes you need the perfect reaction GIF without leaving vim.

— Twitter/X (steipete)

gifgrep searches GIF providers and gives you two fast paths: scriptable CLI output for pipes, and an interactive TUI with inline previews.

— GitHub

The gifgrep skill enables AI agents to search GIF providers with CLI/TUI, download results, and extract stills/sheets for creative use.

— OpenClaw Skills Registry

Configuration Examples

Quick search and download

# Search and show top 5 results
gifgrep cats --max 5

# Download the best match
gifgrep 'mind blown' --download --max 1

# JSON output for scripting
gifgrep search --json 'thumbs up' | jq '.[0].url'

Interactive TUI browser

# Open TUI with initial search
gifgrep tui 'office handshake'

# Keys: arrows=navigate, d=download, f=reveal, q=quit

Frame extraction

# Extract a single frame at 1.5 seconds
gifgrep still ./funny.gif --at 1.5s -o frame.png

# Create a 3x3 contact sheet
gifgrep sheet ./funny.gif --frames 9 --cols 3 -o sheet.png

Provider configuration

# Use Giphy (requires API key)
export GIPHY_API_KEY="your-key-here"
gifgrep 'celebration' --source giphy

# Force Tenor
gifgrep 'celebration' --source tenor

Installation

brew install steipete/tap/gifgrep

Homepage: https://gifgrep.com

Source: bundled