summarize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Summarize

Summarize

Use the
summarize
CLI as the canonical interface. Prefer a released binary on
PATH
; inside this repository, use
pnpm -s summarize
for the current checkout.
使用
summarize
CLI 作为标准交互接口。优先使用已发布并添加到
PATH
中的二进制文件;在本仓库内,可使用
pnpm -s summarize
调用当前检出版本的工具。

Start

快速开始

  1. Confirm the command and current contract:
    bash
    summarize --version
    summarize --help
  2. Inspect model/provider readiness when a summary needs an LLM:
    bash
    summarize status
    summarize status --json
  3. Run the narrowest workflow below. Quote URLs and paths. Add
    --timeout 2m
    for slow remote or media inputs.
Never print, request, or copy API-key values.
summarize status
reports availability without exposing secrets.
  1. 确认命令及当前协议:
    bash
    summarize --version
    summarize --help
  2. 当摘要需要调用LLM时,检查模型/服务商就绪状态:
    bash
    summarize status
    summarize status --json
  3. 运行以下最贴合需求的工作流。网址和路径需加引号。对于远程或媒体类慢输入,添加
    --timeout 2m
    参数。
切勿打印、请求或复制API密钥值。
summarize status
会报告可用性但不会暴露敏感信息。

Summarize

生成摘要

Web page or remote document:
bash
summarize "https://example.com/article"
summarize "https://example.com/report.pdf" --length short
Local file or stdin:
bash
summarize "./report.pdf"
summarize "./recording.m4a"
printf '%s\n' "Long text to summarize" | summarize -
Use
--plain
for unrendered Markdown/text. Use
--language
,
--length
,
--prompt
, or
--prompt-file
only when the task requires an override. Use
--cli codex
,
--cli claude
, or another installed CLI provider when the user requests that provider or no direct API provider is configured.
网页或远程文档:
bash
summarize "https://example.com/article"
summarize "https://example.com/report.pdf" --length short
本地文件或标准输入:
bash
summarize "./report.pdf"
summarize "./recording.m4a"
printf '%s\n' "需要摘要的长文本" | summarize -
使用
--plain
参数获取未渲染的Markdown/纯文本内容。仅当任务需要覆盖默认设置时,才使用
--language
--length
--prompt
--prompt-file
参数。当用户指定服务商或未配置直接API服务商时,使用
--cli codex
--cli claude
或其他已安装的CLI服务商。

Extract without a summary

仅提取内容(不生成摘要)

Use
--extract
to stop after extraction or transcription:
bash
summarize "https://example.com/article" --extract --format md
summarize "./report.pdf" --extract --format md
summarize "https://youtu.be/VIDEO_ID" --extract --format md
--extract
does not support stdin. Extraction can still call configured transcription, OCR, Firecrawl, or Markdown services; it only skips the final summary call.
--markdown-mode llm
also invokes an LLM to reshape extracted text.
使用
--extract
参数在完成提取或转录后停止操作:
bash
summarize "https://example.com/article" --extract --format md
summarize "./report.pdf" --extract --format md
summarize "https://youtu.be/VIDEO_ID" --extract --format md
--extract
不支持标准输入。提取操作仍会调用已配置的转录、OCR、Firecrawl或Markdown服务;仅会跳过最终的摘要生成调用。
--markdown-mode llm
参数也会调用LLM来重构提取的文本。

YouTube, audio, and video

YouTube、音频与视频处理

Default transcript selection:
bash
summarize "https://youtu.be/VIDEO_ID"
summarize "https://youtu.be/VIDEO_ID" --extract --format md --timestamps
Use
--youtube web
to require web captions or
--youtube yt-dlp
to require the download/transcription path. Keep
auto
unless the user needs a specific source.
Local or remote audio/video:
bash
summarize "./interview.mp3" --extract
summarize "./interview.mp4" --extract --timestamps
summarize "./interview.mp3" --extract --diarize
--transcriber auto
is the default. Use an explicit transcriber only when requested or diagnosing a provider. Diarization may require configured ElevenLabs or OpenAI access. Speaker identification is a separate opt-in step; do not infer identities without evidence.
For slides:
bash
summarize "https://youtu.be/VIDEO_ID" --slides
summarize "./talk.mp4" --slides --extract
Slide extraction may require
yt-dlp
; OCR requires
tesseract
.
默认转录内容选择:
bash
summarize "https://youtu.be/VIDEO_ID"
summarize "https://youtu.be/VIDEO_ID" --extract --format md --timestamps
使用
--youtube web
参数强制使用网页字幕,或使用
--youtube yt-dlp
参数强制采用下载/转录路径。除非用户需要特定来源,否则保持默认的
auto
选项。
本地或远程音频/视频:
bash
summarize "./interview.mp3" --extract
summarize "./interview.mp4" --extract --timestamps
summarize "./interview.mp3" --extract --diarize
默认使用
--transcriber auto
。仅当用户要求或排查服务商问题时,才指定明确的转录工具。说话人分离(Diarization)可能需要配置ElevenLabs或OpenAI权限。说话人识别是单独的可选步骤;若无证据,请勿推断身份。
幻灯片提取:
bash
summarize "https://youtu.be/VIDEO_ID" --slides
summarize "./talk.mp4" --slides --extract
幻灯片提取可能需要
yt-dlp
;OCR功能需要
tesseract

