summarize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Summarize

内容总结

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
    yt-dlp
    needed)
当用户提出以下任一请求时,立即使用此工具:
  • “使用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 auto
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 auto

YouTube: summary vs transcript

YouTube:总结 vs 转录

Best-effort transcript (URLs only):
bash
summarize "https://youtu.be/dQw4w9WgXcQ" --youtube auto --extract-only
If 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:
    GEMINI_API_KEY
    (aliases:
    GOOGLE_GENERATIVE_AI_API_KEY
    ,
    GOOGLE_API_KEY
    )
Default model is
google/gemini-3-flash-preview
if none is set.
为所选服务商设置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-preview

Useful flags

实用参数

  • --length short|medium|long|xl|xxl|<chars>
  • --max-output-tokens <count>
  • --extract-only
    (URLs only)
  • --json
    (machine readable)
  • --firecrawl auto|off|always
    (fallback extraction)
  • --youtube auto
    (Apify fallback if
    APIFY_API_TOKEN
    set)
  • --length short|medium|long|xl|xxl|<chars>
  • --max-output-tokens <count>
  • --extract-only
    (仅适用于网址)
  • --json
    (机器可读格式)
  • --firecrawl auto|off|always
    (备用提取方式)
  • --youtube auto
    (若设置
    APIFY_API_TOKEN
    则使用Apify作为备用方案)

Config

配置

Optional config file:
~/.summarize/config.json
json
{ "model": "openai/gpt-5.2" }
Optional services:
  • FIRECRAWL_API_KEY
    for blocked sites
  • APIFY_API_TOKEN
    for YouTube fallback
可选配置文件:
~/.summarize/config.json
json
{ "model": "openai/gpt-5.2" }
可选服务:
  • FIRECRAWL_API_KEY
    用于访问被屏蔽的网站
  • APIFY_API_TOKEN
    作为YouTube的备用方案