用途:gifgrep 通过 CLI 或 TUI 搜索 GIF 提供方(Tenor/Giphy),完成搜索、预览、下载、提取静帧或帧网格的流程,适合快速查看与分享。
主要能力:支持关键词搜索并限制数量,如 gifgrep cats --max 5;可用 --format url 输出便于管道处理,如 gifgrep cats --format url | head -n 5;支持 JSON 输出,如 gifgrep search --json cats | jq '.[0].url'。提供 TUI 浏览,如 gifgrep tui "office handshake"。可下载结果,如 gifgrep cats --download --max 1 --format url,保存到 ~/Downloads,--reveal 可在 Finder 中显示最近下载。可从 GIF 提取静帧:gifgrep still ./clip.gif --at 1.5s -o still.png;也可生成帧网格图:gifgrep sheet ./clip.gif --frames 9 --cols 3 -o sheet.png,网格为单张 PNG,便于评审、文档、PR 或聊天分享,可用 --frames、--cols、--padding 调整。
提供方与输出:--source 可选 auto|tenor|giphy;使用 giphy 需 GIPHY_API_KEY,Tenor 的 TENOR_API_KEY 可选,未设置时使用演示密钥。--json 输出包含 id、title、url、preview_url、tags、width、height 的数组;--format 输出便于管道的字段。
环境变量:GIFGREP_SOFTWARE_ANIM=1 强制软件动画;GIFGREP_CELL_ASPECT=0.5 调整预览几何。CLI 静帧预览 --thumbs 仅支持 Kitty/Ghostty。
限制:部分功能依赖终端(如 --thumbs 仅限 Kitty/Ghostty);Giphy 需 API 密钥;其余平台、收费与效果信息暂未提供。