Organize YouTube Music likes into playlists with guided bootstrap and weekly sync
Project description
ytmusic-organizer
Organize your YouTube Music likes into practical playlists with a guided first-time setup and weekly incremental sync.
Features
- Guided onboarding:
ytmo setup - Initial setup build is non-destructive (create/populate only)
- Colorful setup wizard UI (Rich when available)
- Setup resume after interruption/failure
- Weekly incremental sync
- Explicit destructive reset with confirmation
- Manual mode (copy/paste prompt workflow) and optional OpenAI API mode
Install
Recommended (PyPI)
pipx install ytmusic-organizer
From GitHub (if you prefer source install)
pipx install git+https://github.com/<org-or-user>/ytmusic-organizer.git
Quickstart
- Run guided setup:
ytmo setup
The wizard handles auth setup and writes auth to <workspace>/browser.json by default.
If you already have an auth file, pass it explicitly:
ytmo setup --auth-file /absolute/path/to/browser.json
- For weekly updates:
ytmo sync
- For full destructive rebuild:
ytmo reset --yes
Commands
ytmo setup [--mode manual|api] [--auth-file PATH] [--non-interactive] [--plan-from-stdin] [--restart]ytmo sync [--mode manual|api] [--non-interactive] [--plan-from-stdin]ytmo reset [--yes] [--mode manual|api] [--non-interactive] [--plan-from-stdin]ytmo cleanup [--yes] [--local-only]ytmo preview [--plan PATH]
Common option:
--workspace(default~/.ytmusic-organizer)--json(machine-readable output; keeps default Rich output unchanged when omitted)
Modes
Manual mode (default)
The CLI exports song JSON and waits for your model response JSON on stdin:
- full flows write prompt to
~/.ytmusic-organizer/data/full_reset_prompt_filled.txt - weekly sync writes prompt to
~/.ytmusic-organizer/data/new_songs_prompt_filled.txt - provide model JSON by piping/pasting into stdin (Ctrl-D to submit)
- default workspace path is
~/.ytmusic-organizer(override with--workspace)
Prompt templates are packaged in ytmusic_organizer/prompts/.
API mode
Requires:
OPENAI_API_KEY
Run with --mode api to auto-generate plan JSON.
Safety and state
ytmo setupis create-only (non-destructive).ytmo resetis destructive and requires confirmation unless--yesis passed.ytmo syncrequires completed setup and will instruct if missing.ytmo cleanupdeletes playlists managed by this tool and removes local managed artifacts.
Local workspace files
~/.ytmusic-organizer/ contains local mutable files by default:
config.tomlbootstrap.jsonsetup_state.jsonstate.jsonmanaged_playlists.jsondata/*.json
These are intentionally ignored from git.
managed_playlists.json now stores managed playlist IDs (schema v2) for safe deletion targeting.
Troubleshooting
Auth file not found:- run interactive setup:
ytmo setup - or pass an existing file via
--auth-file /absolute/path/to/browser.json - auth guide: ytmusicapi Browser Authentication
- run interactive setup:
Setup has not been completed: runytmo setup.Setup interrupted: runytmo setupto resume, orytmo setup --restartto restart.- API mode key error: set
OPENAI_API_KEYor switch to--mode manual.
Development
Development install
python -m venv .venv
source .venv/bin/activate
pip install -e .
Local repo install (maintainers/testing)
pipx install .
Run tests:
python -m unittest discover -s tests -v
Agent Automation
For AI/automation integration details (install, auth requirements, command contracts, and JSON output examples), see:
Release Automation
PyPI publishing is automated via GitHub Actions:
.github/workflows/release-pypi.yml: publishes onv*tags.github/workflows/release-testpypi.yml: manual TestPyPI publish
Publishing auth model:
- Uses PyPI/TestPyPI Trusted Publishing (OIDC) from GitHub Actions.
- No
PYPI_API_TOKEN/TEST_PYPI_API_TOKENrepository secrets are required. - PyPI/TestPyPI project must have matching trusted publisher configuration for this repository/workflow.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ytmusic_organizer-0.1.0.tar.gz.
File metadata
- Download URL: ytmusic_organizer-0.1.0.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0edc753da7c08e3cdf58b2d79baeeee9afb498e9ae5329b72116ca3f1c46fcc
|
|
| MD5 |
fcf482a4142c41221d4614438d9a3b78
|
|
| BLAKE2b-256 |
40d9bd84b6d6f540771552f669b9056628ab89d024847043a409185c0ebfb5e1
|
Provenance
The following attestation bundles were made for ytmusic_organizer-0.1.0.tar.gz:
Publisher:
release-pypi.yml on feffel/ytmusic-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ytmusic_organizer-0.1.0.tar.gz -
Subject digest:
e0edc753da7c08e3cdf58b2d79baeeee9afb498e9ae5329b72116ca3f1c46fcc - Sigstore transparency entry: 1109246935
- Sigstore integration time:
-
Permalink:
feffel/ytmusic-organizer@298e7647ffa7470f90d4d383eca45657a2b3f0c6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/feffel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@298e7647ffa7470f90d4d383eca45657a2b3f0c6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ytmusic_organizer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ytmusic_organizer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0f797fc46a10c30058c272350157da8084f7cd196d73fd640c74a56628f9e5d
|
|
| MD5 |
32d832e34dadce377e419d6a537ae069
|
|
| BLAKE2b-256 |
b7242a8b7f767214d53d160aad4634dcdac67de85f6f7912b213b89fd6986046
|
Provenance
The following attestation bundles were made for ytmusic_organizer-0.1.0-py3-none-any.whl:
Publisher:
release-pypi.yml on feffel/ytmusic-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ytmusic_organizer-0.1.0-py3-none-any.whl -
Subject digest:
f0f797fc46a10c30058c272350157da8084f7cd196d73fd640c74a56628f9e5d - Sigstore transparency entry: 1109246936
- Sigstore integration time:
-
Permalink:
feffel/ytmusic-organizer@298e7647ffa7470f90d4d383eca45657a2b3f0c6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/feffel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@298e7647ffa7470f90d4d383eca45657a2b3f0c6 -
Trigger Event:
push
-
Statement type: