summarize
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSummarize
内容总结
Fast CLI to summarize URLs, local files, and YouTube links.
一款快速的CLI工具,用于总结网址、本地文件和YouTube链接内容。
When to use (trigger phrases)
适用场景(触发语句)
Use this skill immediately when the user asks any of:
- “use summarize.sh”
- “what’s this link/video about?”
- “summarize this URL/article”
- “transcribe this YouTube/video” (best-effort transcript extraction; no needed)
yt-dlp
当用户提出以下任一请求时,立即使用此工具:
- “使用summarize.sh”
- “这个链接/视频讲了什么?”
- “总结这个网址/文章”
- “转录此YouTube/视频”(尽最大努力提取转录内容;无需)
yt-dlp
Quick start
快速开始
bash
summarize "https://example.com" --model google/gemini-3-flash-preview
summarize "/path/to/file.pdf" --model google/gemini-3-flash-preview
summarize "https://youtu.be/dQw4w9WgXcQ" --youtube autobash
summarize "https://example.com" --model google/gemini-3-flash-preview
summarize "/path/to/file.pdf" --model google/gemini-3-flash-preview
summarize "https://youtu.be/dQw4w9WgXcQ" --youtube autoYouTube: summary vs transcript
YouTube:总结 vs 转录
Best-effort transcript (URLs only):
bash
summarize "https://youtu.be/dQw4w9WgXcQ" --youtube auto --extract-onlyIf the user asked for a transcript but it’s huge, return a tight summary first, then ask which section/time range to expand.
尽最大努力提取转录内容(仅支持网址):
bash
summarize "https://youtu.be/dQw4w9WgXcQ" --youtube auto --extract-only如果用户要求转录但内容过大,先返回精简总结,然后询问需要展开的章节/时间范围。
Model + keys
模型与密钥
Set the API key for your chosen provider:
- OpenAI:
OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY - xAI:
XAI_API_KEY - Google: (aliases:
GEMINI_API_KEY,GOOGLE_GENERATIVE_AI_API_KEY)GOOGLE_API_KEY
Default model is if none is set.
google/gemini-3-flash-preview为所选服务商设置API密钥:
- OpenAI:
OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY - xAI:
XAI_API_KEY - Google: (别名:
GEMINI_API_KEY、GOOGLE_GENERATIVE_AI_API_KEY)GOOGLE_API_KEY
若未设置模型,默认使用。
google/gemini-3-flash-previewUseful flags
实用参数
--length short|medium|long|xl|xxl|<chars>--max-output-tokens <count>- (URLs only)
--extract-only - (machine readable)
--json - (fallback extraction)
--firecrawl auto|off|always - (Apify fallback if
--youtube autoset)APIFY_API_TOKEN
--length short|medium|long|xl|xxl|<chars>--max-output-tokens <count>- (仅适用于网址)
--extract-only - (机器可读格式)
--json - (备用提取方式)
--firecrawl auto|off|always - (若设置
--youtube auto则使用Apify作为备用方案)APIFY_API_TOKEN
Config
配置
Optional config file:
~/.summarize/config.jsonjson
{ "model": "openai/gpt-5.2" }Optional services:
- for blocked sites
FIRECRAWL_API_KEY - for YouTube fallback
APIFY_API_TOKEN
可选配置文件:
~/.summarize/config.jsonjson
{ "model": "openai/gpt-5.2" }可选服务:
- 用于访问被屏蔽的网站
FIRECRAWL_API_KEY - 作为YouTube的备用方案
APIFY_API_TOKEN