Skip to main content

Awesome CLI to download YouTube videos (as video or audio)/shorts/playlists from the terminal

Project description

📹 Pyutube - The Simplest YouTube Downloader CLI

Enjoying my project? Please show your appreciation by starring it on GitHub! ⭐

Ask in DeepWiki Version Downloads Downloads per Month Downloads per Week

[!NOTE] Pyutube is built on top of pytubefix. If downloads stop working, update it first:

pip install --upgrade pytubefix
Pyutube

[!NOTE] Have a feature request or bug report? tell me

Why Pyutube?

Pyutube is a small CLI wrapper around pytubefix. It supports videos, shorts, audio-only downloads, and playlists with a simple prompt-driven flow.

🛠️ Installation

Make sure Python is installed:

python --version

If you are developing locally, clone the repository and install the dependencies:

pip install -r requirements.txt -r requirements-dev.txt

To install the published package:

pip install pyutube --break-system-packages

Then run pyutube --help to confirm the CLI is available.

📈 Upgrade

To upgrade the installed package:

pip install --upgrade pyutube --break-system-packages

🚀 Run It

Use either of these commands to view the CLI help:

pyutube --help
python -m pyutube --help

Download a video, short, or playlist with:

pyutube download "YOUTUBE_LINK"
pyutube download "YOUTUBE_LINK" "/path/to/save"

Common examples:

pyutube download "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
pyutube download "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -a
pyutube download "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -f
pyutube download "https://www.youtube.com/playlist?list=PLAYLIST_ID"

[!NOTE] The URL is required. The path is optional and defaults to the current working directory.

👨‍💻 Usage

Arguments

Arguments Description
URL The YouTube URL or video ID. This argument is required.
PATH The path to save the video. Defaults to the current working directory. [Optional]

Options

Option Description
-v or --version Display the current version number.
-a or --audio Download audio only, skipping prompts.
-f or --footage Download video only, skipping prompts.

🧪 Test And Quality

Run these commands to check code health locally:

python -m compileall pyutube
pytest pyutube/tests -q
ruff check pyutube
mypy pyutube
coverage run -m pytest pyutube/tests -q
coverage report

The repo also includes a short checklist in QUALITY.md.

🕵️‍♂️ Examples

More examples are in EXAMPLES.md.

🥰 Contributing

Pull requests are welcome. For larger changes, open an issue first and follow the contributing guidelines.

📎 License

This project is licensed under the MIT License.

📸 Screenshots

Download a video to a specific location

Download video with specify the save location

Choose what type to download

Chose what type you want to download

Choose a resolution when downloading video

Chose what resolution you want to download

Select playlist items to download

If you download a playlist, you can choose what video you want to download, or even all of them

Need help? Run pyutube --help

image5

⏳ Todo List

  • Notification System
  • Auto Update package if new version available
  • Support Optional Numbering for Downloaded Playlist Videos
  • Improve code health
  • Support downloading sounds (mp3 format not a audio/mp4)
  • Support Subtitles Download
  • Support setting for downloading folder
  • Download Thumbnails with Videos and Audio

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyutube-1.5.21.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyutube-1.5.21-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file pyutube-1.5.21.tar.gz.

File metadata

  • Download URL: pyutube-1.5.21.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pyutube-1.5.21.tar.gz
Algorithm Hash digest
SHA256 6ceb1e10884af74c7c4344acbdbecb8abdd289a754139bec3a72ec315b18af7b
MD5 853b4f62361fbcdbe7680a8c376a43f7
BLAKE2b-256 6950c386e4027423307da04488c028fbc955dedb2a6ba7aa5e33fd68e06415d1

See more details on using hashes here.

File details

Details for the file pyutube-1.5.21-py3-none-any.whl.

File metadata

  • Download URL: pyutube-1.5.21-py3-none-any.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pyutube-1.5.21-py3-none-any.whl
Algorithm Hash digest
SHA256 4bb788da22d4a2ab9322169148caad9964715052d41246c3c1b79cd6c13c6920
MD5 66682ca2f36b3ccd682eae5d027a7cf6
BLAKE2b-256 ec3ca01ad7e901b4e1bdc70d22bba7486ec6138ae119b10141ad0c6d82a3dbf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page