@divyanshuvortex/yit
v1.1.1
Published
Cross-platform CLI tool for downloading YouTube video and audio with a single command.
Maintainers
Readme
yit — YouTube Downloader CLI
A cross-platform CLI tool for downloading YouTube video and audio with a single command. It abstracts away the complexity of stream selection, metadata extraction, format conversion, and progress tracking to provide a simple UX (similar to git or gh).
Features
- Auto Stream Selection: Resolves the best resolution, codec, and bitrate, and merges them automatically (no manual stream IDs).
- Metadata Preview: Displays title, channel name, views, resolution (e.g.
144p,360p), etc., before downloading. - Progress UI: A live progress bar displaying percentage, current speed, and ETA.
- Auto Dependency Management: Automatically downloads the required
yt-dlpbinary on the first run. - Smart Defaults: By default, saves downloaded media to your system's
Downloadsfolder.
Installation
Make sure you have Node.js installed (version 20 or higher).
You can install the CLI globally via NPM:
npm install -g @divyanshuvortex/yitNote: For some video/audio merging features, ensure you have FFmpeg installed on your system and available in your $PATH.
Usage
The core command structure is:
yit <url> [format] [quality]Download Video (Default)
Downloads the best video and audio streams merged together.
yit "https://youtube.com/watch?v=YOUR_VIDEO_ID"Download Audio Only
Extracts the best audio stream and saves it as an MP3.
yit "https://youtube.com/watch?v=YOUR_VIDEO_ID" mp3 best --audio-onlyList Available Formats
See all available resolutions, sizes, and formats for a given video without downloading.
yit "https://youtube.com/watch?v=YOUR_VIDEO_ID" listTech Stack
- Language: TypeScript, Node.js ≥20
- CLI Framework: Commander.js
- Downloader Core: yt-dlp (via
yt-dlp-wrapsubprocess) - UI & Formatting:
cli-progress,picocolors,cli-table3
