Skip to main content

Modern Python CLI for archiving YouTube playlists with media-server metadata support

Project description

ytdl-archiver

Modern Python CLI for archiving YouTube playlists with media-server-friendly sidecar files.

Requirements

  • Python 3.14+
  • uv
  • FFmpeg on PATH
  • Optional external JavaScript runtime (deno or Node.js) for full yt-dlp YouTube extraction compatibility

Install

uv tool 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

uv run 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

Published wheels bundle prebuilt setup UI binaries for:

  • linux-x86_64
  • linux-aarch64
  • macos-aarch64
  • windows-x86_64

Note: Intel macOS (macos-x86_64) is temporarily excluded from bundled release artifacts due to current CI runner constraints.

Source installs keep the existing fallback behavior:

  • With Rust installed, setup can auto-build the UI binary.
  • Without Rust, setup falls back to prompt mode.

You can also run setup directly:

uv run 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 the playlists array.
  • If both playlists.toml and playlists.json exist in the config directory, TOML is preferred.
  • Playlist download overrides accept canonical snake_case keys and yt-dlp-style aliases (for example write_subtitles and writesubtitles).

3. Run archive

uv run ytdl-archiver archive

Core Commands

uv run ytdl-archiver --help
uv run ytdl-archiver archive --help
uv run ytdl-archiver convert-playlists --help
uv run ytdl-archiver init --help

Documentation

  • Docs index: docs/index.md
  • CLI reference: docs/cli.md
  • Configuration reference: docs/configuration.md
  • Development/contributing: docs/development.md
  • Migration notes: MIGRATION.md
  • Terminal output modes: docs/terminal-output.md

Optional systemd service

See optional/ytdl-archiver.service.

Project details


Download files

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

Source Distribution

ytdl_archiver-0.2.0.tar.gz (541.7 kB view details)

Uploaded Source

Built Distribution

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

ytdl_archiver-0.2.0-py3-none-any.whl (550.7 kB view details)

Uploaded Python 3

File details

Details for the file ytdl_archiver-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for ytdl_archiver-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2954752abc6af8acc251ab1777bf5d86077764acb4a53a267a96fe70d0f72faf
MD5 95e0419c5281d2201612dcdbf7c5345a
BLAKE2b-256 6d13791f3766411ce249113cec777595d74d540d4584da9c9c82e1ac586ffed6

See more details on using hashes here.

File details

Details for the file ytdl_archiver-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for ytdl_archiver-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca99012ad036f536136859e76cc6adc05d97db257005cd9c32e6d865ec7c9151
MD5 325d626afdac0fe5fb96245cf434f376
BLAKE2b-256 b370a68f35e7132fffe0db76b5877cfe5fe71311477d2c95474076e85f430d7d

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