#video #downloader #cli #clap

app cli-yt-downloader

A simple to use Cli for downloading YouTube videos

8 releases

0.1.7 Mar 10, 2025
0.1.6 Mar 10, 2025
0.1.4 Jun 9, 2024

#983 in Command line utilities

Download history 4/week @ 2024-12-05 12/week @ 2024-12-12 12/week @ 2025-02-13 3/week @ 2025-02-27 266/week @ 2025-03-06 90/week @ 2025-03-13

359 downloads per month

MIT license

23KB
342 lines

Cli YouTube Downloader

A simple YouTube downloader powered by yt-dlp and clap

Crates.io

Prerequisites

Before installing this tool, you need to have yt-dlp installed on your system:

macOS

brew install yt-dlp

Linux

Using apt (Debian/Ubuntu):

sudo apt update
sudo apt install yt-dlp

Using dnf (Fedora):

sudo dnf install yt-dlp

Windows

Using Chocolatey:

choco install yt-dlp

Using Scoop:

scoop install yt-dlp

Installation

cargo install cli-yt-downloader

Optional - Create alias to be 'yt'

Step 1 - create alias

For Bash/Zsh:

echo 'alias yt="cli-yt-downloader"' >> ~/.zshrc  # For Zsh
# OR
echo 'alias yt="cli-yt-downloader"' >> ~/.bashrc  # For Bash

For Windows (PowerShell):

# Add to your PowerShell profile
Set-Alias -Name yt -Value cli-yt-downloader

Step 2 - apply changes

For Bash/Zsh:

source ~/.zshrc  # For Zsh
# OR
source ~/.bashrc  # For Bash

For Windows (PowerShell), restart your PowerShell session.

Usage Examples

Download a video

cli-yt-downloader -- "https://www.youtube.com/watch?v=FxQirt705gc"

Download only audio

cli-yt-downloader -- "https://www.youtube.com/watch?v=FxQirt705gc" -a

Download to a specific path

cli-yt-downloader -- "https://www.youtube.com/watch?v=FxQirt705gc" -o ~/some-path

Default download location

The default download location is set to be your OS's download folder.

Dependencies

~12–24MB
~354K SLoC