| name | summarize |
| description | 快速命令行工具,用于生成URL、本地文件和YouTube链接的摘要。支持网页、PDF、图像、音频等多种格式。 |
| triggers | ["摘要","summarize","总结","内容摘要","概括","内容总结","文章摘要","视频摘要"] |
| homepage | https://summarize.sh |
| metadata | {"clawdbot":{"emoji":"🧾","requires":{"bins":["summarize"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/summarize","bins":["summarize"],"label":"Install summarize (brew)"}]}} |
Summarize - 内容摘要工具
快速命令行工具,用于生成URL、本地文件和YouTube链接的摘要。支持网页、PDF、图像、音频等多种格式。
🚀 快速开始
基本使用
summarize https://example.com/article
summarize document.pdf
summarize report.docx
summarize presentation.pptx
summarize https://www.youtube.com/watch?v=example
summarize image.jpg
输出控制
summarize https://example.com --length short
summarize https://example.com --length medium
summarize https://example.com --length long
summarize https://example.com --length xl
summarize https://example.com --length xxl
summarize https://example.com --length 500
summarize https://example.com --length 1000
📝 功能详解
网页摘要
summarize https://news.example.com/article123
summarize https://example.com --firecrawl always
summarize https://example.com --extract-only
summarize https://example.com --json
文件摘要
summarize document.pdf
summarize report.pdf --length long
summarize report.docx
summarize proposal.docx --json
summarize presentation.pptx
summarize slides.pptx --length medium
summarize screenshot.png
summarize diagram.jpg --length short
summarize podcast.mp3
summarize interview.m4a --length medium
YouTube视频摘要
summarize https://www.youtube.com/watch?v=dQw4w9WgXcQ
export APIFY_API_TOKEN=your_token
summarize https://youtube.com/video --youtube auto
summarize https://youtube.com/video#t=60s,300s
⚙️ 配置选项
配置文件
创建 ~/.summarize/config.json:
{
"model": "openai/gpt-5.2",
"default_length": "medium",
"output_format": "text",
"language": "zh-CN",
"timeout": 30
}
环境变量
export SUMMARIZE_MODEL="openai/gpt-5.2"
export SUMMARIZE_MODEL="anthropic/claude-3.5-sonnet"
export SUMMARIZE_MODEL="google/gemini-3-flash-preview"
export FIRECRAWL_API_KEY="your_firecrawl_key"
export APIFY_API_TOKEN="your_apify_token"
export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"
高级标志
summarize https://example.com --max-output-tokens 1000
summarize https://example.com --language zh-CN
summarize https://example.com --language en-US
summarize https://example.com --language ja-JP
summarize https://example.com --timeout 60
summarize https://example.com --verbose
summarize https://example.com --debug
🎯 实用示例
示例1:新闻文章摘要
summarize https://news.example.com/article1 --length short
summarize https://news.example.com/article2 --length medium
summarize https://news.example.com/article3 --length long
cat news_urls.txt | xargs -I {} summarize {} --length short
示例2:学术论文摘要
summarize paper.pdf --length long
summarize research_paper.pdf --json | jq '.title, .authors, .summary'
find ./papers -name "*.pdf" -exec summarize {} --length medium \;
示例3:会议记录整理
summarize meeting_recording.mp3 --length medium
summarize meeting_notes.docx meeting_recording.mp3 --output meeting_summary.txt
summarize meeting.mp3 --json --output meeting.json
示例4:自动化工作流
#!/bin/bash
NEWS_URLS=(
"https://news.example.com/headline1"
"https://news.example.com/headline2"
"https://news.example.com/headline3"
)
OUTPUT_FILE="daily_news_summary_$(date +%Y%m%d).txt"
echo "=== 每日新闻摘要 $(date) ===" > "$OUTPUT_FILE"
echo "" >> "$OUTPUT_FILE"
for url in "${NEWS_URLS[@]}"; do
echo "处理: $url"
summarize "$url" --length short >> "$OUTPUT_FILE"
echo "" >> "$OUTPUT_FILE"
echo "---" >> "$OUTPUT_FILE"
echo "" >> "$OUTPUT_FILE"
done
echo "摘要已保存到: $OUTPUT_FILE"
示例5:研究资料整理
#!/bin/bash
RESEARCH_DIR="./research_materials"
OUTPUT_DIR="./summaries"
mkdir -p "$OUTPUT_DIR"
find "$RESEARCH_DIR" -name "*.pdf" | while read pdf; do
basename=$(basename "$pdf" .pdf)
echo "处理PDF: $basename"
summarize "$pdf" --length medium --output "$OUTPUT_DIR/${basename}_summary.txt"
done
if [ -f "$RESEARCH_DIR/bookmarks.txt" ]; then
while read url; do
if [ -n "$url" ]; then
domain=$(echo "$url" | sed -e 's|^[^/]*//||' -e 's|/.*$||')
safe_name=$(echo "$domain" | tr './' '_')
echo "处理网页: $domain"
summarize "$url" --length short --output "$OUTPUT_DIR/web_${safe_name}_summary.txt"
fi
done < "$RESEARCH_DIR/bookmarks.txt"
fi
🔧 故障排除
常见问题
1. 网站访问失败
export FIRECRAWL_API_KEY="your_key"
summarize https://blocked-site.com --firecrawl always
export HTTP_PROXY="http://proxy:8080"
summarize https://example.com
2. YouTube视频处理失败
export APIFY_API_TOKEN="your_apify_token"
summarize https://youtube.com/video --youtube auto
summarize https://youtube.com/video --youtube always
3. 大文件处理超时
summarize large_document.pdf --timeout 120
summarize large_document.pdf --length short
summarize large_document.pdf --chunk-size 1000
4. 内存不足
export SUMMARIZE_MODEL="openai/gpt-4o-mini"
summarize document.pdf
pdftoppm -jpeg document.pdf | summarize -
调试技巧
summarize https://example.com --verbose
summarize https://example.com --debug
summarize https://example.com --trace
📚 学习资源
命令参考
summarize --help
summarize --version
summarize --formats
相关技能
- news: 新闻获取和摘要
- markdownify-mcp: 内容转换工具
- pdf: PDF文件处理
- openai-whisper: 语音转文字
最佳实践
- 选择合适长度: 根据需求选择short/medium/long
- 使用结构化输出: 脚本处理时使用--json格式
- 配置API密钥: 需要时设置FIRECRAWL和APIFY密钥
- 批量处理优化: 使用xargs或脚本批量处理
- 错误处理: 添加适当的错误处理和重试机制
性能优化
parallel summarize {} --length short ::: *.pdf
summarize https://example.com --cache
pdftotext large.pdf - | summarize - --length medium
提示: summarize工具非常适合快速获取内容概要,但对于需要深度分析或精确提取的任务,建议结合其他工具(如专门的PDF解析器、网页爬虫等)使用。