Releases: Che7seaChen/youtube-cli
youtube-cli 0.2.1
youtube-cli 0.2.1
youtube-cli 0.2.1 improves --use-auth reliability by falling back to anonymous reads when authenticated extraction fails.
youtube-cli 0.2.1 增强 --use-auth 稳定性:当认证链路读取失败时自动回退匿名读取。
Fixed / 修复
-
added auth-to-anon fallback for read operations when authenticated extraction fails (e.g., unsupported format)
-
--use-authno longer breaksvideo/formats/comments/playlistreads on public videos -
认证链路读取失败时自动回退匿名读取(如遇到 format 不可用)
-
--use-auth不再导致公开视频读链路失败
Representative Commands / 代表性命令
youtube --no-check-certificate video "https://www.youtube.com/watch?v=VIDEO_ID" --use-auth
youtube --no-check-certificate comments "https://www.youtube.com/watch?v=VIDEO_ID" --use-auth --limit 20Requirements / 依赖
- Python 3.11+
ffmpegyt-dlp >= 2026.3.3- optional / 可选:
aria2c
youtube-cli 0.1.3
youtube-cli 0.1.3
youtube-cli 0.1.3 introduces AI subtitle translation fallback and improves auth-aware metadata commands.
youtube-cli 0.1.3 引入字幕缺失时的 AI 翻译补全,并增强带认证的元数据读取能力。
Added / 新增
-
translate missing subtitle languages using AI while keeping timestamps aligned
-
--use-authforvideo,comments, andformats -
translation configuration via environment variables
-
optional JS challenge runtime configuration via
YOUTUBE_CLI_JS_RUNTIMESandYOUTUBE_CLI_REMOTE_COMPONENTS -
缺失字幕语言自动翻译并保持时间轴对齐
-
video/comments/formats新增--use-auth -
新增翻译服务相关环境变量
-
新增 JS challenge 运行时配置变量
Changed / 变更
- subtitles are exported as per-language files only (bilingual SRT merge removed)
- if no subtitles exist, subtitle export is skipped (download still succeeds)
- 字幕改为单语文件输出(不再合并双语 SRT)
- 无字幕时跳过字幕导出(视频仍会下载)
Representative Commands / 代表性命令
# Enable AI subtitle translation
export YOUTUBE_CLI_TRANSLATION_PROVIDER=openai
export YOUTUBE_CLI_OPENAI_API_KEY="..."
export YOUTUBE_CLI_OPENAI_MODEL="..."
# Download with subtitle translation fallback
youtube download "https://www.youtube.com/watch?v=VIDEO_ID" --write-subs --sub-lang en --sub-lang zh-CN
# Auth-aware metadata
youtube video "https://www.youtube.com/watch?v=VIDEO_ID" --use-auth
youtube comments "https://www.youtube.com/watch?v=VIDEO_ID" --use-auth --limit 20Requirements / 依赖
- Python 3.11+
ffmpegyt-dlp >= 2026.3.3- optional / 可选:
aria2c
Notes / 备注
- AI 翻译会向外部服务发送字幕文本,请确认合规与权限。
youtube-cli 0.1.2
youtube-cli 0.1.2
youtube-cli 0.1.2 focuses on a faster login setup and clearer headless guidance.
youtube-cli 0.1.2 聚焦更快的登录准备流程与更清晰的无头环境指引。
Added / 新增
-
export cookies directly from a logged-in browser via
youtube login --export-cookies -
login page opens in an incognito/private window by default with a safe fallback
-
headless environments are detected and guided to use cookies files instead
-
新增
youtube login --export-cookies直接导出 cookies.txt -
默认尝试无痕/隐身窗口打开登录页,失败回退普通窗口
-
检测无头环境并引导改用 cookies 文件方案
What Stays the Same / 保持不变
-
search videos, channels, and playlists
-
inspect video details, comments, related videos, and formats
-
read subscriptions, favorites, watch later, history, recommendations, and notifications
-
download video, audio, subtitles, and bilingual subtitle files
-
batch downloads, playlist downloads, and resume via manifest
-
create playlists, add videos to playlists, delete playlists
-
搜索视频、频道和 playlist
-
查看视频详情、评论、相关推荐和格式信息
-
读取订阅、收藏、稍后再看、历史、推荐、通知
-
下载视频、音频、字幕和双语字幕文件
-
批量下载、整 playlist 下载、manifest 恢复
-
创建 playlist、把视频加入 playlist、删除 playlist
Representative Commands / 代表性命令
# Export cookies from a local browser
youtube login --export-cookies ~/Downloads/youtube-cookies.txt --check
youtube status --check
# Headless/VPS
youtube login --cookies /home/USER/youtube-cookies.txt --check
# Write actions
youtube playlist-create "test" --privacy public --yes
youtube playlist-add "https://www.youtube.com/watch?v=VIDEO_ID" PLAYLIST_ID --yesRequirements / 依赖
- Python 3.11+
ffmpegyt-dlp >= 2026.3.3- optional / 可选:
aria2c
Thanks / 致谢
- [@yt-dlp/yt-dlp](https://github.com/yt-dlp/yt-dlp) — the upstream foundation for YouTube extraction, downloads, subtitles, cookies, and client compatibility
youtube-cli 0.1.1
youtube-cli 0.1.1
youtube-cli 0.1.1 is a patch release focused on write-path stability and release polish.
youtube-cli 0.1.1 是一个补丁版本,重点收口写操作的幂等行为和发布文档。
Fixes / 修复
-
repeated
save-to-watch-laterandplaylist-addrequests no longer surface raw HTTP 409 errors -
duplicate add operations now return a clearer already-exists style status in the write response
-
release docs and acknowledgements were cleaned up for public release
-
save-to-watch-later和playlist-add在重复添加时,不再暴露原始 HTTP 409 -
重复添加现在会返回更清晰的“已存在”状态,便于脚本和 agent 处理
-
发布文档和致谢名单已补齐并收口
What Stays the Same / 保持不变
-
search videos, channels, and playlists
-
inspect video details, comments, related videos, and formats
-
read subscriptions, favorites, watch later, history, recommendations, and notifications
-
download video, audio, subtitles, and bilingual subtitle files
-
batch downloads, playlist downloads, and resume via manifest
-
create playlists, add videos to playlists, delete playlists
-
搜索视频、频道和 playlist
-
查看视频详情、评论、相关推荐和格式信息
-
读取订阅、收藏、稍后再看、历史、推荐、通知
-
下载视频、音频、字幕和双语字幕文件
-
批量下载、整 playlist 下载、manifest 恢复
-
创建 playlist、把视频加入 playlist、删除 playlist
Representative Commands / 代表性命令
youtube login --browser chrome --check
youtube search "macbook neo" --type video --limit 10
youtube save-to-watch-later "https://www.youtube.com/watch?v=VIDEO_ID" --yes
youtube playlist-add "https://www.youtube.com/watch?v=VIDEO_ID" PLAYLIST_ID --yes
youtube playlist-download PLAYLIST_ID --quality 360p
youtube playlist-create "test" --privacy private --yesRequirements / 依赖
- Python 3.11+
ffmpegyt-dlp >= 2026.3.3- optional / 可选:
aria2c
TLS Certificate Workaround / TLS 证书问题绕行
If your machine has a broken local certificate chain, you can run:
如果当前机器的本地证书链异常,可以这样执行:
youtube --no-check-certificate status --check
youtube --no-check-certificate playlist-create "Test Playlist" --privacy private --yesOr set this once for the current shell session:
或者给当前 shell 会话设置一次环境变量:
export YOUTUBE_CLI_NO_CHECK_CERTIFICATE=1Thanks / 致谢
- @yt-dlp/yt-dlp — the upstream foundation for YouTube extraction, downloads, subtitles, cookies, and client compatibility
- @jackwener/bilibili-cli — a practical reference for command design, structured output, and public-facing CLI documentation
- @pallets/click — the command-line framework used to shape the CLI surface
- @Textualize/rich — terminal rendering support for readable operator output
- @FFmpeg/FFmpeg — media post-processing and format handling
youtube-cli 0.1.0
youtube-cli 0.1.0
youtube-cli is a YouTube CLI for browsing videos, channels, playlists, authenticated feeds, and download workflows.
youtube-cli 是一个面向真实使用场景的 YouTube CLI,用来查看内容、读取登录态列表、批量下载视频/音频/字幕,以及完成高价值但边界清晰的账号操作。
Highlights / 版本重点
-
Added
playlist-downloadfor one-command playlist downloads -
Added
playlist-createandplaylist-deleteto complete playlist workflows -
Download flow now supports quality selection, batch files, manifest resume, bilingual subtitles, and optional
aria2c -
Subtitle export is decoupled from main downloads: subtitle failure does not fail the main video / audio task
-
Authenticated subtitle and download flows follow
yt-dlpbehavior and support--use-authwhen needed -
新增
playlist-download,可直接下载整个 playlist -
新增
playlist-create和playlist-delete,playlist 工作流正式闭环 -
下载链路支持清晰度选择、批量文件、manifest 恢复、双语字幕和可选
aria2c -
字幕导出与主下载解耦,字幕失败不会把视频 / 音频主任务标成失败
-
认证态字幕与下载链路遵循
yt-dlp的成熟行为,需要时可显式加--use-auth
What You Can Do / 当前可用能力
-
inspect videos, comments, related videos, and formats
-
search videos, channels, and playlists
-
browse channel pages, channel videos, and channel playlists
-
read subscriptions, favorites, watch later, history, recommendations, and notifications
-
download video and audio
-
export manual subtitles, auto subtitles, and bilingual subtitle files
-
run batch downloads with
--batch-file -
resume unfinished downloads with
--resume-failed -
download an entire playlist with
playlist-download -
save a video to watch later
-
add a video to a playlist
-
create and delete playlists
-
use normalized
--yamland--jsonoutput for scripts and agents -
查看视频、评论、相关推荐和格式信息
-
搜索视频、频道和 playlist
-
浏览频道主页、频道视频和频道 playlist
-
读取订阅、收藏、稍后再看、历史、推荐、通知
-
下载视频和音频
-
导出人工字幕、自动字幕和双语字幕文件
-
通过
--batch-file执行批量下载 -
通过
--resume-failed恢复未完成任务 -
用
playlist-download下载整个 playlist -
把视频加入稍后再看
-
把视频加入指定 playlist
-
创建和删除 playlist
-
用标准化
--yaml/--json输出对接脚本和 agent
Representative Commands / 代表性命令
youtube login --browser chrome --check
youtube status --check
youtube search "openai" --type channel --limit 5
youtube video "https://www.youtube.com/watch?v=VIDEO_ID"
youtube subtitles "https://www.youtube.com/watch?v=VIDEO_ID" --language en
youtube download "https://www.youtube.com/watch?v=VIDEO_ID" --quality 360p
youtube download "https://www.youtube.com/watch?v=VIDEO_ID" --write-subs --sub-lang en --sub-lang zh-CN
youtube audio "https://www.youtube.com/watch?v=VIDEO_ID"
youtube playlist-download PLAYLIST_ID --quality 360p
youtube save-to-watch-later "https://www.youtube.com/watch?v=VIDEO_ID" --yes
youtube playlist-create "My Playlist" --privacy private --yes
youtube playlist-add "https://www.youtube.com/watch?v=VIDEO_ID" PLAYLIST_ID --yes
youtube playlist-delete PLAYLIST_ID --yesRequirements / 依赖
- Python 3.11+
ffmpegyt-dlp >= 2026.3.3- optional / 可选:
aria2c
Notes / 使用说明
-
public metadata and downloads usually work without login
-
authenticated feeds and write actions require browser cookies
-
write actions always require explicit
--yesor--dry-run -
subtitles are saved as separate files
-
subtitle export failure does not fail the main video / audio download
-
公开内容的读取和下载通常不需要登录
-
登录态 feeds 和写操作需要浏览器 Cookie
-
所有写操作都要求显式
--yes或--dry-run -
字幕以独立文件保存
-
字幕导出失败不会让主视频 / 音频下载失败
TLS Certificate Workaround / TLS 证书问题绕行
If your machine has a broken local certificate chain, you can run:
如果当前机器的本地证书链异常,可以这样执行:
youtube --no-check-certificate status --check
youtube --no-check-certificate playlist-create "Test Playlist" --privacy private --yesOr set this once for the current shell session:
或者给当前 shell 会话设置一次环境变量:
export YOUTUBE_CLI_NO_CHECK_CERTIFICATE=1