Skip to main content

Build System Features

Complete build and interactive CLI system for the Video-to-Knowledge Pipeline.


๐Ÿ†• New Componentsโ€‹

1. Interactive Build Script (build.py)โ€‹

Features:

  • โœ… System requirement checks (Python, FFmpeg, RAM, Disk, CUDA)
  • ๐Ÿ“ฆ Virtual environment creation and management
  • ๐Ÿ“ฅ Whisper model downloads (tiny, base, small, medium, large-v3)
  • ๐Ÿ”‘ Interactive API key configuration
  • ๐Ÿš€ Launcher script creation
  • โœ… Installation verification

Usage:

python build.py              # Full interactive setup
python build.py --quick # Quick setup with defaults
python build.py --check # Check requirements only
python build.py --clean # Clean build artifacts
python build.py --models small medium # Download specific models

2. One-Line Installer (install.sh)โ€‹

Features:

  • ๐Ÿ”ง Automated environment setup
  • ๐Ÿ“ฆ Dependency installation
  • ๐ŸŽฏ Creates video-pipeline and vp commands
  • ๐Ÿ”— Adds to PATH automatically

Usage:

# From repository
./install.sh

# Or via curl (when published)
curl -sSL https://example.com/install.sh | bash

3. Makefileโ€‹

Targets:

CommandDescription
make installFull interactive installation
make quickQuick setup
make checkSystem requirements check
make modelsDownload Whisper models
make cleanClean artifacts
make runRun interactive mode
make testRun tests
make lintRun linters
make allComplete setup

4. Enhanced Main CLI (src/main_cli.py)โ€‹

Features:

  • ๐ŸŽจ Rich UI with banners and tables
  • ๐Ÿš€ Quick Start Wizard for first-time users
  • ๐Ÿ“Š System status dashboard
  • ๐Ÿ”„ Automatic setup detection

Commands:

vp                          # Launch interactive mode
vp quickstart # Run setup wizard
vp process <url> # Process video
vp models # Manage models
vp config # Show configuration
vp deck <file.html> # Open presentation

5. Interactive CLI (src/interactive_cli.py)โ€‹

Features:

  • ๐ŸŽฌ Process new video (full wizard)
  • โšก Quick process (saved defaults)
  • ๐Ÿ“ฆ Model management
  • โš™๏ธ Configuration management
  • ๐Ÿ’พ Persistent settings

Configuration Location:

  • Config: ~/.config/video-pipeline/config.json
  • Cache: ~/.cache/whisper/

6. Model Manager (src/model_manager.py)โ€‹

Features:

  • ๐Ÿ“Š Model listing with specs
  • โฌ‡๏ธ Individual model downloads
  • โฌ‡๏ธ Batch downloads
  • ๐Ÿงน Cache management
  • ๐ŸŽฏ Auto-selection recommendations

Interactive Interface:

Whisper Model Manager

| Model | RAM | Speed | Accuracy | Status |
|----------|------|-------|----------|-------------|
| tiny | 0.5GB| 32x | 58% | โ—‹ Not installed |
| base | 1GB | 16x | 68% | โœ“ Installed |
| small | 2GB | 6x | 76% | โœ“ Installed |

Options:
1. Download specific model
2. Download recommended models (base, small, medium)
3. Download all models
4. Clean cache
5. Exit

๐Ÿ”ง System Requirements Checkโ€‹

Checked Components:โ€‹

  1. Python Version (3.9+ required)
  2. FFmpeg (required for audio/video)
  3. Disk Space (10GB recommended)
  4. RAM (4GB minimum, 8GB+ recommended)
  5. CUDA/GPU (optional, for faster processing)

