Skip to main content

smclipy

simple music cli py is a Python script designed to streamline downloading, tagging, and organizing music from YouTube. It allows you to batch-download audio, manually set metadata (including multiple artists and cover art).

Features

  • Batch Downloading: Queue up as many YouTube URLs as you want before processing.
  • Interactive Tagging: Prompts you for the track Title and Artists (has autocompletion). Both come prefilled: the title from the video's title, and the artists from the channel name, corrected against your known authors.
  • Cover Art Cropping: Easily crop your cover art to a perfect 1:1 square ratio during the tagging process.
  • Clean Cleanup: Uses a .temp directory (inside your music folder's smclipy subfolder) during the download and tagging process to keep your main library clean.

Requirements

  • Python 3.12+ (handled automatically if you use uv).
  • FFmpeg — required by yt-dlp to extract the audio to MP3 and embed the cover art.
  • Deno — required by yt-dlp (2025.11+) to solve YouTube's JavaScript challenges during extraction. Without it, downloads may fail or have limited format availability.

Installation

pip install smclipy

Configuration

smclipy relies on a configuration file to know where to organize your files.

On first run, a default config file is created at ~/.config/smclipy/config.json and the program exits so you can edit it to your liking. To store it somewhere else, set the SMCLIPY_CONFIG environment variable to your preferred path (respects $XDG_CONFIG_HOME).

{
  "name": "smclipy",
  "path_to_music_folder": "./Music",
  "description_max_lines": 5
}

Config Breakdown

  • name: The master folder name (smclipy) that will be created inside your music folder to hold all the organized artists.
  • path_to_music_folder: The base directory where your music library lives (default is ./Music, relative to wherever you run the command from).
  • description_max_lines: How many lines of the video description to show while tagging (default is 5).

Usage

Run it from your music library's parent directory:

smclipy <command>

Commands

  • smclipy download — Batch download and tag songs from YouTube.
  • smclipy crop — Scan saved covers for pillarboxed art, crop to 1:1, and re-embed into the matching MP3s.

Download flow

  1. Queue URLs: Paste your YouTube URLs one by one (enter an empty line to finish).

  2. Tagging Flow (Per Track):

    • The script will download the current track to Music/smclipy/.temp.
    • If a cover image is found, you will be prompted to crop it to a 1:1 ratio.
    • Enter the Title of the track (prefilled with the video's title).
    • Enter the Artist/s (prefilled from the channel name; if it matches an author already in authors.txt — ignoring case and spaces — your existing spelling is kept). To tag multiple artists, separate them using a backslash \ (e.g., Artist 1\Artist 2\Artist 3).
  3. Completion: Once tagged, the final music file is moved to your designated music folder, using the following filename artist-title.mp3 (e.g., Rick Astley-Never Gonna Give You Up.mp3).

Folder Structure Example

After running the script and tagging a few songs, your output directory will look something like this:

📁 ./Music
├── 🎵 artist1-title1.mp3
├── 🎵 artist1-title2.mp3
├── 🎵 artist2-title1.mp3
├── 🎵 artist3-title1.mp3
└── 📁 smclipy
    ├── 📁 .temp         <-- (Used temporarily during processing)
    ├── 📁 covers
    ├── 📄 authors.txt
    └── 📄 songs_info.txt

Development

Clone the repo and run it from the project root with uv (set SMCLIPY_CONFIG to use your existing config.json):

uv run smclipy <command>

Release files for smclipy 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smclipy 0.2.0
File Size Uploaded
smclipy-0.2.0.tar.gz 84.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smclipy 0.2.0
File Interpreter ABI Platform
smclipy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 97.7 kB

Release files / smclipy-0.2.0.tar.gz

Download URL smclipy-0.2.0.tar.gz
Size 84.3 kB
Tags Source
SHA-256 checksum
How to use checksums
71021e1733ddeca614073b82711ad4d8b5bd9672222574184c9a09510a4c7d23
BLAKE2b-256 checksum
How to use checksums
ec85622feeedfa132527e86cedb9c127f2ef75f7196029fdb376f0529cbfb83e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / smclipy-0.2.0-py3-none-any.whl

Download URL smclipy-0.2.0-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
181621bcd119c2d14b19214bf3f1b12236b22d83d7682103db9e7027e93c0aa0
BLAKE2b-256 checksum
How to use checksums
00ea3c365707ce6890881da3a199bcd85873e07d2508a58a5b470374f36dd9e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page