VDL Documentation¶
VDL is a local-first media workflow runtime for building apps and workflows around video downloads, playlists, page discovery, link lists, progress events, and structured results.
VDL is most useful when you are building an application or automation workflow that needs downloads to be programmable, observable, cancellable, and structured. For simple one-off downloads, lower-level download tools may already be enough; VDL's value is the application layer around media execution.
Three Surfaces¶
| Surface | State Model | Use It For |
|---|---|---|
| Python library | Stateless by default | Embedding download/discovery capability in another app |
| Headless CLI | Stateless by default | Scripts, one-shot jobs, and automation |
| Interactive app | Intentionally stateful | Guided terminal UX with local history, status, SQLite, and logs |
External products own their own persistence, media library, user history, intelligence features, and product-specific workflows. VDL owns the media download/discovery execution capability.
Quick Links¶
🚀 Getting Started¶
- Installation — Binary, pip, or dev setup
- Quick Start — Your first download
📺 Usage¶
- CLI Commands — All subcommands and flags
- Downloads — Single video workflow
- Playlists — Resolve and batch download
- Planning — Classify inputs, build plans
- Discovery — Crawl pages for media
🐍 Python Library¶
- Python API —
VDLClientand core functions - API Reference — Full class and method signatures
🔧 Advanced¶
- Configuration — Config file and XDG paths
- Progress & Cancellation — Callbacks and control
- MCP & Tools — Claude Desktop and AI integration
🏗️ Architecture¶
- Architecture Overview — Module map and design
- Runtime Wiring — Dependency injection patterns
- Persistence & Isolation — Stateless vs stateful modes
- yt-dlp Integration — Media extraction strategy
💻 Development¶
- Testing — Test structure and patterns
- Release Playbook — Publishing and maintenance
- Troubleshooting — Common issues and solutions
Features at a Glance¶
| Feature | Description |
|---|---|
| Downloads | Single or batch video downloads with quality selection |
| Playlists | Resolve and download with concurrent item fetching |
| Planning | Classify input (URL, file, playlist) locally without network calls |
| Discovery | Crawl web pages for downloadable media using vdl crawl or VDLClient.discover() |
| State | Optional SQLite tracking of downloads and statuses (interactive mode only) |
| Collision Policy | Handle existing files: rename, skip, overwrite, or fail |
| Progress | Real-time callbacks or rich terminal UI with speed/ETA |
| Cancellation | Thread-safe cancellation tokens with per-task control |
| Config | TOML configuration in ~/.config/vdl/, with CLI overrides |
| Doctor | Health check for ffmpeg, yt-dlp, and VDL dependencies |
| MCP | Claude Desktop and AI agent integration via MCP protocol |
Architecture Overview¶
graph TB
subgraph User["User Interfaces"]
CLI["CLI<br/>(vdl)"]
Interactive["Interactive App"]
MCP["MCP Server<br/>(vdl-mcp)"]
Library["Python Library"]
end
subgraph Core["Core Facade"]
Client["VDLClient"]
end
subgraph Services["Services"]
Planner["InputPlanner"]
Execution["DownloadExecutionService"]
Playlist["PlaylistService"]
Discovery["DiscoveryService"]
Doctor["Doctor"]
end
subgraph Infrastructure["Infrastructure"]
Downloader["YtDlpDownloader"]
Resolver["YtDlpPlaylistResolver"]
State["SQLiteStateStore<br/>(opt-in)"]
Config["TomlConfigStore"]
Logger["FileEventLogger<br/>(opt-in)"]
Crawler["SiteRuleDiscoveryResolver"]
end
External["yt-dlp<br/>ffmpeg<br/>ffprobe"]
CLI --> Client
Interactive --> Client
MCP --> Client
Library --> Client
Client --> Planner
Client --> Execution
Client --> Playlist
Client --> Discovery
Client --> Doctor
Execution --> Downloader
Playlist --> Resolver
Execution --> State
Discovery --> Crawler
Downloader --> External
Resolver --> External
Installation Preview¶
curl -fsSL https://bildcraft.gitlab.io/products/video-downloader/vdl/install.sh | sh
vdl --version
pip install vdl
# Or with MCP support:
pip install "vdl[mcp]"
git clone https://gitlab.com/bildcraft/products/video-downloader
cd video-downloader
uv sync
PYTHONPATH=src uv run vdl --version
Next Steps¶
- New to VDL? Start with Installation and Quick Start.
- CLI user? See CLI Commands and Downloads.
- Python developer? Jump to Python API or check the demos.
- Integrating with Claude or AI agents? Read MCP & Tools.
- Contributing? Check Architecture, Testing, and Release Playbook.