Output Format:โ€‹

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ System Check Results โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Component โ”‚ Status โ”‚ Details โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ PYTHON โ”‚ โœ… Passโ”‚ 3.11.0 โ”‚
โ”‚ FFMPEG โ”‚ โœ… Passโ”‚ Installed โ”‚
โ”‚ DISK โ”‚ โœ… Passโ”‚ 145GB free โ”‚
โ”‚ RAM โ”‚ โœ… Passโ”‚ 16GB total โ”‚
โ”‚ CUDA โ”‚ โœ… Passโ”‚ Available โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฏ Quick Start Wizardโ€‹

Steps:โ€‹

  1. Welcome Banner

    โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
    โ•‘ โ•‘
    โ•‘ ๐Ÿ“ฝ๏ธ Video-to-Knowledge Pipeline โ•‘
    โ•‘ โ•‘
    โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  2. System Check

    • Auto-detects hardware
    • Shows recommendations
  3. Model Download

    • Recommends model based on RAM
    • Shows download progress
  4. API Configuration

    • Prompts for Kimi/Claude keys
    • Offers to save to shell config
  5. First Video

    • Optionally processes video immediately

๐Ÿ“ File Structureโ€‹

video_analysis_pipeline/
โ”œโ”€โ”€ build.py # Main build script
โ”œโ”€โ”€ install.sh # One-line installer
โ”œโ”€โ”€ Makefile # Make targets
โ”œโ”€โ”€ setup.py # Python package setup
โ”œโ”€โ”€ BUILD_README.md # Build documentation
โ”œโ”€โ”€ BUILD_FEATURES.md # This file
โ”œโ”€โ”€ config.example.json # Config template
โ”‚
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ main_cli.py # Enhanced CLI entry
โ”‚ โ”œโ”€โ”€ interactive_cli.py # Interactive menu
โ”‚ โ”œโ”€โ”€ model_manager.py # Model management
โ”‚ โ””โ”€โ”€ ...
โ”‚
โ””โ”€โ”€ docs/
โ””โ”€โ”€ 00_document_inventory.md

๐Ÿš€ Usage Examplesโ€‹

First Time Setupโ€‹

# Interactive setup
python build.py

# Or with make
make install

Quick Processโ€‹

# After setup, process a video
vp process "https://youtube.com/watch?v=..."

# With options
vp process "video.mp4" --whisper-model small --vision kimi --deck

Model Managementโ€‹

# List available models
vp models

# Download specific model
python build.py --models small

# Interactive model manager
python -m src.model_manager

Configurationโ€‹

# Show current config
vp config

# Reset configuration
vp config --reset

# Or edit directly
nano ~/.config/video-pipeline/config.json

๐Ÿ› ๏ธ Developmentโ€‹

# Setup development environment
make install
source .venv/bin/activate

# Run tests
make test

# Check code
make lint
make typecheck

# Clean and rebuild
make clean
make build

๐Ÿ“ Configuration Fileโ€‹

Location: ~/.config/video-pipeline/config.json

Example:

{
"version": "1.2.0",
"last_url": "https://...",
"whisper_model": "small",
"whisper_priority": "balanced",
"frame_rate": 0.5,
"vision_provider": "kimi",
"create_deck": true,
"deck_format": "html",
"setup_complete": true
}

๐Ÿ” Environment Variablesโ€‹

# Required (one of):
export KIMI_API_KEY="..."
export ANTHROPIC_API_KEY="..."

# Optional:
export OPENAI_API_KEY="..."
export SERPER_API_KEY="..."

# Whisper configuration:
export WHISPER_MODEL_SIZE=medium
export WHISPER_PRIORITY=quality
export WHISPER_DEVICE=cuda

๐ŸŽ‰ Success Indicatorsโ€‹

After successful installation:

============================================================
๐ŸŽ‰ Setup Complete!
============================================================

Next steps:
1. Source your shell config: source ~/.bashrc
2. Run interactive mode: python -m src.pipeline
3. Or use launcher: ./vp

Quick start:
./vp process "https://youtube.com/watch?v=..."
============================================================

See BUILD_README.md for detailed installation instructions.