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.1.tar.gz (1.8 MB 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.1-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ytdl_archiver-0.2.1.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ytdl_archiver-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ae79f19b433366a3692406e23a3692f4aea3af5ce241b7dab0531b266d7b9ffe
MD5 6380902ce815821e5ef09a0f60fd064e
BLAKE2b-256 50b1644798638fef8ef5aef90413a1a900e0c363761d8e221cfc3b288e47d889

See more details on using hashes here.

Provenance

The following attestation bundles were made for ytdl_archiver-0.2.1.tar.gz:

Publisher: release.yml on htmlgxn/ytdl-archiver

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: ytdl_archiver-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ytdl_archiver-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90aa0c9480a0f9c05dc329cc8d5c1da07247dba12ea182c48186ff1ba5dfd460
MD5 07d64d11b9f788ec48e13c143d02288d
BLAKE2b-256 98979efab17599412e0164de16e001603a00f235555e53e1a19eb310d6a9aa82

See more details on using hashes here.

Provenance

The following attestation bundles were made for ytdl_archiver-0.2.1-py3-none-any.whl:

Publisher: release.yml on htmlgxn/ytdl-archiver

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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