ytFetch
ytfetch simplifies media downloading and playlist management by adding playlist searching, and streamlined format handling on top of yt-dlp engine.
✨ Features
- Search: Use
-listto display or search across one or more playlists. - Direct Download: Download video in AVC/H.264 with MP3 audio, or extract audio only.
- Video Quality: Set the preferred video quality directly.
- Native Compatibility: Can also pass through any
yt-dlpflag. - Minimal logs: Clean and minimal logs.
- Auto-Update: Automatically checks for updates to ytfetch and its dependencies when enabled.
📋 Requirements
-
Python: 3.11 or higher.
-
uv: recommended, optional.
-
FFmpeg and FFprobe: Must be available in your system PATH. Download builds from here.
or using your system's package manager
- On Windows:
winget install -e --id BtbN.FFmpeg.GPL
orwinget install -e --id Gyan.FFmpeg
- On Termux (android):
pkg install ffmpeg
- On Mac (using Homebrew):
brew install ffmpeg
- On Windows:
-
Deno: Or other JavaScript runtime/engine like node.js or bun.
Check this guide for more info. Also check yt-dlp dependency for optional dependencies.
On Termux
Install uv or Deno with the
pkgpackage manager:pkg install uv
pkg install deno
📦 Installation
via uv (Recommended)
uv tool install ytfetch
via pip
pip install ytfetch
Auto-update is intended for uv tool installations. If enabled while running a
pip installation, it still runs uv tool upgrade ytfetch; that updates a
uv-managed installation, if present, rather than the pip-installed copy.
🔄 Auto-Update
When enabled, auto-update runs uv tool upgrade ytfetch. This upgrades the
uv-managed ytfetch tool and its dependencies, including yt-dlp. Set the
YTFETCH_UPDATE environment variable to select the update channel:
| Value | Channel | Check frequency |
|---|---|---|
nightly |
yt-dlp nightly (pre-release) | once per day |
stable |
yt-dlp stable | once per week |
| unset / invalid | disabled | – |
Setting YTFETCH_UPDATE
Set the value to nightly for daily checks or stable for weekly checks.
Changes to startup files or Windows user variables take effect in new terminal
sessions unless you also set the variable in the current session.
Bash (Linux/macOS) — append the setting to ~/.bashrc so it persists
across sessions, then load it into the current session:
printf '\nexport YTFETCH_UPDATE=nightly\n' >> ~/.bashrc
source ~/.bashrc
If your login shell does not load ~/.bashrc, add the line to the startup file
it does load, such as ~/.profile. On macOS, the default shell is usually zsh;
for zsh, use ~/.zshrc instead:
printf '\nexport YTFETCH_UPDATE=nightly\n' >> ~/.zshrc
source ~/.zshrc
Run the append command only once. To change or remove the setting later, edit the corresponding startup file.
Fish — set a persistent, exported variable:
set -Ux YTFETCH_UPDATE nightly
Use stable instead of nightly to select the stable update channel.
Windows PowerShell — set the variable for your Windows user account:
[Environment]::SetEnvironmentVariable("YTFETCH_UPDATE", "nightly", "User")
This applies to newly opened terminals. To set it in the current PowerShell session too, run:
$env:YTFETCH_UPDATE = "nightly"
Windows Environment Variables settings — to set it manually:
- Open Start and search for Edit environment variables for your account.
- Under User variables, choose New..., or select
YTFETCH_UPDATEand choose Edit... if it already exists. - Set the variable name to
YTFETCH_UPDATEand its value tonightlyorstable, then confirm the dialogs. - Open a new terminal for the change to take effect.
To check the value, use echo "$YTFETCH_UPDATE" in bash/zsh,
echo $YTFETCH_UPDATE in fish, or $env:YTFETCH_UPDATE in PowerShell.
Notes:
- If an update fails, the next retry happens after 1 hour instead of the normal interval.
- To disable persistently in bash/zsh, remove the export line from the startup
file; run
unset YTFETCH_UPDATEto disable it in the current session. - In fish, use
set -eU YTFETCH_UPDATEto remove the persistent universal variable. To disable updates only in the current session, useset -gx YTFETCH_UPDATE "". - In Windows, remove the User variable; to disable it in the current
PowerShell session, run
Remove-Item Env:YTFETCH_UPDATE.
Switching from nightly to stable
uv tool upgrade never downgrades. If a nightly build is installed and you
switch to stable, yt-dlp will stay on the nightly until a newer stable
release appears — then stable takes over automatically.
To switch immediately, force-reinstall:
uv tool install --reinstall ytfetch
🚀 Usage
General Syntax and Options
usage: ytfetch [OPTIONS] [yt-dlp OPTIONS] URL ...
options:
-h Show this help message and exit
--help Show yt-dlp help message and exit
-avcmp3 Download video in AVC (h.264) & audio in mp3 format
-q QUALITY Video quality (e.g., 1080, 720). Default will pick best video
-mp3 Extract audio only as MP3
-audio Extract audio only (bestaudio)
-list [NAME] List playlist contents. Accepts values for searching across playlist
output template aliases:
-o autonumber/num -> playlist-numbered naming
-o music/song -> title + artist naming
-o default -> default ytdlp naming
Examples
Downloading
Download a video at the best quality:
ytfetch "VIDEO_URL"
Download a video in 1080p:
ytfetch -q 1080 "VIDEO_URL"
List the available formats for a video:
ytfetch -F "VIDEO_URL"
Download a video as AVC/H.264 with MP3 audio in an MP4 container:
ytfetch -avcmp3 "VIDEO_URL"
Audio
Extract audio only (best available audio):
ytfetch -audio "VIDEO_URL"
Extract audio as MP3:
ytfetch -mp3 "VIDEO_URL"
Listing and searching playlists
List a playlist:
ytfetch -list "PLAYLIST_URL"
List only entries 10 through 50:
ytfetch -I "10:50" -list "PLAYLIST_URL"
List in reverse order:
ytfetch -I "30:20:-1" -list "PLAYLIST_URL"
Search a playlist by title (case-insensitive):
ytfetch -list "remix" "PLAYLIST_URL"
Downloading part of a playlist
Download only items 10 through 50:
ytfetch -I "10:50" "PLAYLIST_URL"
Download from item 30 backwards to 20 in reverse order:
ytfetch -I "30:20:-1" "PLAYLIST_URL"
Output templates and paths
Use the playlist-numbered naming scheme:
ytfetch -o num "PLAYLIST_URL"
Use the music scheme (title + artist):
ytfetch -o music "VIDEO_URL"
Use the default naming scheme of yt-dlp:
ytfetch -o default "VIDEO_URL"
Download songs with thumbnail and metadata embedded, using the music template:
ytfetch -o music --embed-thumbnail --embed-metadata "VIDEO_URL"
Use a download archive to skip already-downloaded items:
ytfetch --embed-thumbnail --embed-metadata --download-archive archive.txt -o music "PLAYLIST_URL"
Save to a custom directory:
ytfetch "VIDEO_URL" --paths "~/Downloads"
Downloading a specific time range
Download only a portion of the video:
ytfetch --download-sections "*0:30-2:00" "VIDEO_URL"
Rate limiting
Sleep between downloads to avoid rate limits:
ytfetch --sleep-interval 5 --max-sleep-interval 15 "PLAYLIST_URL"
and so on...
🔖 License
MIT License
Metadata
Release files for ytfetch 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ytfetch-3.0.1.tar.gz | 8.7 kB | With provenance | Details for ytfetch-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ytfetch-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for ytfetch-3.0.1-py3-none-any.whl |
Total release size: 19.2 kB
Release files / ytfetch-3.0.1.tar.gz
| Download URL | ytfetch-3.0.1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96122ad2957263066d7a5ef5f6cb2fd62d1f38ebe8d9f66643164a94d3b7bea6
|
|
BLAKE2b-256 checksum How to use checksums |
a8a20b766724cb6bcdea060d43683c207a8153c0df9fc6ec432e649b14af7d8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / ytfetch-3.0.1-py3-none-any.whl
| Download URL | ytfetch-3.0.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f660f5800f4f0063c86edbbf99d14b289fb93e0163a5c296f153c266cd44e9d
|
|
BLAKE2b-256 checksum How to use checksums |
98e8b0cccf480767a224ea4ae33b1bf1bbf6dd1794c7e1a9b1ecc0a8aaf765ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for ytfetch 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ytfetch-3.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.