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.4.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.4-py3-none-any.whl (837.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yt_brain-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f150df237c91da96218e179b51f773175a63262c88d8df4e7babbfd17abcd2e5
MD5 3d0b2ff3998b9251e870b16e9edb1dd8
BLAKE2b-256 3c64759543352642e0ea196ee0e9372aa0dfc812dd2f7b0f67d764583e9b2dfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for yt_brain-0.1.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: yt_brain-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dd439cd11f371e25523f909de9085c660a515dedcf9a0eb681a5296fbbdc93e7
MD5 dbd2256e908bc28aead0bfd19f2c89f1
BLAKE2b-256 f9029225ba830de42d4af565237173ddb5e2fdaa3adc66ae32ccb6654bebe131

See more details on using hashes here.

Provenance

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