gifgrep 是做什麼的?
使用 gifgrep 搜尋 GIF 提供者(Tenor/Giphy),以 TUI 瀏覽,下載結果,並提取靜止圖像或圖表。
GIF-Grab(gifgrep 工作流程)
- 搜尋 -> 預覽 -> 下載 -> 提取(靜止圖像/圖表)以快速檢視與分享。
快速開始
gifgrep cats --max 5gifgrep cats --format url | head -n 5gifgrep search --json cats | jq '.[0].url'gifgrep tui "office handshake"gifgrep cats --download --max 1 --format url
TUI + 預覽
- TUI:
gifgrep tui "query" - CLI 靜止預覽:
--thumbs(僅限 Kitty/Ghostty;靜止圖框)
下載 + 顯示
--download儲存至~/Downloads--reveal在 Finder 中顯示最後一次下載
靜止圖像 + 圖表
gifgrep still ./clip.gif --at 1.5s -o still.pnggifgrep sheet ./clip.gif --frames 9 --cols 3 -o sheet.png- 圖表 = 單張 PNG 網格,取樣自影格(非常適合快速檢視、文件、PR、聊天)。
- 調整:
--frames(影格數)、--cols(網格寬度)、--padding(間距)。
提供者
--source auto|tenor|giphy- 使用
--source giphy需設定GIPHY_API_KEY TENOR_API_KEY為選用(若未設定則使用 Tenor 示範金鑰)
輸出
--json輸出結果陣列(id、title、url、preview_url、tags、width、height)--format用於管線友善的欄位(例如url)
GIF 資產衛生
- 在推薦或使用動畫 GIF URL 之前,請確認其解析成功、
Content-Type為image/gif,且確實為動畫(多影格或循環中繼資料;例如使用file、identify或小型腳本檢查)。 - 同時記錄資產的歸屬/授權/來源 URL。
- 當需要本機資產時,請勿直接熱連結:應下載/複製到專案中,並引用本機檔案。
環境調整
GIFGREP_SOFTWARE_ANIM=1強制使用軟體動畫GIFGREP_CELL_ASPECT=0.5調整預覽幾何