BibiGPT CLI (bibi)
Summarize videos, audio, and podcasts from the terminal using the BibiGPT API.
Installation
macOS (Homebrew)
CODEBLOCK0
Windows
Download the installer from: https://bibigpt.co/download/desktop
INLINECODE1
Verify installation
CODEBLOCK1
Authentication
After installing, the user must log in via the desktop app at least once. The CLI reads the saved session automatically from the desktop app's settings.
Alternatively, set an API token:
CODEBLOCK2
On Windows (PowerShell):
CODEBLOCK3
Commands
Summarize a URL
Important: URLs containing ? or & must be quoted to avoid shell glob errors.
CODEBLOCK4
Supported URL types: YouTube, Bilibili, podcasts, audio files, and any URL supported by BibiGPT.
Authentication
CODEBLOCK5
Updates
CODEBLOCK6
Output Format
- - Default: Markdown summary text sent to stdout. Progress info goes to stderr.
- --json: Complete API response as pretty-printed JSON to stdout.
This means you can pipe the output:
CODEBLOCK7
Error Handling
| Exit Code | Meaning |
|---|
| 0 | Success |
| 1 |
Error (auth missing, API error, timeout, etc.) |
| HTTP Status | User Action |
|---|
| 401 | Token expired — run bibi auth login or re-login in desktop app |
| 402/403 |
Quota exceeded — visit https://bibigpt.co/pricing |
| 429 | Rate limited — wait and retry |
Usage Tips
- - For very long videos, use
--async to avoid HTTP timeout. - Use
--subtitle to get raw subtitles/transcript without AI summarization. - Use
--json when you need structured data (e.g., sourceUrl, htmlUrl, detail). - The
--chapter flag provides section-by-section summaries, useful for lectures or tutorials. - The CLI does NOT open any GUI window — all output goes to the terminal.
- Run
bibi check-update periodically to get new features and bug fixes.
BibiGPT CLI (bibi)
使用 BibiGPT API 从终端总结视频、音频和播客。
安装
macOS (Homebrew)
bash
brew install --cask jimmylv/bibigpt/bibigpt
Windows
从以下地址下载安装程序:https://bibigpt.co/download/desktop
winget install BibiGPT --source winget
验证安装
bash
bibi --version
身份验证
安装后,用户必须至少通过桌面应用登录一次。CLI 会自动从桌面应用的设置中读取已保存的会话。
或者,设置 API 令牌:
bash
export BIBIAPITOKEN=<令牌>
在 Windows (PowerShell) 上:
powershell
$env:BIBIAPITOKEN=<令牌>
命令
总结 URL
重要:包含 ? 或 & 的 URL 必须用引号括起来,以避免 shell 通配符错误。
bash
基础总结(Markdown 输出到标准输出)
bibi summarize
异步模式 — 推荐用于长视频(>30分钟)
bibi summarize --async
逐章节总结
bibi summarize --chapter
仅获取字幕/转录文本(无 AI 总结)
bibi summarize --subtitle
完整 JSON 响应
bibi summarize --json
组合标志
bibi summarize --subtitle --json
支持的 URL 类型:YouTube、Bilibili、播客、音频文件以及 BibiGPT 支持的任何 URL。
身份验证
bash
检查当前身份验证状态
bibi auth check
打开浏览器登录
bibi auth login
显示如何设置 API 令牌
bibi auth set-token
更新
bash
检查是否有新版本可用
bibi check-update
下载并安装最新版本
bibi self-update
输出格式
- - 默认:Markdown 总结文本输出到标准输出。进度信息输出到标准错误。
- --json:完整的 API 响应以美化打印的 JSON 格式输出到标准输出。
这意味着你可以管道输出:
bash
bibi summarize > summary.md
bibi summarize --json | jq .summary
错误处理
错误(缺少身份验证、API 错误、超时等) |
| HTTP 状态码 | 用户操作 |
|---|
| 401 | 令牌过期 — 运行 bibi auth login 或在桌面应用中重新登录 |
| 402/403 |
配额超出 — 访问 https://bibigpt.co/pricing |
| 429 | 请求频率受限 — 等待后重试 |
使用技巧
- - 对于非常长的视频,使用 --async 避免 HTTP 超时。
- 使用 --subtitle 获取原始字幕/转录文本,无需 AI 总结。
- 当你需要结构化数据时(例如 sourceUrl、htmlUrl、detail),使用 --json。
- --chapter 标志提供逐节总结,适用于讲座或教程。
- CLI 不会打开任何 GUI 窗口 — 所有输出都发送到终端。
- 定期运行 bibi check-update 以获取新功能和错误修复。