Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

📺 YouTube Summary & Vector Search CLI

An AI-powered command-line tool that transcribes YouTube videos, generates detailed hierarchical summaries and keywords using Google Gemini, stores them locally as Markdown, indexes them in a FAISS vector database for semantic search, and syncs everything to a Notion database.


✨ Key Features

  • Automatic Transcription: Fetches transcripts directly from YouTube IDs.
  • AI Summarization: Uses Google Gemini (with fallbacks to multiple models and local Ollama) to generate detailed, structured summaries and relevant keywords.
  • Local Storage: Saves every summary as a clean Markdown file in a dedicated summaries/ directory.
  • Semantic Vector Search: Indexes all summaries using FAISS and Gemini embeddings, allowing you to search through your video library by meaning, not just keywords.
  • Notion Integration: Automatically syncs summaries, URLs, and keywords to a structured Notion database for easy browsing and organization.

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/YouTubeSummary.git
    cd YouTubeSummary
  2. Install dependencies:

    pip install -r requirements.txt
  3. Configure Environment Variables: Create a .env file in the root directory and add your credentials:

    # API Keys
    GOOGLE_API_KEY=your_google_gemini_api_key
    NOTION_TOKEN=your_notion_integration_token
    NOTION_DATABASE_ID=your_notion_database_id
    
    # Model Configuration (Optional Defaults)
    MODEL_PRIMARY=gemini-3.1-pro-preview
    MODEL_FALLBACK_1=gemini-3.1-flash-preview
    MODEL_FALLBACK_2=gemini-3.1-flash-lite-preview
    
    # Local LLM Fallback (Optional - requires Ollama)
    LOCAL_LLM_URL=http://localhost:11434
    LOCAL_MODEL=qwen3:8b

🛠️ Usage

The tool is accessible via the main.py CLI.

1. Add and Summarize a Video

Generate a summary, index the vector data, and sync it to Notion.

python main.py add "https://www.youtube.com/watch?v=VIDEO_ID" --title "My Custom Title"

2. Search Your Library

Find videos by querying concepts or topics discussed in your saved summaries.

python main.py search "Explain how Transformers work in AI"

📂 Project Structure

  • main.py: Entry point for the CLI (Add/Search).
  • summarizer.py: Logic for fetching transcripts and prompting the LLM for summaries.
  • llm_client.py: Wrapper for Gemini API and local LLM fallbacks.
  • search.py: Manages the FAISS index and vector search functionality.
  • notion_sync.py: Handles the Notion API integration.
  • storage.py: Simple utility for saving Markdown files.
  • summaries/: Local directory where generated summaries are stored.

🤝 Contributing

Feel free to open issues or submit pull requests for any improvements or bug fixes!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages