ytdl-archiver
Modern Python CLI for archiving YouTube playlists with media-server-friendly sidecar files.
Dependencies
- Python 3.14+
uv- FFmpeg on
PATH - (Recommended) External JavaScript runtime (
denoorNode.js) for full yt-dlp extraction compatibility - (Recommended) Firefox for browser cookie extraction
- (Optional) Rust for setup TUI development
Install
Install with uv (recommended):
uv tool install ytdl-archiver
Or with pip:
pip install ytdl-archiver
From source (development):
git clone https://github.com/htmlgxn/ytdl-archiver.git
cd ytdl-archiver
uv sync
Quick Start
1. Run first-time setup
ytdl-archiver archive
If ~/.config/ytdl-archiver/config.toml is missing, setup runs automatically on non-help commands and generates:
~/.config/ytdl-archiver/config.toml~/.config/ytdl-archiver/playlists.toml
You can also run setup directly:
ytdl-archiver init
2. Define playlists
Edit ~/.config/ytdl-archiver/playlists.toml:
[[playlists]]
id = "UUxxxxxxxxxxxxxxxxxxxxxx"
path = "Music/Example Channel"
name = "Example Music Channel"
[playlists.download]
format = "bestaudio"
write_subtitles = false
write_thumbnail = true
Notes:
[[playlists]]entries are loaded from theplaylistsarray.- If both
playlists.tomlandplaylists.jsonexist in the config directory, TOML is preferred. - Playlist download overrides accept canonical snake_case keys and yt-dlp-style aliases (for example
write_subtitlesandwritesubtitles).
3. Run archive
ytdl-archiver archive
First-Class Commands
archive: download playlists and generate sidecarsmetadata-backfill: backfill sidecars for already archived IDs in.archive.txtsearch: discover channels/playlists and append selected entries toplaylists.tomlconvert-playlists: convert legacy JSON playlists files to TOMLinit: run interactive setup
Artifact Outputs (default behavior)
Successful archive runs produce:
- Media output (for example
.mp4) - Metadata sidecars:
<stem>.info.jsonand<stem>.metadata.json - Media-server sidecar:
<stem>.nfo(when enabled) - Container policy defaults to max-quality/no-webm outputs (prefers mp4 when quality-tied, otherwise remuxes to mp4/mkv)
- Subtitle sidecars (language-suffixed, for example
<stem>.en.srt) with embedding enabled by default - Thumbnail sidecar (for example
<stem>.jpg) when enabled
Help
ytdl-archiver --help
ytdl-archiver archive --help
ytdl-archiver metadata-backfill --help
ytdl-archiver search --help
ytdl-archiver convert-playlists --help
ytdl-archiver init --help
Documentation
- Docs index:
docs/index.md - CLI reference:
docs/cli.md - Configuration reference:
docs/configuration.md - Terminal output modes:
docs/terminal-output.md - Development/contributing:
docs/development.md - Migration notes:
MIGRATION.md - Release notes (
v0.3.0):docs/releases/0.3.0.md - Changelog:
CHANGELOG.md
Metadata
Release files for ytdl-archiver 0.5.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 |
|---|---|---|---|---|
| ytdl_archiver-0.5.1.tar.gz | 2.3 MB | With provenance | Details for ytdl_archiver-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ytdl_archiver-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for ytdl_archiver-0.5.1-py3-none-any.whl |
Total release size: 4.6 MB
Release files / ytdl_archiver-0.5.1.tar.gz
| Download URL | ytdl_archiver-0.5.1.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb562674f3cd0eb272d867c3981237c93891cb21f015f45cfaa07067b607cd5e
|
|
BLAKE2b-256 checksum How to use checksums |
f3a378eab7e66f8ec8fb72ff28c8897faf679711c7aee544759003d53c15f209
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 29, 2026.
Transparency logRelease files / ytdl_archiver-0.5.1-py3-none-any.whl
| Download URL | ytdl_archiver-0.5.1-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efd1f26a5fd2bc551d9e51bb31d0baa1c4d19ae707117c6b4f8c13c8cdd5f7fa
|
|
BLAKE2b-256 checksum How to use checksums |
5bc25125c1b04a53aeb1db6f80b7993cd775c5c9e85b725aaf03f148c0fde03e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 29, 2026.
Transparency logSecurity for ytdl-archiver 0.5.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 ytdl_archiver-0.5.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 Mar 29, 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.