Multi-Channel Batch Analysis
Define channels by @handle, legacy username, or raw ID in a simple YAML file.
One command fetches up to 100 videos per channel with full statistics — batched in
groups of 50 to respect API limits.
Comparing YouTube channels means opening Studio for each one, copy-pasting numbers into a spreadsheet, and writing formulas by hand. By the time you can start analyzing, hours are gone. There is no way to batch-fetch metrics, rank channels against each other, or track trends over time without building your own tooling.
YT Metrics CLI wraps the YouTube Data API v3 in a single CLI. Point it at a YAML file of channels, run one command, and get a timestamped folder of reports: CSV for raw data, TXT for human-readable analysis, URL lists for the best and latest content. Every video gets six engagement metrics computed automatically.
Multi-Channel Batch Analysis
Define channels by @handle, legacy username, or raw ID in a simple YAML file.
One command fetches up to 100 videos per channel with full statistics — batched in
groups of 50 to respect API limits.
Six Engagement Metrics
Engagement rate, view rate, like rate, comment rate, subscriber-relative engagement,
and views per minute. Every formula is transparent: (likes + comments) / views * 100.
No black boxes.
Five Export Formats
Every run writes a timestamped folder with CSV data, per-channel stats (top 5 videos, performance distribution), cross-channel trends (duration categories, viral detection), and URL lists for the best and latest videos. Plus a self-documenting README.
Transcript Downloader
Fetch video transcripts with multi-language support. Tries your preferred languages first, falls back to the first available transcript, and finally checks a local fixtures directory for offline use.
# Clone and installgit clone https://github.com/mlorentedev/yt-metrics-cli.gitcd yt-metrics-climake install
# Configurecp .env.example .env # Set YOUTUBE_API_KEYcp channels.example.yml channels.yml # Add channels to analyze
# Analyze channels — reports land in output/<timestamp>/yt-metrics channels
# Download a single video transcriptyt-metrics transcript -v dQw4w9WgXcQPython 3.12+
Type-hinted throughout. Modular architecture with clear separation between API, metrics, and export layers.
YouTube Data API v3
Channel resolution (handle, username, ID), playlist enumeration, batch video statistics.
youtube-transcript-api
Multi-language transcript fetch with automatic fallback chain.
uv + Makefile
Fast package management with uv. Makefile for one-command install, check, test, and build workflows.