YouTube knowledge brain — ingest, classify, and curate your YouTube activity
Project description
yt-brain
Turn passive YouTube watching into active knowledge.
yt-brain ingests your YouTube watch history, classifies videos by genre and channel, and provides an interactive dashboard to explore your viewing patterns.
Features
- Semantic search — find videos by meaning, not just keywords (powered by sentence-transformers + sqlite-vec)
- Genre classification — automatic categorization using YouTube categories and keyword analysis
- Interactive dashboard — filter by genre, channel, time range, and starred channels simultaneously
- Incremental sync — stay current with new watches via yt-dlp browser cookie integration
- AI-powered clustering — discover viewing patterns with HDBSCAN + Claude-generated topic names
- Google Takeout import — bulk import your full watch history
Install
pip install yt-brain
Installation & Setup Guide — yt-brain requires external tools and API keys. Follow the setup guide before first use.
Commands
| Command | Description |
|---|---|
ingest takeout <path> |
Import from Google Takeout (zip or directory) |
ingest video <url> |
Add a single video by URL |
sync [--browser chrome] |
Fetch and add new videos since last sync |
embed [--rebuild] |
Generate semantic embeddings for search |
cluster [--rebuild] |
Run topic clustering on embedded videos |
dashboard [--port 5555] |
Launch web dashboard |
doctor |
Check that prerequisites are installed and configured |
status |
Show video counts by engagement tier |
classify |
Run engagement classification |
backfill-channels |
Fill missing channel names |
backfill-categories |
Fill missing categories (needs API key) |
backfill-dates |
Fill missing dates (needs API key) |
backfill-descriptions |
Fill missing descriptions (needs API key) |
transcript <video_id> |
Fetch transcript via yt-dlp |
config |
Show current configuration |
Dashboard
The web dashboard provides:
- Genre Breakdown with checkboxes to filter by genre
- Channel Breakdown with clickable links to YouTube
- Semantic Search — find videos by topic or concept, not just exact words
- Time filter dropdown (1 day, 1 week, 1 month, 6 months, 1-5 years, all)
- Date range display based on actual watch dates
Search Syntax
| Query | Behavior |
|---|---|
machine learning |
Semantic search — finds related videos by meaning |
"kubernetes" |
Semantic + exact match on "kubernetes" in title or description |
title:"Claude" |
Exact match in title only (case-insensitive) |
desc:"tutorial" |
Exact match in description only |
channel:"3Blue1Brown" |
Exact match in channel name |
AI agents title:"python" |
Semantic search for "AI agents", filtered to titles containing "python" |
Architecture
Hexagonal architecture with swappable infrastructure adapters:
src/yt_brain/
├── cli.py # Typer CLI entry point
├── domain/ # Pure models, classification logic
├── application/ # Service orchestration
├── infrastructure/ # SQLite, YouTube API, Takeout parser, yt-dlp
└── web/ # Flask dashboard, genre classifier
Data stored in SQLite at ~/.config/yt-brain/yt-brain.db.
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yt_brain-0.1.0.tar.gz.
File metadata
- Download URL: yt_brain-0.1.0.tar.gz
- Upload date:
- Size: 5.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a90fa3e4438e2b30d78cbf2c6415131afd7b86c137e4b4df905ae85935841c1
|
|
| MD5 |
48b26e00f63b0e4796dff1ef00d7184c
|
|
| BLAKE2b-256 |
62fa9e816f3d4ce727a363088c06489ca22d226661e78ce16689383b517de04f
|
Provenance
The following attestation bundles were made for yt_brain-0.1.0.tar.gz:
Publisher:
publish.yml on jayers99/yt-brain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_brain-0.1.0.tar.gz -
Subject digest:
4a90fa3e4438e2b30d78cbf2c6415131afd7b86c137e4b4df905ae85935841c1 - Sigstore transparency entry: 1241881796
- Sigstore integration time:
-
Permalink:
jayers99/yt-brain@de77f4c6a6e10912a85ca9055691bec13d1584e8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jayers99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@de77f4c6a6e10912a85ca9055691bec13d1584e8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file yt_brain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: yt_brain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 836.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6b03e910ef337b7132159a096dff4707d862ae503ef613c1dc249e48440e65d
|
|
| MD5 |
a81f2aa7892645e576672f90e04e3e5c
|
|
| BLAKE2b-256 |
a479ba0e0eabeea851c1b03f82d191fee31109a8a5c3d566438c8034a74364d8
|
Provenance
The following attestation bundles were made for yt_brain-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jayers99/yt-brain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yt_brain-0.1.0-py3-none-any.whl -
Subject digest:
b6b03e910ef337b7132159a096dff4707d862ae503ef613c1dc249e48440e65d - Sigstore transparency entry: 1241881851
- Sigstore integration time:
-
Permalink:
jayers99/yt-brain@de77f4c6a6e10912a85ca9055691bec13d1584e8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jayers99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@de77f4c6a6e10912a85ca9055691bec13d1584e8 -
Trigger Event:
release
-
Statement type: