Skip to content

atomicdhruba/Zen-MetaBot

Repository files navigation

Zen MetaBot

Automated Metadata Optimization Engine for YouTube
High-Performance Concurrent LLM Analysis (Gemini 1.5 Pro & NVIDIA Nemotron)

License Python 3.10+ Sponsor


Zen MetaBot is a highly optimized, local desktop client designed to automate YouTube metadata generation. The pipeline uses a custom "Debate Engine" architecture where two distinct LLM models evaluate the same video context independently, before a synthesis prompt generates the ultimate metadata payload designed for maximum CTR and algorithmic reach.

Core Architecture

The system utilizes a multi-agent pipeline to process raw video files into highly optimized YouTube metadata.

 [ RAW VIDEO ] ───▶ ( yt-dlp ) ───▶ [ MULTIMODAL PARSING ]
                                             │
                                             ▼
                                   [ CONTEXT CACHE ]
                                             │
                ┌────────────────────────────┼────────────────────────────┐
                ▼                            ▼                            ▼
       [ NVIDIA MODE ]                [ DEBATE MODE ]              [ GEMINI MODE ]
    (Nemotron Inference)        (Concurrent Multi-Agent)         (Gemini Inference)
                │                            │                            │
                └────────────────────────────┼────────────────────────────┘
                                             ▼
                                 [ SYNTHESIS & SEO GRADING ]
                                             │
                                             ▼
                                   [ YOUTUBE DATA API ]

Features

System Component Description
Vision Extraction Frame-by-frame multimodal parsing to build a persistent context cache, avoiding redundant API calls.
Debate Pipeline Multi-agent drafting where distinct LLMs generate competing metadata, followed by strict synthesis evaluation.
Execution Modes Toggle between isolated models (nvidia, gemini) or the concurrent debate synthesizer via the UI.
Heuristic Scoring Built-in SEO grading algorithm (0–100) evaluating title CTR potential, tag relevance, and algorithmic hook.
Asynchronous UI CustomTkinter dark-mode desktop interface running completely decoupled from background API threads.

[ Expand ] Project Structure
.
├── bot.py                  # Main entry point (GUI or CLI daemon)
├── requirements.txt        # Dependency locks
├── .env.example            # Template for required environment variables
│
├── zenmetabot/             # Core Package
│   ├── youtube.py          # YouTube Data API v3 integration layer
│   ├── downloader.py       # Audio/Video multiplexer via yt-dlp
│   ├── brain.py            # Multimodal extraction interface
│   ├── ai_nvidia.py        # NVIDIA Nemotron inference client
│   ├── ai_gemini.py        # Gemini inference client
│   ├── debate.py           # Multi-agent synthesis and SEO grading
│   ├── orchestrator.py     # Central pipeline controller
│   ├── gui.py              # CustomTkinter interface rendering
│   └── ...                 # Utilities & Configs
│
└── brain/                  # Local cache directory for extracted context

Quick Start

To run this project locally, provision external API keys for the inference models and Google services.

  • Environment: Python 3.10+
  • System Binaries: FFmpeg must be in your system PATH.
  • API Keys: You will need keys for YouTube Data API v3, NVIDIA Developer (Nemotron), and Google AI Studio (Gemini).
git clone https://github.com/atomicdhruba/Zen-Metabot.git
cd Zen-Metabot
pip install -r requirements.txt
cp .env.example .env

Populate .env with your API keys:

NVIDIA_API_KEY=your_key_here
GEMINI_API_KEY=your_key_here
GENERATION_MODE=debate

YouTube OAuth Configuration (BYOK)

[ Expand ] How to get your YouTube API key

To avoid standard Google App Verification overhead, this repository uses a "Bring Your Own Key" (BYOK) model for YouTube authentication. Your tokens remain strictly local.

  1. Create a project in the Google Cloud Console.
  2. Enable the YouTube Data API v3.
  3. Configure the OAuth Consent Screen (External, add .../auth/youtube.force-ssl scope, and add your email as a Test User).
  4. Create OAuth client ID credentials (Desktop app).
  5. Download the JSON credential file, rename it to client_secrets.json, and place it in the root of the repository.

On initial execution, a local server will spawn to handle the OAuth callback, generating a token.pickle file for subsequent headless runs.


Execution

Initialize the desktop GUI dashboard:

python bot.py

Execute in headless CLI mode for server environments:

python bot.py --cli

Security

Never commit your secrets.
The provided .gitignore explicitly blocks .env, client_secrets.json, cookies.txt, and token.pickle. Do not override these rules.

Support the Project

If Zen MetaBot optimizes your workflow, consider supporting its continued development.

Buy Me a Coffee at ko-fi.com
Become a Patron

About

Zen MetaBot is a high-performance desktop app that uses Gemini 1.5 Pro and NVIDIA Nemotron to automatically generate perfect SEO metadata for YouTube videos.

Topics

Resources

License

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors