CLI Commands
Transfer Learning provides a powerful command-line interface for processing videos and generating step-by-step guides. This page provides an overview of all available commands and their options.Command Structure
All Transfer Learning commands follow this general structure:Command Alias
Transfer Learning provides a convenient command aliastl that can be used instead of typing out the full transfer-learning command. The tl command is available through shell scripts in the scripts directory:
- For Unix-like systems (macOS/Linux):
scripts/tl - For Windows:
scripts/tl.bat
Usage
tl command works exactly the same as the transfer-learning command, but with a shorter name. For example:
Global Installation
To make thetl command available globally:
Unix-like Systems (macOS/Linux)
Windows
Add thescripts directory to your PATH environment variable or create a symbolic link in a directory that’s already in your PATH.
Available Commands
process-video
Process a local video file and extract content
generate-guide
Generate a step-by-step guide from processed video data
process-youtube
Process a YouTube video and extract content
youtube-guide
Generate a guide directly from a YouTube video
transcribe
Extract transcript from video
analyze
Analyze video content
download
Download video from supported platforms
config
Configure environment variables and settings
The Transfer Learning CLI provides seven core actions for video processing and guide generation:
- Process-video: Process local video files
- Generate Guide: Create guides from processed local videos
- Process Youtube: Process videos from YouTube
- Youtube-guide: Generate guides directly from YouTube videos
- Transcribe: Extract transcripts from videos
- Analyze: Analyze video content
- Download: Download videos from supported platforms
Command Details
process-video
Process a local video file and extract content.Arguments
PATH: Path to video file or directory
Options
--output-dir TEXT: Output directory for results--batch-size INTEGER: Number of frames to process in each batch--max-concurrent INTEGER: Maximum number of concurrent batches
Example
generate-guide
Generate a step-by-step guide from processed video data.Arguments
PATH: Path to processed video data
Options
--output-dir TEXT: Output directory for guides--model TEXT: Model to use for guide generation--temperature FLOAT: Temperature for generation--user-directive TEXT: User directive to customize guide generation--skip-cache: Skip cache and force regeneration
Example
process-youtube
Process a YouTube video and extract content.Arguments
URL: YouTube video URL
Options
--output-dir TEXT: Output directory for results--batch-size INTEGER: Number of frames to process in each batch--max-concurrent INTEGER: Maximum number of concurrent batches
Example
youtube-guide
Generate a guide directly from a YouTube video.Arguments
URL: YouTube video URL
Options
--output-dir TEXT: Output directory for guides--model TEXT: Model to use for guide generation--temperature FLOAT: Temperature for generation--batch-size INTEGER: Number of frames to process in each batch--max-concurrent INTEGER: Maximum number of concurrent batches--user-directive TEXT: User directive to customize guide generation--skip-cache: Skip cache and force regeneration
Example
transcribe
Extract transcript from video.Arguments
PATH: Path to video file or YouTube URL
Options
--output-dir TEXT: Output directory for transcripts--model TEXT: Whisper model to use--device TEXT: Device to use for transcription
Example
analyze
Analyze video content.Arguments
PATH: Path to video file or YouTube URL
Options
--output-dir TEXT: Output directory for analysis results--batch-size INTEGER: Number of frames to process in each batch--max-concurrent INTEGER: Maximum number of concurrent batches--model TEXT: Whisper model to use for transcription--device TEXT: Device to use for transcription
Example
download
Download video from supported platforms.Arguments
URL: URL to download video from
Options
--output-dir TEXT: Output directory for downloaded videos
Example
config
Configure environment variables and settings.Options
--show: Show current configuration--reset: Reset configuration to defaults
Example
Global Options
These options are available for all commands:--help: Show help message and exit--version: Show version and exit
Environment Variables
Transfer Learning uses the following environment variables:OPENAI_API_KEY: OpenAI API key for vision and guide generationFRAME_EXTRACTION_INTERVAL: Interval between frame extractionsMAX_FRAMES_PER_VIDEO: Maximum number of frames to extract per videoBATCH_SIZE: Number of frames to process in each batchMAX_CONCURRENT_BATCHES: Maximum number of concurrent batchesWHISPER_MODEL: Whisper model to use for transcriptionWHISPER_DEVICE: Device to use for transcription (cpu/cuda)ENABLE_MONITORING: Enable or disable monitoring (true/false)LOG_LEVEL: Logging level (INFO, DEBUG, WARNING, ERROR)
.env file in the project root directory.
CLI Overview
The Transfer Learning CLI provides a comprehensive set of tools for processing videos and generating step-by-step guides. It features intelligent video handling, automatic compression, and AI-powered analysis.Key Features
-
Smart Video Processing
- Automatic size management and compression
- Frame extraction at configurable intervals
- Support for multiple video formats
- Progress tracking and monitoring
-
File Management
- Automatic compression for large files
- Quality-preserving size reduction
- Temporary file handling
- Configurable size limits