gifgrep

GIF search ยท Terminal previews

GIF search for terminals

gifgrep is a tiny Go CLI/TUI that searches animated GIFs from GIPHY or KLIPY, pipes URLs/JSON into your scripts, and previews results inline in Kitty, Ghostty, or iTerm2.

Quickstart GitHub
brew install steipete/tap/gifgrep
CLITUIGIPHYKLIPYJSONKittyGhosttyiTerm2SixelANSI

Other install options โ†’

$ gifgrep cats -m 3
https://media.giphy.com/.../cat-typing.gif
https://media.giphy.com/.../cat-yes.gif
https://media.giphy.com/.../cat-stare.gif

$ gifgrep tui "office handshake"
   โ”Œโ”€ gifgrep โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚ /office handshake               โ”‚
   โ”‚ โ–ธ Pam & Jim handshake.gif       โ”‚
   โ”‚   The Office handshake meme.gif โ”‚
   โ”‚   Schrute approves.gif          โ”‚
   โ”‚   [animated preview here]       โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

#Try it

brew install steipete/tap/gifgrep
gifgrep cats           # plain on TTY, URLs in pipes
gifgrep tui cats       # interactive browser with inline previews

--json prints a stable envelope on stdout. Human progress and warnings go to stderr so pipes stay clean.

#What gifgrep does

  • One binary, two ergonomics. gifgrep <query> for shell pipelines; gifgrep tui for arrow-key browsing with animated inline previews.
  • Multi-provider. GIPHY (preferred when keyed), KLIPY, or auto which picks the best available.
  • Inline previews that actually animate. Kitty graphics for Kitty/Ghostty, OSC 1337 for iTerm2 โ€” see Previews.
  • Local frame extraction. still pulls one frame; sheet lays out a contact sheet of N frames, no provider required.
  • Pipe-shaped output. Plain on TTY, URL-per-line in pipes, plus --format md|tsv|comment|url|json for the rest.
  • Quiet by default, loud on demand. -v, -vv, -q, --no-color if you really want.

#Pick your path

  • Trying it out. Install โ†’ Quickstart. Two minutes from brew install to your first GIF in stdout.
  • Wiring it into shell scripts. Search for the CLI surface, JSON output for structured data, Providers to choose a backend.
  • Browsing visually. TUI for the keyboard-driven browser, Previews for the terminal protocol details.
  • Cutting frames out of a GIF. still for one frame, sheet for a contact sheet.
  • Looking up a flag. Every command has its own page โ€” start at Commands.

#Project

It's Go. It's tiny. It cleans up after itself. (Or at least it tries.)

If you somehow manage to grep the wrong GIF: that's on you. โค๏ธ