JSON for automation

用于自动化的JSON输出

Use JSON when another command or agent will parse the result:
bash
summarize "https://example.com" --json --metrics off > result.json
jq -r '.summary // .extracted.content // empty' result.json
The stable top-level envelope contains
input
,
env
,
extracted
,
prompt
,
llm
,
metrics
, and
summary
.
summary
or
llm
can be
null
when extraction or a no-model path handles the input. In
--extract --json
mode, read extracted text from
.extracted.content
.
JSON stays on stdout. Progress, warnings, and finish metrics stay on stderr. Do not merge stderr into stdout before parsing. Use
--metrics detailed
only when the task needs usage details.
当其他命令或Agent需要解析结果时,使用JSON格式:
bash
summarize "https://example.com" --json --metrics off > result.json
jq -r '.summary // .extracted.content // empty' result.json
稳定的顶层结构包含
input
env
extracted
prompt
llm
metrics
summary
。当输入由提取或无模型路径处理时,
summary
llm
可能为
null
。在
--extract --json
模式下,从
.extracted.content
读取提取的文本。
JSON内容输出到标准输出(stdout)。进度、警告和完成指标输出到标准错误(stderr)。解析前请勿将stderr合并到stdout。仅当任务需要使用详情时,才使用
--metrics detailed
参数。

Configuration and dependencies

配置与依赖

Precedence: CLI flags, process environment,
~/.summarize/config.json
, built-in defaults. Prefer flags for one run; change config only when the user asks for a persistent default.
Useful diagnostics:
bash
summarize status --verbose
summarize status --probe
summarize "INPUT" --verbose
Plain web summaries need no media tools. Media paths may use
ffmpeg
,
yt-dlp
, local Whisper/ONNX, or configured cloud transcription. Website fallback may use Firecrawl. Confirm the exact missing capability from the error before installing tools or changing config.
Inputs may be sent to the selected model, extraction, OCR, or transcription provider. For confidential material, confirm the approved provider or use an approved local path before running the command.
优先级:CLI参数 > 进程环境变量 >
~/.summarize/config.json
> 内置默认值。单次运行优先使用参数;仅当用户要求设置持久默认值时,才修改配置。
实用诊断命令:
bash
summarize status --verbose
summarize status --probe
summarize "INPUT" --verbose
纯网页摘要无需媒体工具。媒体处理可能会使用
ffmpeg
yt-dlp
、本地Whisper/ONNX或已配置的云转录服务。网站内容提取的备用方案可能使用Firecrawl。在安装工具或修改配置前,先从错误信息中确认具体缺失的功能。
输入内容可能会发送至所选的模型、提取、OCR或转录服务商。对于机密内容,运行命令前需确认已获批准的服务商或使用已获批准的本地处理路径。

Verify

结果验证

After every run:
  • Require exit status
    0
    .
  • Require non-empty summary or extracted content.
  • For JSON, parse stdout with
    jq
    or another JSON parser.
  • For source-sensitive work, inspect
    extracted
    ,
    llm
    , and stderr diagnostics rather than assuming the selected path.
  • Re-run the exact final command after changing provider, config, or flags.
For current option details, run
summarize --help
and read the repository documentation:
  • Quickstart
  • Main command
  • Configuration
  • YouTube
  • Media
  • Extraction
每次运行后:
  • 确保退出状态为
    0
  • 确保摘要或提取内容非空。
  • 对于JSON格式,使用
    jq
    或其他JSON解析器解析stdout内容。
  • 对于对来源敏感的工作,检查
    extracted
    llm
    和stderr诊断信息,而非假设所选处理路径正确。
  • 修改服务商、配置或参数后,重新运行最终确定的命令。
如需了解当前选项的详细信息,运行
summarize --help
并查阅仓库文档:
  • 快速入门
  • 主命令
  • 配置
  • YouTube处理
  • 媒体处理
  • 仅提取内容

Ownership

维护说明

This file is the canonical agent workflow for the Summarize product. Keep generic agent workflows in
openclaw/agent-skills
; keep Summarize CLI behavior here. Downstream integrations should link to this file at a released tag or pinned commit and retain only their packaging or integration-specific notes. Do not maintain a second broad command guide downstream.
本文件是Summarize产品的标准Agent工作流。通用Agent工作流请存放于
openclaw/agent-skills
;Summarize CLI的行为说明请保留于此。下游集成应链接至本文件的已发布标签或固定提交,仅保留其打包或集成相关的特定说明。请勿在下游维护第二份通用命令指南。