Skip to main content

YouTube knowledge brain — ingest, classify, and curate your YouTube activity

Project description

CI

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.

yt-brain Dashboard

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
surgeon 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

yt_brain-0.1.5.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_brain-0.1.5-py3-none-any.whl (837.0 kB view details)

Uploaded Python 3

File details

Details for the file yt_brain-0.1.5.tar.gz.

File metadata

  • Download URL: yt_brain-0.1.5.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yt_brain-0.1.5.tar.gz
Algorithm Hash digest
SHA256 176195231e25a20f8cac4b1e0af1d615ea4a17e59f5f02ed866a406d5a5ede74
MD5 861cbf8d6eab7d3c85382611b06ade47
BLAKE2b-256 b15f70bcfb84ab200700c69936487a48060703a11261c43092ad020ea844a0fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_brain-0.1.5.tar.gz:

Publisher: publish.yml on jayers99/yt-brain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yt_brain-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: yt_brain-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 837.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yt_brain-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 daed10a6156517692c01c7089cbba1b7dfabcc30125c438f7791981ba495641d
MD5 04b4c896600099cbc457b00e753f0db5
BLAKE2b-256 cb0cd98ccc797aaf9931b6768133a2ca36a6f843c2e34f0340f6322c6d37214b

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_brain-0.1.5-py3-none-any.whl:

Publisher: publish.yml on jayers99/yt-brain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page