
yt-mem-ai
io.github.dasein108由 GitHub 帳號 dasein108 發布v0.6.3更新於 Oct 24, 2026
Local YouTube memory: transcribe, embed and search videos, with summaries and highlights.
概覽
本機 YouTube 記憶伺服器,讓助理轉錄、索引並檢索影片,再撰寫摘要、帶時間戳的重點、問答與每日摘要。
- 可以做什麼
- 擷取與分析影片:抓取影片轉錄文字、發現訂閱更新、批次擷取待處理影片、列出頻道近期上傳,並回傳轉錄內容供模型自行總結。檢索與讀取資料庫:對已存轉錄做混合、向量或全文檢索並附時間戳,還可查看影片中繼資料、轉錄、清單與狀態統計。把摘要、重點與問答存回儲存區。記錄喜歡與不喜歡,並依本機資料庫給出推薦。產生媒體:帶深層連結的重點文件、靜態截圖與渲染的精華片段合輯。檢視與修改設定,並在更換模型後重新嵌入資料庫。
- 適用情境
- 適合讓助理處理你觀看的 YouTube 內容:總結單一影片、找出某個主題被提到的時間點、把訂閱內容整理成每日摘要,或製作跨影片回顧與簡報,且全部保留在本機。
- 執行需求
- 以本機程序執行,通常透過 uvx 從 yt-mem-ai 套件啟動;需要 Python 3.11+ 與 uv,僅 supercut 和 frame 需要 ffmpeg。下載影片與字幕需要網路存取。預設不需要 API 金鑰;只有選擇 OpenAI 嵌入後端時才需要 OPENAI_API_KEY。首次執行會下載約 1 GB 的機器學習相依套件以及嵌入與 Whisper 模型。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 yt-mem-ai,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
yt-mem-ai — a local YouTube memory for your AI assistant
Give Claude, Codex, Cursor, or any MCP host the ability to watch YouTube for you: transcribe videos, remember them, follow your subscriptions, and turn all of it into summaries, timestamped highlights, Q&A, digests, and video reels. Everything runs on your machine — no cloud service, no API key.
[Installing the yt skills for Codex in one command]
One command, two questions — here it's wiring the skills into Codex.
Example — "make a presentation from this video" (Andrej Karpathy: From Vibe Coding to Agentic Engineering, Sequoia, 30 min) → 13 slides, PDF, every quote timestamped from the transcript. Ingest to deck in one request.
Table of Contents
Features
- 🎧 Transcribes any video — YouTube captions when they exist (fast, any language), offline Whisper when they don't.
- 🧠 Remembers what you watched — every transcript is stored and indexed locally, so your library stays searchable forever. Nothing leaves your machine.
- 🔎 Finds the moment — ask "what did that video say about X" and get the answer with a timestamp you can jump to.
- 📡 Follows your subscriptions — picks up new uploads and turns the day into one digest.
- ✍️ Your assistant does the writing — summaries, highlights, Q&A, slide decks, all in the video's own language, using the model you already pay for.
- ❤️ Learns your taste — like or dislike videos and get recommendations from your own library.
- 🎬 Makes media too — clickable highlight docs, still frames, and rendered supercut reels.
- 🔌 Works with your tools — Claude Code, Claude Desktop, Codex, Cursor, Antigravity, OpenClaw, Hermes: skills or MCP, your pick.
How to install
1. Connect your assistant ⭐
An interactive wizard opens. Pick what you want, tick your apps, press enter:
Plugin teaches your assistant to act on plain requests — "summarize this video". MCP gives it a set of tools instead. Not sure? Start with Plugin; you can run the wizard again for the other.
It installs everything it needs, ticks what you already have, and removes anything you untick (it shows a plan and asks first). Then restart the app and try: summarize 'https://youtu.be/…'.
Already know what you want? Skip the questions:
Hosts: --claude-code --claude-desktop --codex --cursor --antigravity
--openclaw --hermes, or --all. Full flag list and uninstall notes:
integrations/README.md. Rather have an agent do it?
Paste integrations/PROMPT.md into any assistant.
2. MCP by hand — one config entry, self-installing
No prior install needed: uvx fetches the package the first time the host
launches the server, and keeps it cached afterwards. Drop this into your host's
MCP config:
That's the whole setup — no paths, no env block. Settings live in
~/.yt-mem-ai/config.env and the agent can write them itself with the
config_set tool (or you with yt-ai config set).
Restart the app and the tools show up — see Usage for what they do.
Nothing appeared, or the host timed out? The first launch downloads dependencies and can outlast the host's startup check. Run
uvx --from 'yt-mem-ai[mcp]' yt-ai-mcp --helponce, then reopen the app. If the host still can't start it, give it absolute paths —uv tool install 'yt-mem-ai[mcp]'and usewhich yt-ai-mcpascommandwith"args": [](GUI apps often don't see~/.local/binon theirPATH).
3. Claude Desktop — skills (in the app)
Desktop stores plugins on your Claude account, not on disk, so nothing can install them for you. It takes a minute in the app:
Customize (left sidebar) → Plugins → Personal plugins → + → Add marketplace → Add from a repository →
https://github.com/dasein108/yt-mem-ai→ Add → Installyt-mem-ai
Then ask: summarize 'https://youtu.be/…'. Uninstall the same way. The same plugin also works on claude.ai and Cowork. Prefer tools over skills? The MCP setup above works for Desktop too — and that one can be scripted.
Skills by hand — Codex, Cursor, Antigravity, OpenClaw, Hermes
Each host loads SKILL.md files from a user-scope directory: Codex
~/.codex/skills/ (CLI and IDE share it, v0.117.0+), Cursor ~/.cursor/skills/,
Antigravity ~/.gemini/skills/, OpenClaw ~/.agents/skills/, Hermes
~/.hermes/skills/ (where they become /yt and /yt-agent).
Codex extras: the /yt-* prompts (integrations/codex/prompts/*.md →
~/.codex/prompts/) and integrations/codex/AGENTS.md → ~/.codex/AGENTS.md.
Full guide: skills/README.md.
4. The CLI on its own
The skills drive it, but it's a perfectly good standalone tool:
Needs Python 3.11+ and uv; ffmpeg only for
supercut / frame.
The desktop UI lives in a separate repo: yt-mem-ai-desktop — it depends on this package and runs its own local REST API.
Getting Started
Installed and host restarted? You're ready. Just talk to your assistant — the
skills (or MCP prompts + analyze_video) do the ingesting for you:
"Summarize https://youtu.be/dQw4w9WgXcQ" → ingests the video (captions → whisper), then writes an executive summary plus key points, in the video's own language.
"Give me the highlights of that video with timestamps" → 3–8 deep-linked moments (
watch?v=…&t=123s) anchored by semantic search.
"What did I watch about retrieval-augmented generation?" → searches every transcript in your library and quotes the moments.
"Process my subscriptions into today's digest" → discovers new uploads, ingests them, writes
digests/<DATE>.md.
Prefer the terminal? The same first run:
Everything lands in ~/.yt-mem-ai/ (library, logs, downloads).
The first run is slow — that's expected. Installing pulls the ML stack (torch, LanceDB, sentence-transformers ≈ 1 GB on disk), and your first
fetchorsearchdownloads the embedding model on top of that. If a video has no captions, the Whisper model (small, ≈ 460 MB) downloads too — the captions path never needs it. All of it is cached, so it happens once, not per video. On a GUI host the first MCP launch can outlast the app's startup check for the same reason: runuvx --from 'yt-mem-ai[mcp]' yt-ai-mcp --helponce in a terminal to warm the cache, then reopen the app.
Daily routine
then in your assistant: "process subscriptions" → per-video summaries and
digests/<DATE>.md, and optionally
yt-ai compile --out compilations/$(date +%F).md for the day's highlights as
clickable links.
Usage
Talking to your assistant (skills & prompts)
Two skills ship with the plugin. MCP hosts get the same playbooks as prompts
(yt_summarize, yt_highlights, yt_qa, yt_presentation, yt_digest,
yt_review, yt_group), so nothing is lost without skill support.
Skills never touch the database directly — they call the CLI, so the same
workflow runs on any host. Install or paste them by hand:
skills/README.md.
MCP tools
The yt-ai-mcp server exposes the whole engine as typed tools. analyze_video
is the one-step entry point: it ingests and returns the transcript so the model
can write the summary itself.
Server details, prompt list, and raw config: integrations/mcp/README.md.
CLI commands
Examples
Case: a full PDF textbook from a 10-part YouTube course.
examples/defi-crypto-options.pdf — a
96-page Russian educational book built from the series «DeFi. Бесплатный
вводный курс по крипто-опционам» (@Menaskop).
Pipeline: identify the 10 series videos → pull ru-orig captions (yt-dlp +
browser cookies; no Whisper needed) → structured per-video digests → one shared
spine (glossary, notation, figure catalog) → 10 rewritten chapters (~28.5k words)
- 47 redrawn vector figures → assembled and rendered with Typst. Not a summary — first-principles chapters with worked examples, diagrams, glossary, and per-chapter deep-links back to each video.
Configuration
Nothing is required to start — defaults put the store, logs, and downloads
under ~/.yt-mem-ai/ and use a local embedding model. Tune it when you need to:
Configure from the CLI or an agent — instead of editing .env by hand, use
yt-ai config (or the MCP config_* tools, so an agent can reconfigure itself
from chat):
set writes the global config file (~/.yt-mem-ai/config.env) by default so the
MCP server picks it up regardless of its working directory; --project writes
./.env. Precedence: process env > project .env > global config file, and
config list shows which one each value comes from.
Under the hood
Everything below is optional reading — internals, tuning, and developer notes.
How it works
The CLI does the heavy IO and owns the store; the skills and MCP tools are thin
callers. A video moves through discovered → downloaded → transcribed → summarized; live streams get a terminal stream status and are skipped by batch
ingestion (transcribe one on demand with yt-ai fetch <url>). Storage is an
embedded LanceDB (videos, channels, transcripts, chunks, summaries,
feedback), with per-chunk vectors plus a full-text index — that's what makes
search hybrid.
Command details
Rate & recommend — like/dislike videos you've fetched, then yt-ai recommend ranks the rest by similarity to what you liked (minus what you
disliked), using their transcript embeddings. Before you've liked anything it
falls back to most-recently-published.
discover is incremental — it pulls the newest feed entries in one flat
call (capped by YT_DISCOVER_FEED_LIMIT), stamps each with an approximate
timestamp, and keeps only those newer than the last run's high-water mark minus
a 1h overlap (YT_DISCOVER_OVERLAP_S), so hour-rounded dates never miss a
boundary video. Already-processed videos are filtered out. --after YYYY-MM-DD
overrides the cutoff.
compile vs supercut — compile renders the day's highlights as markdown
deep links (watch?v=ID&t=<start>s), newest-video-first and bounded by
--max-minutes (default 20); it's instant and prints to stdout unless you pass
--out. supercut re-downloads each highlight's section at 720p, burns a label
onto it, and concatenates everything into supercuts/<date>.mp4 plus a
.refs.md sidecar listing sources (and any clips skipped after a failure) — much
slower, needs network + ffmpeg, but shareable.
Embeddings, proxy, and other tuning
Embeddings: YT_EMBEDDING_BACKEND=local|openai. Local uses
sentence-transformers (YT_EMBEDDING_MODEL, default all-MiniLM-L6-v2) — for
non-English libraries set paraphrase-multilingual-MiniLM-L12-v2 (384-d, 50+
languages) so semantic search works cross-language. openai uses
text-embedding-3-small|large (needs OPENAI_API_KEY). After changing the model,
run yt-ai reembed to migrate the existing library (re-embeds all chunks; no
re-fetch).
Proxy / VLESS: YT_USE_WEBSHARE defaults off. If you already run a
system-level proxy/VPN (VLESS/Xray etc.), leave it off — traffic rides that
tunnel. Stacking the Webshare proxy on top breaks the authenticated
subscription feed (its CONNECT tunnel returns 405). Only set
YT_USE_WEBSHARE=true if you have no other proxy and YouTube rate-limits your
raw IP. Discover tuning: YT_DISCOVER_FEED_LIMIT (newest-N cap, default 60),
YT_DISCOVER_OVERLAP_S (incremental overlap, default 3600), YT_DISCOVER_TIMEOUT_S.
Working from a checkout? uv sync --extra dev, then cp .env.example .env
if you'd rather keep settings project-local than in ~/.yt-mem-ai/config.env.
Use as a Python package
yt-mem-ai is a normal library — the CLI is a thin Typer shell over run_*
cores you can call directly. Everything is local: no server, no API key (unless
you pick the openai embedding backend).
Other cores, same shape (run_x(cfg, ..., db=db)): run_discover,
run_fetch_pending, run_channel_list, run_recommend, run_feedback,
run_compile, run_supercut, run_frame, run_reembed. Lower-level pieces
are importable too — yt_mem_ai.download.download, yt_mem_ai.transcript.get_transcript,
yt_mem_ai.store.embeddings.build_embedder / chunk_segments,
yt_mem_ai.store.db (LanceDB CRUD + search_chunks).
The store is plain LanceDB, so you can also open it directly:
Logging
The CLI writes structured JSON events to logs/common.jsonl (via
obs.log_event/blog) — one object per line, {ts, source, level, event, msg, ...ctx}. Override the path with YT_LOG_FILE; it's gitignored. Inspect with jq:
Tests
Releasing (maintainers)
Version comes from the git tag (hatch-vcs). Tag, build, and publish:
scripts/publish.sh loads UV_PUBLISH_TOKEN from .env (gitignored) on demand,
so you don't export it each time — add UV_PUBLISH_TOKEN=pypi-… to .env once
(see .env.example). Equivalently: set -a; . ./.env; set +a; uv publish dist/*.
Rotate the token on PyPI if it's ever exposed.
來源:README.md,提交 1c8fcbb
工具
0版本歷史
1- v0.6.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分