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

Install it as a standalone CLI tool:

uv tool install smclipy

or, if you prefer pipx:

pipx 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 .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:

📁 ./.temp                 <-- (Used temporarily during processing)
📁 ./Music
├──🎵 artist1-title1.mp3
├──🎵 artist1-title2.mp3
├──🎵 artist2-title1.mp3
├──🎵 artist3-title1.mp3
└── ...

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.1.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.1.0
File Size Uploaded
smclipy-0.1.0.tar.gz 82.6 kB Details

Built distribution (wheel)

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

Total release size: 95.3 kB

Release files / smclipy-0.1.0.tar.gz

Download URL smclipy-0.1.0.tar.gz
Size 82.6 kB
Tags Source
SHA-256 checksum
How to use checksums
299a45beab3cc7552d5d11341d144f3f0790eb3b2e62e64559104a8c817af1e4
BLAKE2b-256 checksum
How to use checksums
c58517325ffb67d50785b425d97a6fa4264598f949bf61a1e15d0e2a3d848ad1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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.1.0-py3-none-any.whl

Download URL smclipy-0.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8702ac4770a2f3e40e0835339da9621b1c43c22690381e378239b7c51e76e16f
BLAKE2b-256 checksum
How to use checksums
8829140500db76303c6f9ebc0e3c54a12b66d829bd1ddda7ac22839c06f14c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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

0.2.0

2 release files

This release

0.1.0 This release

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