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

yt_brain-0.1.0.tar.gz (5.1 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.0-py3-none-any.whl (836.9 kB view details)

Uploaded Python 3

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

Hashes for yt_brain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a90fa3e4438e2b30d78cbf2c6415131afd7b86c137e4b4df905ae85935841c1
MD5 48b26e00f63b0e4796dff1ef00d7184c
BLAKE2b-256 62fa9e816f3d4ce727a363088c06489ca22d226661e78ce16689383b517de04f

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_brain-0.1.0.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.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

Hashes for yt_brain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6b03e910ef337b7132159a096dff4707d862ae503ef613c1dc249e48440e65d
MD5 a81f2aa7892645e576672f90e04e3e5c
BLAKE2b-256 a479ba0e0eabeea851c1b03f82d191fee31109a8a5c3d566438c8034a74364d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_brain-0.1.0-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