summarize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Summarize

Summarize

Fast CLI to summarize URLs, local files, and YouTube links.
一款快速的CLI工具,可总结网页链接、本地文件及YouTube链接。

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

OpenCode Zen (FREE models!)

OpenCode Zen(免费模型!)

Use OpenCode Zen for free summarization with GLM 4.7:
bash
undefined
使用OpenCode Zen和GLM 4.7进行免费内容总结:
bash
undefined

Set env vars for OpenCode Zen

为OpenCode Zen设置环境变量

export OPENAI_BASE_URL="https://opencode.ai/zen/v1" export OPENAI_API_KEY="<your-zen-api-key>" # Get from https://opencode.ai/auth
export OPENAI_BASE_URL="https://opencode.ai/zen/v1" export OPENAI_API_KEY="<your-zen-api-key>" # 从https://opencode.ai/auth获取

Summarize with free GLM 4.7

使用免费GLM 4.7进行总结

summarize "https://example.com" --model openai/glm-4.7-free
undefined
summarize "https://example.com" --model openai/glm-4.7-free
undefined

Free models on OpenCode Zen:

OpenCode Zen上的免费模型:

ModelModel ID
GLM 4.7
glm-4.7-free
Big Pickle
big-pickle
Grok Code Fast 1
grok-code
MiniMax M2.1
minimax-m2.1-free
GPT 5 Nano
gpt-5-nano
ModelModel ID
GLM 4.7
glm-4.7-free
Big Pickle
big-pickle
Grok Code Fast 1
grok-code
MiniMax M2.1
minimax-m2.1-free
GPT 5 Nano
gpt-5-nano

When using summarize with OpenCode Zen:

使用OpenCode Zen调用summarize时:

bash
OPENAI_BASE_URL="https://opencode.ai/zen/v1" OPENAI_API_KEY="$OPENCODE_ZEN_KEY" summarize "URL" --model openai/glm-4.7-free
bash
OPENAI_BASE_URL="https://opencode.ai/zen/v1" OPENAI_API_KEY="$OPENCODE_ZEN_KEY" summarize "URL" --model openai/glm-4.7-free

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>
    :设置输出最大token数
  • --extract-only
    (仅适用于网页链接):仅提取内容
  • --json
    :输出机器可读的JSON格式
  • --firecrawl auto|off|always
    :使用Firecrawl作为内容提取的备选方案
  • --youtube auto
    :若已设置
    APIFY_API_TOKEN
    ,则使用Apify作为YouTube内容提取的备选方案

Config

配置文件

Optional config file:
~/.summarize/config.json
json
{ "model": "openai/gpt-5.2" }
For OpenCode Zen default:
json
{
  "model": "openai/big-pickle",
  "baseUrl": "https://opencode.ai/zen/v1"
}
Optional services:
  • FIRECRAWL_API_KEY
    for blocked sites
  • APIFY_API_TOKEN
    for YouTube fallback
可选配置文件路径:
~/.summarize/config.json
json
{ "model": "openai/gpt-5.2" }
若要默认使用OpenCode Zen:
json
{
  "model": "openai/big-pickle",
  "baseUrl": "https://opencode.ai/zen/v1"
}
可选第三方服务:
  • FIRECRAWL_API_KEY
    :用于访问被屏蔽的网站
  • APIFY_API_TOKEN
    :用于YouTube内容提取的备选方案